User Details
- User Since
- Oct 9 2018, 11:07 PM (231 w, 5 d)
Fri, Mar 3
@amyk thank you so much!
Thu, Mar 2
Could this be merged into main and backported to release/16.x? If this makes 16.0.0 final, I think the kernel can avoid working around this issue altogether, as -mtune was only wired up to do something on PowerPC in during the 16 development cycle; in prior versions, it was ignored so any value was accepted.
Tue, Feb 28
Thanks for the fix, it appears to work fine for me against the kernel's powernv_defconfig target.
Feb 14 2023
I applied this change along with the others from https://discourse.llvm.org/t/rfc-syncing-asm-goto-with-outputs-with-gcc/65453/11 and built and boot tested a variety of configurations on the architectures that the Linux kernel cares about and saw no new issues.
Jan 30 2023
I tested this against the kernel and left my feedback above (no issues) so this can be merged.
Jan 17 2023
I’ll have to filter the warnings to see if there are any other instances with other operators that appear problematic.
Jan 14 2023
Out of curiosity, has it found any true positives that you can tell?
Jan 13 2023
For what it’s worth, this triggers a LOT in the Linux kernel for the pattern that @MaskRay pointed out:
Jan 1 2023
This does not show any issues with any of the MIPS configurations that I build in the Linux kernel, thanks for fixing the problems I reported!
Dec 22 2022
I bisected a crash I see while building the Linux kernel for arm64 to this change. A reduced C and LLVM IR reproducer:
cvise spits out:
Dec 19 2022
Thanks for the fix! It does not appear to be enough though, I still see some of those errors in my build, although there are far fewer of them:
Dec 16 2022
For what it's worth, this breaks building the Linux kernel's ARCH=mips 32r1_defconfig with clang and GNU as, with thousands of messages along the line of:
Nov 8 2022
Nov 7 2022
For what's worth, I now see the libLTO failures that @jhuber6 saw above and similar failures in libRemarks when doing a multistage build. I can dig out the cmake commands tomorrow if a standard one does not reproduce it.
Nov 4 2022
I had the same thought as Nick that there should be a test added for the regression. Regardless, I just tested your change against the Linux kernel and everything build successfully, thank you for the quick fix! I do not think I am qualified enough to approve though.
Nov 3 2022
Judging from the time zone of the committer, I suspect this will not get dealt with right away so I have reverted this change in 74bace2dfe57d9cf569addf94af4e01a990d2374 due to the above crash.
Actually, I lied, here is an LLVM IR reproducer that has been passed through llvm-reduce based on whether llc crashed or not.
I bisect a crash while compiling the Linux kernel to this change. A simplified C reproducer (sorry, I do not have time at the moment for llvm-reduce):
Nov 2 2022
Nov 1 2022
Oct 28 2022
I just bisected check-llvm failing to this change. Based on that and the above comment and the fact that it does not look like there is any progress on a forward fix that I can see (presumably due to time zones), I reverted this change in 23c50432fb25775fe0eb958bc8c2a099b0a0c286.
Oct 3 2022
Sep 30 2022
Sep 29 2022
Sep 27 2022
Thanks a lot for fixing this! I took it for a spin against the Linux kernel and all instances of -Wvoid-ptr-dereference disappeared :)
Diff 463063 looks good against the Linux kernel with https://lore.kernel.org/20220925153151.2467884-1-me@inclyc.cn/ applied. I see no additional errors/warnings and the drivers/media/platform/nvidia/tegra-vde/v4l2.c did disappear. Once that patch has been fully chased and accepted, this change should be able to be merged without any problems. Thank you again for taking a look at the kernel ahead of time, it is very much appreciated!
Sep 26 2022
This warning is quite noisy for the Linux kernel due to a couple of places where a void * is dereferenced as part of compile time checking.
Aug 25 2022
Aug 24 2022
I don't see any issues with my RISC-V Linux kernel builds with latest tip of tree plus this change. Thanks for the fix!
I too saw a crash in the Linux kernel with this change (no KMSAN), my reduction just finished:
Aug 23 2022
Aug 22 2022
This patch breaks building the Linux kernel for RISC-V. A simplified reproducer:
Aug 18 2022
I can no longer do a two stage build on Fedora after this change.
Aug 16 2022
Thanks a lot for the quick fix. This resolves all of the issues I noticed in my 32-bit ARM Linux kernel build tests. However, I don't think I am qualified enough to approve this.
Jul 19 2022
Sorry I didn't get a chance to report this until after it was merged (my first round of tests forgot to update Linux to fix some unrelated build breakage) but I see a crash in some PowerPC Linux kernel builds as a result of this change in net/ceph/messenger_v2.c. A reduced C reproducer below.
Jul 15 2022
My Linux kernel build and QEMU boot tests (minus i386, due to an unrelated regression in mainline) showed no regressions with this change.
Jul 14 2022
This cleans up the objtool warnings I initially reported and does not introduce any other regressions in my Linux kernel build and QEMU boot tests.
Jul 12 2022
I tested diff 443646 and saw no regressions with my Linux kernel build and QEMU boot tests. I can test the latest revision if that would be useful. I can test bare metal later today.
Jul 7 2022
My set of Linux kernel build and QEMU boot tests did not notice any issues with this change.
Jul 6 2022
I did a set of builds with this patch on mainline and saw no issues.
I bisected an assertion failure while building the Linux kernel for PowerPC to this patch:
Jul 5 2022
I ended up reducing something down anyways. At the parent commit of dc969061c68e62328607d68215ed8b9ef4a1e4b1, there is no crash.
Should dc969061c68e62328607d68215ed8b9ef4a1e4b1 be reverted as well? I just bisected an assertion failure while building the Linux kernel for arm64 to that change:
May 24 2022
@amyk Thank you a lot for the fix! I'll pull it down and verify everything is fixed tonight.
May 20 2022
I bisected a crash when compiling the Linux kernel to this change.
May 16 2022
I see an instance of this warning in the Linux kernel due to the "Now, for unknown directives inside a skipped conditional block, we diagnose the unknown directive as a warning if it is sufficiently similar to a directive specific to preprocessor conditional blocks" part of this change:
May 12 2022
I am seeing a failure during a two stage build of LLVM on an AArch64 host that I bisected to this change:
May 6 2022
May 5 2022
This triggers even without -pedantic, is that intentional?
Apr 29 2022
I bisected a crash while building the Linux kernel for RISC-V to this change:
Apr 28 2022
I bisected a new crash while building the Linux kernel for arm64 to this change:
Apr 21 2022
It looks like Fangrui already fixed this with f4a3569d0ad61907692fe10b1ffe1fa7763e9c26, thanks a lot! I can confirm that ARCH=arm64 defconfig and allmodconfig build fine now. I will test other architectures tonight and report back if there are any other issues I uncover.
Apr 20 2022
This assertion triggers when building the Linux kernel for arm64:
Mar 22 2022
I have reverted this in 4e0008dcbe9fce99b9727e8bbeb129efc7bf2d80 to hopefully keep our CI from going completely red. I am happy to test a new revision as needed.
This patch causes a crash while building the Linux kernel for arm64. A simplifier C reproducer:
Mar 21 2022
This passes through all my ARCH=arm and ARCH=arm64 build and boot tests on next-20220321 with the instances of -Wdeclaration-after-statement resolved and no new instances of any other warnings.
Mar 3 2022
I can build malta_defconfig on next-20220303 with this patch. I enabled CONFIG_DEBUG_STACKOVERFLOW and CONFIG_HARDENED_USERCOPY, which both use current_stack_pointer, and did not see any warnings/errors.
Feb 28 2022
Feb 25 2022
This patch causes a failed assertion when building the arm64 Linux kernel.
Feb 18 2022
Feb 17 2022
I have not done a bisect but it seems likely that this change breaks linking modules for the arm64 Linux kernel, is this expected?
Feb 16 2022
Feb 15 2022
The latest revision passes all of my AArch64 Linux kernel builds with assertions enabled and boots on bare metal, thank you for fixing all the issues!
Feb 13 2022
Thank you for the quick fix! Unfortunately, I still an assertion failure with this patch while building at least allnoconfig and allmodconfig + ThinLTO kernels, albeit a different one. See below and let me know if there are any problems with reproducing:
I have reverted this in 22eb1dae3fb20ca8ada865de1d95baab0e08a060, as it causes assertion failures when building the Linux kernel, which has caused our CI to go red:
Feb 7 2022
Feb 3 2022
It looks like _paravirt_ident_64() is the problematic function. This diff on top of v5.17-rc2 allows me to boot:
This diff allows me to boot on bare metal as of v5.17-rc2:
The latest revision allows me to boot a kernel in QEMU now but that same kernel does not boot on bare metal. I'll see if I can narrow down the problematic translation unit with Nick's subdir-ccflags-y trick.
Jan 27 2022
As discussed, this is not the right fix for the issue. I have just gone ahead and told the original reporter to use scan-build with the --use-cc=clang flag to avoid these issues.
Jan 19 2022
Jan 15 2022
Jan 14 2022
Jan 12 2022
Jan 10 2022
f62f47f5e1f641b41d3b7d593c058ebec2883534 hides the assertion failure for me.
Just in case it is something different than the Chromium report, I see an assertion failure while building the Linux kernel. Reduced reproducer:
Jan 7 2022
The two false positive warnings in the kernel are fixed with this patch and there were no new warnings introduced.
Dec 29 2021
@hyeongyukim I hand reduced a couple of the translation units that I see issues in so apologies if they are a little verbose.
Dec 28 2021
@hyeongyukim I am currently offline for the evening but it seems like my reduction might have been too aggressive. It looks like this code comes from ravb_set_gti() (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/ethernet/renesas/ravb_main.c?h=v5.16-rc7#n2480), which checks that rate is not zero before using it as a divisor. I will see if I can get a reproducer without any undefined behavior such as this.