Buildresult: powerpc-next/mpc86xx_defconfig/powerpc-gcc5 built on May 10 2019, 03:22
kisskb
Revisions
|
Branches
|
Compilers
|
Configs
|
Build Results
|
Build Failures
|
Status:
OK
Date/Time:
May 10 2019, 03:22
Duration:
0:01:49.054595
Builder:
ka2
Revision:
powerpc/64s: Use early_mmu_has_feature() in set_kuap() (
8150a153c013aa2dd1ffae43370b89ac1347a7fb)
Target:
powerpc-next/mpc86xx_defconfig/powerpc-gcc5
Branch:
powerpc-next
Compiler:
powerpc-gcc5
(powerpc64-linux-gcc (GCC) 5.5.0 / GNU ld (GNU Binutils) 2.29.1.20170915)
Config:
mpc86xx_defconfig
(
download
)
Log:
Download original
Possible warnings (11)
<stdin>:1478:2: warning: #warning syscall pidfd_send_signal not implemented [-Wcpp] <stdin>:1481:2: warning: #warning syscall io_uring_setup not implemented [-Wcpp] <stdin>:1484:2: warning: #warning syscall io_uring_enter not implemented [-Wcpp] <stdin>:1487:2: warning: #warning syscall io_uring_register not implemented [-Wcpp] kernel/futex.c:1658:17: warning: 'oldval' may be used uninitialized in this function [-Wmaybe-uninitialized] arch/powerpc/boot/dts/fsl/mvme7100.dts:140.22-142.4: Warning (pci_bridge): /pcie@f1008000: missing ranges for PCI bridge (or not a bridge) arch/powerpc/boot/dts/fsl/mpc8641si-post.dtsi:107.9-121.4: Warning (pci_bridge): /pcie@f1008000/pcie@0: missing ranges for PCI bridge (or not a bridge) arch/powerpc/boot/dts/fsl/mvme7100.dts:144.22-146.4: Warning (pci_bridge): /pcie@f1009000: missing ranges for PCI bridge (or not a bridge) arch/powerpc/boot/dts/fsl/mpc8641si-post.dtsi:134.9-148.4: Warning (pci_bridge): /pcie@f1009000/pcie@0: missing ranges for PCI bridge (or not a bridge) arch/powerpc/boot/dts/fsl/mvme7100.dtb: Warning (pci_device_bus_num): Failed prerequisite 'pci_bridge' arch/powerpc/boot/dts/fsl/mvme7100.dts:35.11-37.6: Warning (i2c_bus_reg): /soc@f1000000/i2c@3000/rtc@68: missing or empty reg property
Full Log
# git rev-parse -q --verify 8150a153c013aa2dd1ffae43370b89ac1347a7fb^{commit} 8150a153c013aa2dd1ffae43370b89ac1347a7fb already have revision, skipping fetch # git checkout -q -f -B kisskb 8150a153c013aa2dd1ffae43370b89ac1347a7fb # git clean -qxdf # < git log -1 # commit 8150a153c013aa2dd1ffae43370b89ac1347a7fb # Author: Michael Ellerman <mpe@ellerman.id.au> # Date: Wed May 8 13:06:42 2019 +1000 # # powerpc/64s: Use early_mmu_has_feature() in set_kuap() # # When implementing the KUAP support on Radix we fixed one case where # mmu_has_feature() was being called too early in boot via # __put_user_size(). # # However since then some new code in linux-next has created a new path # via which we can end up calling mmu_has_feature() too early. # # On P9 this leads to crashes early in boot if we have both PPC_KUAP and # CONFIG_JUMP_LABEL_FEATURE_CHECK_DEBUG enabled. Our early boot code # calls printk() which calls probe_kernel_read(), that does a # __copy_from_user_inatomic() which calls into set_kuap() and that uses # mmu_has_feature(). # # At that point in boot we haven't patched MMU features yet so the debug # code in mmu_has_feature() complains, and calls printk(). At that point # we recurse, eg: # # ... # dump_stack+0xdc # probe_kernel_read+0x1a4 # check_pointer+0x58 # ... # printk+0x40 # dump_stack_print_info+0xbc # dump_stack+0x8 # probe_kernel_read+0x1a4 # probe_kernel_read+0x19c # check_pointer+0x58 # ... # printk+0x40 # cpufeatures_process_feature+0xc8 # scan_cpufeatures_subnodes+0x380 # of_scan_flat_dt_subnodes+0xb4 # dt_cpu_ftrs_scan_callback+0x158 # of_scan_flat_dt+0xf0 # dt_cpu_ftrs_scan+0x3c # early_init_devtree+0x360 # early_setup+0x9c # # And so on for infinity, symptom is a dead system. # # Even more fun is what happens when using the hash MMU (ie. p8 or p9 # with Radix disabled), and when we don't have # CONFIG_JUMP_LABEL_FEATURE_CHECK_DEBUG enabled. With the debug disabled # we don't check if static keys have been initialised, we just rely on # the jump label. But the jump label defaults to true so we just whack # the AMR even though Radix is not enabled. # # Clearing the AMR is fine, but after we've done the user copy we write # (0b11 << 62) into AMR. When using hash that makes all pages with key # zero no longer readable or writable. All kernel pages implicitly have # key zero, and so all of a sudden the kernel can't read or write any of # its memory. Again dead system. # # In the medium term we have several options for fixing this. # probe_kernel_read() doesn't need to touch AMR at all, it's not doing a # user access after all, but it uses __copy_from_user_inatomic() just # because it's easy, we could fix that. # # It would also be safe to default to not writing to the AMR during # early boot, until we've detected features. But it's not clear that # flipping all the MMU features to static_key_false won't introduce # other bugs. # # But for now just switch to early_mmu_has_feature() in set_kuap(), that # avoids all the problems with jump labels. It adds the overhead of a # global lookup and test, but that's probably trivial compared to the # writes to the AMR anyway. # # Fixes: 890274c2dc4c ("powerpc/64s: Implement KUAP for Radix MMU") # Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> # Reviewed-by: Russell Currey <ruscur@russell.cc> # < /opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld --version # < git log --format=%s --max-count=1 8150a153c013aa2dd1ffae43370b89ac1347a7fb # < make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-next_mpc86xx_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- mpc86xx_defconfig # make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-next_mpc86xx_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- <stdin>:1478:2: warning: #warning syscall pidfd_send_signal not implemented [-Wcpp] <stdin>:1481:2: warning: #warning syscall io_uring_setup not implemented [-Wcpp] <stdin>:1484:2: warning: #warning syscall io_uring_enter not implemented [-Wcpp] <stdin>:1487:2: warning: #warning syscall io_uring_register not implemented [-Wcpp] /kisskb/src/kernel/futex.c: In function 'do_futex': /kisskb/src/kernel/futex.c:1658:17: warning: 'oldval' may be used uninitialized in this function [-Wmaybe-uninitialized] return oldval == cmparg; ^ /kisskb/src/kernel/futex.c:1633:6: note: 'oldval' was declared here int oldval, ret; ^ /kisskb/src/arch/powerpc/boot/dts/fsl/mvme7100.dts:140.22-142.4: Warning (pci_bridge): /pcie@f1008000: missing ranges for PCI bridge (or not a bridge) also defined at /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8641si-post.dtsi:97.7-122.3 /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8641si-post.dtsi:107.9-121.4: Warning (pci_bridge): /pcie@f1008000/pcie@0: missing ranges for PCI bridge (or not a bridge) /kisskb/src/arch/powerpc/boot/dts/fsl/mvme7100.dts:144.22-146.4: Warning (pci_bridge): /pcie@f1009000: missing ranges for PCI bridge (or not a bridge) also defined at /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8641si-post.dtsi:124.7-149.3 /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8641si-post.dtsi:134.9-148.4: Warning (pci_bridge): /pcie@f1009000/pcie@0: missing ranges for PCI bridge (or not a bridge) arch/powerpc/boot/dts/fsl/mvme7100.dtb: Warning (pci_device_bus_num): Failed prerequisite 'pci_bridge' /kisskb/src/arch/powerpc/boot/dts/fsl/mvme7100.dts:35.11-37.6: Warning (i2c_bus_reg): /soc@f1000000/i2c@3000/rtc@68: missing or empty reg property INFO: Uncompressed kernel (size 0xa34f68) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xb00000) Image Name: Linux-5.1.0-rc3-g8150a153c013 Created: Fri May 10 03:23:59 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5046681 Bytes = 4928.40 KiB = 4.81 MiB Load Address: 00000000 Entry Point: 00000000 Completed OK # rm -rf /kisskb/build/powerpc-next_mpc86xx_defconfig_powerpc-gcc5 # Build took: 0:01:49.054595
© Michael Ellerman 2006-2018.