[Kernel-packages] [Bug 1766624] Re: AArch64 kernel panic on APM Mustang
Hello, The same problem happened 2 days ago (same machine). Here is what I found in kern.log: [645048.763978] Unhandled fault: alignment fault (0x9621) at 0x1cd7237a [645048.771350] Internal error: : 9621 [#1] SMP [645048.775943] Modules linked in: veth xt_nat xt_tcpudp ipt_MASQUERADE nf_nat_masquerade_ipv4 xfrm_user xfrm_algo iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 xt_addrtype iptable_filter ip_tables xt_conntrack x_tables nf_nat nf_conntrack br_netfilter bridge stp llc overlay shpchp xgene_edac edac_core xhci_plat_hcd xgene_rng uio_pdrv_genirq uio nfsd ib_iser auth_rpcgss rdma_cm iw_cm nfs_acl lockd ib_cm grace ib_sa sunrpc ib_mad ib_core ib_addr iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi autofs4 btrfs raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear realtek ahci_xgene libahci_platform xgene_enet libahci mdio_xgene aes_neon_blk ablk_helper cryptd [645048.841724] CPU: 4 PID: 20821 Comm: aarch64-unknown Not tainted 4.4.0-101-generic #124-Ubuntu [645048.850290] Hardware name: AppliedMicro Mustang/Mustang, BIOS 1.1.0 Apr 22 2015 [645048.857647] task: 8003e7f9 ti: 8003eb794000 task.ti: 8003eb794000 [645048.865180] PC is at _raw_spin_lock_irqsave+0x24/0x60 [645048.870292] LR is at try_to_wake_up+0x44/0x3a8 [645048.874797] pc : [] lr : [] pstate: 61c5 [645048.882240] sp : 8003eb797b40 [645048.885620] x29: 8003eb797b40 x28: 0075 [645048.891009] x27: 8001158f2a00 x26: 8001d3177bf0 [645048.896397] x25: 8003eb66c0c8 x24: 8001d3177c00 [645048.901785] x23: x22: 0003 [645048.907174] x21: 1cd7237a x20: [645048.912563] x19: 1cd7237a x18: 0a03 [645048.917950] x17: 996c9010 x16: 80210960 [645048.923338] x15: 7fff x14: [645048.928727] x13: x12: [645048.934115] x11: 8000f70bd100 x10: 012e [645048.939502] x9 : 8093fee8 x8 : [645048.944891] x7 : 8003eb66c528 x6 : 8003eb66c190 [645048.950279] x5 : x4 : 0001 [645048.955667] x3 : x2 : [645048.961056] x1 : 0003 x0 : 01c0 [645048.966443] [645048.968011] Process aarch64-unknown (pid: 20821, stack limit = 0x8003eb794020) [645048.975627] Stack: (0x8003eb797b40 to 0x8003eb798000) [645048.981430] 7b40: 8003eb797b60 800f28b4 1cd71cd6 8003ee0c8000 [645048.989305] 7b60: 8003eb797bc0 800f2c40 1cd71cd6 0001 [645048.997179] 7b80: 8001d3177bf0 8001d3177be8 8001d3177bf0 8001d3177c00 [645049.005055] 7ba0: 8003eb66c0c8 8001d3177bf0 8001158f2a00 0075 [645049.012929] 7bc0: 8003eb797be0 8011433c 1cd71cd6 8020eb1c [645049.020805] 7be0: 8003eb797c20 8090ef30 8001d3177be8 0001 [645049.028680] 7c00: 80db2000 8001d3177bc0 8020b790 [645049.036554] 7c20: 8003eb797cb0 8090e320 8001d3177be8 [645049.044428] 7c40: 8003eb66c708 8001d3177bc0 [645049.052303] 7c60: 8003eb66c0c8 8001d3177be0 8001158f2a00 8003eb66c4e0 [645049.060177] 7c80: 8003eb66c320 800392b93c88 800392b93c88 8003e7f9 [645049.068051] 7ca0: 8003 cb88537fdc8ba65f 8003eb797cd0 8020c640 [645049.075926] 7cc0: 8003eb66c4b0 8003eb797d70 8020ccb8 [645049.083800] 7ce0: 8003eb66c0c8 8003eb66c4b0 995fd000 [645049.091676] 7d00: 80eb4000 8001158f2a00 8003eb797eb0 [645049.099550] 7d20: 000f 0075 80eb4000 [645049.107425] 7d40: 158f2a00 012e 8000f70bd100 995ee000 [645049.115300] 7d60: 995fd000 8003eb797db0 8020e104 [645049.123175] 7d80: 8001158f2a00 8003eb66c4b0 995fd000 [645049.131049] 7da0: 995ee000 995fd000 8003eb797df0 80210920 [645049.138925] 7dc0: 8003eb66c4b0 0070 [645049.146799] 7de0: 8003eb797e50 80210aa0 [645049.154673] 7e00: 995fd000 0070 995fd000 80db2000 [645049.162548] 7e20: 995ee000 [645049.170422] 7e40: 8003eb66c4b0 8003eb794000 e789cea0 80085df0 [645049.178296] 7e60: 0003 996ca888 [645049.186171] 7e80: 0015 011d
[Kernel-packages] [Bug 1533009] Re: arm64: "unsupported RELA relocation"
I have posted a GCC patch: https://gcc.gnu.org/ml/gcc-patches/2016-01/msg01986.html to change the default of -mpc-relative-literal-loads when -mfix-cortex-a53-843419 is used. -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1533009 Title: arm64: "unsupported RELA relocation" Status in Linaro GCC: Unknown Status in Linux: Unknown Status in gcc-5 package in Ubuntu: Invalid Status in linux package in Ubuntu: Fix Committed Status in gcc-5 source package in Xenial: Invalid Status in linux source package in Xenial: Fix Committed Bug description: linux-image-4.3.0-5-generic 4.3.0-5.16 arm64 fails to load modules (and therefore boot). It emits messages like the following for each attempted module load: [2.156817] module libahci: unsupported RELA relocation: 275 This is reminiscent of LP: #1502946 - except that fix appears to still be in-tact. What has changed, however, is the build environment. If I rebuild the same kernel source in a wily chroot, it boots fine. Marking "Confirmed" because Paulo Pisatti reported this to me, and I reproduced. To manage notifications about this bug go to: https://bugs.launchpad.net/gcc-linaro/+bug/1533009/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp
[Kernel-packages] [Bug 1533009] Re: arm64: "unsupported RELA relocation"
I prefer you submit the Makefile patch upstream, since I'm not very familiar with kernel lists. I am going to look at a patch for GCC-6, such that this optimization is disabled by default when compiling with -mfix-cortex-a53-843419. You could then use -mfix-cortex-a53-843419 to compile the kernel, instead of -mpc-relative-literal-loads. -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1533009 Title: arm64: "unsupported RELA relocation" Status in Linaro GCC: Unknown Status in Linux: Unknown Status in gcc-5 package in Ubuntu: Confirmed Status in linux package in Ubuntu: Triaged Bug description: linux-image-4.3.0-5-generic 4.3.0-5.16 arm64 fails to load modules (and therefore boot). It emits messages like the following for each attempted module load: [2.156817] module libahci: unsupported RELA relocation: 275 This is reminiscent of LP: #1502946 - except that fix appears to still be in-tact. What has changed, however, is the build environment. If I rebuild the same kernel source in a wily chroot, it boots fine. Marking "Confirmed" because Paulo Pisatti reported this to me, and I reproduced. To manage notifications about this bug go to: https://bugs.launchpad.net/gcc-linaro/+bug/1533009/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp
[Kernel-packages] [Bug 1533009] Re: arm64: "unsupported RELA relocation"
We backported fixes for GCC PR63304 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63304) in our 2015.12 snapshot. By default, GCC now uses adrp / ldr or adrp / add instructions to address the literal pools under the use of a command line option, and this mode is on by default. OTOH, CONFIG_ARM64_ERRATUM_843419 removes support for the related relocations from the kernel, hence the error you are seeing. Modifying arch/arm64/Makefile in the kernel sources to have: ifeq ($(CONFIG_ARM64_ERRATUM_843419), y) KBUILD_CFLAGS_MODULE+= -mcmodel=large -mpc-relative-literal-loads endif makes the problem disappear. However, the -mpc-relative-literal-loads option is not recognized by GCC if it doesn't include the patch for GCC PR 63304, so it may not be easy to patch the Makefile. ** Bug watch added: GCC Bugzilla #63304 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63304 -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1533009 Title: arm64: "unsupported RELA relocation" Status in Linaro GCC: Unknown Status in Linux: Unknown Status in gcc-5 package in Ubuntu: Confirmed Status in linux package in Ubuntu: Triaged Bug description: linux-image-4.3.0-5-generic 4.3.0-5.16 arm64 fails to load modules (and therefore boot). It emits messages like the following for each attempted module load: [2.156817] module libahci: unsupported RELA relocation: 275 This is reminiscent of LP: #1502946 - except that fix appears to still be in-tact. What has changed, however, is the build environment. If I rebuild the same kernel source in a wily chroot, it boots fine. Marking "Confirmed" because Paulo Pisatti reported this to me, and I reproduced. To manage notifications about this bug go to: https://bugs.launchpad.net/gcc-linaro/+bug/1533009/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp
[Kernel-packages] [Bug 1533009] Re: arm64: "unsupported RELA relocation"
Updating arch/arm64/Makefile to have: ifeq ($(CONFIG_ARM64_ERRATUM_843419), y) KBUILD_CFLAGS_MODULE+= -mcmodel=large KBUILD_CFLAGS_MODULE+= $(call cc-option, -mpc-relative-literal-loads) endif does the trick. Is this a good solution for you? -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1533009 Title: arm64: "unsupported RELA relocation" Status in Linaro GCC: Unknown Status in Linux: Unknown Status in gcc-5 package in Ubuntu: Confirmed Status in linux package in Ubuntu: Triaged Bug description: linux-image-4.3.0-5-generic 4.3.0-5.16 arm64 fails to load modules (and therefore boot). It emits messages like the following for each attempted module load: [2.156817] module libahci: unsupported RELA relocation: 275 This is reminiscent of LP: #1502946 - except that fix appears to still be in-tact. What has changed, however, is the build environment. If I rebuild the same kernel source in a wily chroot, it boots fine. Marking "Confirmed" because Paulo Pisatti reported this to me, and I reproduced. To manage notifications about this bug go to: https://bugs.launchpad.net/gcc-linaro/+bug/1533009/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp
[Kernel-packages] [Bug 1533009] Re: arm64: "unsupported RELA relocation"
I've cross compiled the kernel+modules, mostly following the steps in comment #18. Then, I've scanned the generated module for the AARCH64_ADR_PREL_PG_HI21 relocation. When compiled with Linaro-2015.12, this relocation is present. When compiled with Linaro-2015.10, it is not. When using Linaro-2015.11, the build fails with errors such as: Assembler messages: Error: selected processor does not support `aese v0.16b,v1.16b' Assuming that these relocations are the real cause of the problem, I'm going to bisect to identify which commit in our branch introduced them. -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1533009 Title: arm64: "unsupported RELA relocation" Status in Linaro GCC: Unknown Status in Linux: Unknown Status in gcc-5 package in Ubuntu: Confirmed Status in linux package in Ubuntu: Triaged Bug description: linux-image-4.3.0-5-generic 4.3.0-5.16 arm64 fails to load modules (and therefore boot). It emits messages like the following for each attempted module load: [2.156817] module libahci: unsupported RELA relocation: 275 This is reminiscent of LP: #1502946 - except that fix appears to still be in-tact. What has changed, however, is the build environment. If I rebuild the same kernel source in a wily chroot, it boots fine. Marking "Confirmed" because Paulo Pisatti reported this to me, and I reproduced. To manage notifications about this bug go to: https://bugs.launchpad.net/gcc-linaro/+bug/1533009/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp
[Kernel-packages] [Bug 1533009] Re: arm64: "unsupported RELA relocation"
That's what I expected: this has nothing to do with relocations. -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1533009 Title: arm64: "unsupported RELA relocation" Status in Linaro GCC: Unknown Status in Linux: Unknown Status in gcc-5 package in Ubuntu: Confirmed Status in linux package in Ubuntu: Triaged Bug description: linux-image-4.3.0-5-generic 4.3.0-5.16 arm64 fails to load modules (and therefore boot). It emits messages like the following for each attempted module load: [2.156817] module libahci: unsupported RELA relocation: 275 This is reminiscent of LP: #1502946 - except that fix appears to still be in-tact. What has changed, however, is the build environment. If I rebuild the same kernel source in a wily chroot, it boots fine. Marking "Confirmed" because Paulo Pisatti reported this to me, and I reproduced. To manage notifications about this bug go to: https://bugs.launchpad.net/gcc-linaro/+bug/1533009/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp
[Kernel-packages] [Bug 1533009] Re: arm64: "unsupported RELA relocation"
It's not clear to me how I can reproduce the problem as a GCC developper. Should I build kernel-4.3.0 (vanilla), using the defconfig attached on comment #13, build the modules and look for the relocation mentioned by Ard Biesheuvel? -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1533009 Title: arm64: "unsupported RELA relocation" Status in Linaro GCC: Unknown Status in Linux: Unknown Status in gcc-5 package in Ubuntu: Confirmed Status in linux package in Ubuntu: Triaged Bug description: linux-image-4.3.0-5-generic 4.3.0-5.16 arm64 fails to load modules (and therefore boot). It emits messages like the following for each attempted module load: [2.156817] module libahci: unsupported RELA relocation: 275 This is reminiscent of LP: #1502946 - except that fix appears to still be in-tact. What has changed, however, is the build environment. If I rebuild the same kernel source in a wily chroot, it boots fine. Marking "Confirmed" because Paulo Pisatti reported this to me, and I reproduced. To manage notifications about this bug go to: https://bugs.launchpad.net/gcc-linaro/+bug/1533009/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp