-
Notifications
You must be signed in to change notification settings - Fork 15
51d334a845a082338735b0fdfc620a4b15fa26fe breaks x86_64 ThinLTO + dynamic ftrace #1385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Does your build of LLVM have assertions enabled? It would be interesting to see if there were any new triggers. The diff of those sections before and after that commit might be interesting as well. Does not look like that commit got any precommit review so it should probably be reverted while this is investigated. |
Looks like that patch is a precursor to this patch: https://reviews.llvm.org/D102615#2784051 |
After rebuilding LLVM with
percpu_down_write.59d938e649e62db0cef4903d495e838fbc6a6eb8.txt try_check_zero.59d938e649e62db0cef4903d495e838fbc6a6eb8.txt |
No idea how it happens but we seem to have lost the last call to Before:
After:
Not sure about the |
It's actually the broken commit
Also note that the disassembly above is after objtool. Let me rebuild and see if there's something obvious that trips it up. |
I guess it wasn't "No Functional Change Intended" then. |
Looks like objtool just correctly removed the 0000000000000000 <percpu_down_write>:
- 0: e8 00 00 00 00 callq 5 <percpu_down_write+0x5>
- 1: R_X86_64_PLT32 __fentry__-0x4
+ 0: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
+ 1: R_X86_64_NONE __fentry__-0x4
5: 55 push %rbp
6: 41 57 push %r15
8: 41 56 push %r14 |
No functional change was intended, must be a bug. Patch reverted. Sorry for disturbance! |
Please confirm the failure is gone with
|
Thanks, Max. I can confirm the kernel boots again after the revert. |
Can we try to get a reduced test case for @max-azul ? |
Looks like https://reviews.llvm.org/D102615 has a new revision. I will try to test that later today to make sure none of the LTO/CFI builds are broken with it. |
https://reviews.llvm.org/D102615 passes a regular defconfig, defconfig + CONFIG_LTO_CLANG_THIN=y, and defconfig + CONFIG_LTO_CLANG_THIN=y + CONFIG_CFI_CLANG=y for arm64 and x86_64 at llvm/llvm-project@cfa9ae9 and samitolvanen@29d7af2. |
Guessing that's |
Nathan, did you test that also with dynamic ftrace? Normal defconfig + LTO was fine with the earlier patch too. |
@samitolvanen sorry, I missed testing with |
Looks good to me with |
Uh oh!
There was an error while loading. Please reload this page.
Starting with LLVM commit 51d334a845a082338735b0fdfc620a4b15fa26fe ("[NFCI] Lazily evaluate SCEVs of PHIs"), ToT x86_64 defconfig + ThinLTO + dynamic ftrace fails to boot:
The kernel was configured as follows:
$ make ARCH=x86_64 LLVM=1 LLVM_IAS=1 defconfig # ThinLTO + dynamic ftrace + CBL CI configs $ ./scripts/config -e LTO_CLANG_THIN -d LTO_CLANG_FULL -d GCOV_KERNEL -d KASAN -e FTRACE_STARTUP_TEST -e FUNCTION_TRACER -e DYNAMIC_FTRACE -e FTRACE -e TRACING -e LOCK_TORTURE_TEST -e RCU_TORTURE_TEST -e EXPERT -e DEBUG_KERNEL -e LOCK_DEBUGGING_SUPPORT -e DEBUG_RT_MUTEXES -e DEBUG_SPINLOCK -e DEBUG_MUTEXES -e DEBUG_WW_MUTEX_SLOWPATH -e DEBUG_LOCK_ALLOC -e DEBUG_LOCKDEP -e DEBUG_ATOMIC_SLEEP -e CRYPTO_MANAGER_DISABLE_TESTS -e CRC32_SELFTEST -e DEBUG_LOCKING_API_SELFTESTS -e DEBUG_NMI_SELFTEST -e DEBUG_RODATA_TEST -e DEBUG_TLBFLUSH -e DMATEST -e GLOB_SELFTEST -e PCI_EPF_TEST -e PCI_ENDPOINT_TEST -e PROVE_LOCKING -e PROVE_RCU -e RBTREE_TEST -e RCU_EQS_DEBUG -e STATIC_KEYS_SELFTEST -e STRING_SELFTEST -e TEST_BITMAP -e TEST_FIRMWARE -e TEST_SORT -e TEST_SYSCTL -e TEST_UUID -e TORTURE_TEST -e USB_TEST -e USB_EHSET_TEST_FIXTURE -e USB_LINK_LAYER_TEST -e WW_MUTEX_SELFTEST -e BLK_DEV_INITRD -e DEVTMPFS -e DEVTMPFS_MOUNT -e SCSI -e BLK_DEV_SD -e SCSI_LOWLEVEL -e SCSI_DC395x -e SCSI_AM53C974 -e SCSI_SYM53C8XX_2 -e MEGARAID_SAS -e FUSION -e FUSION_SAS -e MMC -e MMC_SDHCI -e MMC_SDHCI_PCI -e BLK_DEV_NVME -e USB -e USB_XHCI_HCD -e USB_EHCI_HCD -e USB_OHCI_HCD -e USB_STORAGE -e USB_UAS -e VIRTIO -e VIRTIO_PCI -e VIRTIO_PCI_LEGACY -e VIRTIO_BALLOON -e VIRTIO_MMIO -e BLK_MQ_VIRTIO -e VIRTIO_BLK -e VIRTIO_BLK_SCSI -e SCSI_VIRTIO $ make ARCH=x86_64 LLVM=1 LLVM_IAS=1 olddefconfig
During the build I observed the following objtool warnings, which were not present with earlier compiler versions:
Tested with kernel commit 7ac3a1c.
cc @nickdesaulniers @nathanchance
The text was updated successfully, but these errors were encountered: