# git rev-parse -q --verify 3e97aba429c769bd99ccd8d6f16eda98f7d378a7^{commit} 3e97aba429c769bd99ccd8d6f16eda98f7d378a7 already have revision, skipping fetch # git checkout -q -f -B kisskb 3e97aba429c769bd99ccd8d6f16eda98f7d378a7 # git clean -qxdf # < git log -1 # commit 3e97aba429c769bd99ccd8d6f16eda98f7d378a7 # Author: Christophe Leroy # Date: Tue Mar 12 21:58:57 2019 +0000 # # powerpc: KASAN for 64bit Book3E # # From: Daniel Axtens # # Wire up KASAN. Only outline instrumentation is supported. # # The KASAN shadow area is mapped into vmemmap space: # 0x8000 0400 0000 0000 to 0x8000 0600 0000 0000. # To do this we require that vmemmap be disabled. (This is the default # in the kernel config that QorIQ provides for the machine in their # SDK anyway - they use flat memory.) # # Only the kernel linear mapping (0xc000...) is checked. The vmalloc and # ioremap areas (also in 0x800...) are all mapped to the zero page. As # with the Book3S hash series, this requires overriding the memory <-> # shadow mapping. # # Also, as with both previous 64-bit series, early instrumentation is not # supported. It would allow us to drop the check_return_arch_not_ready() # hook in the KASAN core, but it's tricky to get it set up early enough: # we need it setup before the first call to instrumented code like printk(). # Perhaps in the future. # # Only KASAN_MINIMAL works. # # Tested on e6500. KVM, kexec and xmon have not been tested. # # The test_kasan module fires warnings as expected, except for the # following tests: # # - Expected/by design: # kasan test: memcg_accounted_kmem_cache allocate memcg accounted object # # - Due to only supporting KASAN_MINIMAL: # kasan test: kasan_stack_oob out-of-bounds on stack # kasan test: kasan_global_oob out-of-bounds global variable # kasan test: kasan_alloca_oob_left out-of-bounds to left on alloca # kasan test: kasan_alloca_oob_right out-of-bounds to right on alloca # kasan test: use_after_scope_test use-after-scope on int # kasan test: use_after_scope_test use-after-scope on array # # Thanks to those who have done the heavy lifting over the past several # years: # - Christophe's 32 bit series: https://lists.ozlabs.org/pipermail/linuxppc-dev/2019-February/185379.html # - Aneesh's Book3S hash series: https://lwn.net/Articles/655642/ # - Balbir's Book3S radix series: https://patchwork.ozlabs.org/patch/795211/ # # Cc: Christophe Leroy # Cc: Aneesh Kumar K.V # Cc: Balbir Singh # Signed-off-by: Daniel Axtens # [- Removed EXPORT_SYMBOL of the static key # - Fixed most checkpatch problems # - Replaced kasan_zero_page[] by kasan_early_shadow_page[] # - Reduced casting mess by using intermediate locals # - Fixed build failure on pmac32_defconfig] # Signed-off-by: Christophe Leroy # < /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 3e97aba429c769bd99ccd8d6f16eda98f7d378a7 # < make -s -j 8 ARCH=powerpc O=/kisskb/build/chleroy_mpc85xx_smp_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- mpc85xx_smp_defconfig # make -s -j 8 ARCH=powerpc O=/kisskb/build/chleroy_mpc85xx_smp_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- In file included from /kisskb/src/include/linux/kernel.h:10:0, from /kisskb/src/include/linux/list.h:9, from /kisskb/src/include/linux/module.h:9, from /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c:15: /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c: In function 'allocate_bd': /kisskb/src/include/linux/err.h:22:49: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO) ^ /kisskb/src/include/linux/compiler.h:77:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c:139:6: note: in expansion of macro 'IS_ERR_VALUE' if (IS_ERR_VALUE(fep->ring_mem_addr)) ^ /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8541cds.dts:334.3-21: Warning (pci_device_bus_num): /pci@e0008000/i8259@19000:bus-range: PCI bus number 1 out of range, expected (0 - 0) /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8555cds.dts:334.3-21: Warning (pci_device_bus_num): /pci@e0008000/i8259@19000:bus-range: PCI bus number 1 out of range, expected (0 - 0) INFO: Uncompressed kernel (size 0xc37904) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc37904) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc37904) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc37904) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc37904) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc37904) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc37904) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc270d0) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) Image Name: Linux-5.0.0-g3e97aba429c7 Created: Wed Mar 13 17:35:25 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6007879 Bytes = 5867.07 KiB = 5.73 MiB Load Address: 00000000 Entry Point: 00000000 Image Name: Linux-5.0.0-g3e97aba429c7 Created: Wed Mar 13 17:35:25 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6037778 Bytes = 5896.27 KiB = 5.76 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-5.0.0-g3e97aba429c7 Created: Wed Mar 13 17:35:25 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6037730 Bytes = 5896.22 KiB = 5.76 MiB Load Address: 00d00000 Entry Point: 00d002a4 INFO: Uncompressed kernel (size 0xc37904) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) Image Name: Linux-5.0.0-g3e97aba429c7 Created: Wed Mar 13 17:35:25 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6038385 Bytes = 5896.86 KiB = 5.76 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-5.0.0-g3e97aba429c7 Created: Wed Mar 13 17:35:25 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6037566 Bytes = 5896.06 KiB = 5.76 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-5.0.0-g3e97aba429c7 Created: Wed Mar 13 17:35:25 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6037728 Bytes = 5896.22 KiB = 5.76 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-5.0.0-g3e97aba429c7 Created: Wed Mar 13 17:35:25 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6038131 Bytes = 5896.61 KiB = 5.76 MiB Load Address: 00d00000 Entry Point: 00d002a4 INFO: Uncompressed kernel (size 0xc37904) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc37904) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc37904) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) Image Name: Linux-5.0.0-g3e97aba429c7 Created: Wed Mar 13 17:35:25 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6037764 Bytes = 5896.25 KiB = 5.76 MiB Load Address: 00d00000 Entry Point: 00d00314 INFO: Uncompressed kernel (size 0xc37904) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc37904) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc37904) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc37904) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) Image Name: Linux-5.0.0-g3e97aba429c7 Created: Wed Mar 13 17:35:28 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6038437 Bytes = 5896.91 KiB = 5.76 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-5.0.0-g3e97aba429c7 Created: Wed Mar 13 17:35:28 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6037567 Bytes = 5896.06 KiB = 5.76 MiB Load Address: 00d00000 Entry Point: 00d00314 Image Name: Linux-5.0.0-g3e97aba429c7 Created: Wed Mar 13 17:35:28 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6038292 Bytes = 5896.77 KiB = 5.76 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-5.0.0-g3e97aba429c7 Created: Wed Mar 13 17:35:28 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6037568 Bytes = 5896.06 KiB = 5.76 MiB Load Address: 00d00000 Entry Point: 00d00314 Image Name: Linux-5.0.0-g3e97aba429c7 Created: Wed Mar 13 17:35:28 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6037786 Bytes = 5896.28 KiB = 5.76 MiB Load Address: 00d00000 Entry Point: 00d00314 Image Name: Linux-5.0.0-g3e97aba429c7 Created: Wed Mar 13 17:35:28 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6037416 Bytes = 5895.91 KiB = 5.76 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-5.0.0-g3e97aba429c7 Created: Wed Mar 13 17:35:28 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6037765 Bytes = 5896.25 KiB = 5.76 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-5.0.0-g3e97aba429c7 Created: Wed Mar 13 17:35:28 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6037589 Bytes = 5896.08 KiB = 5.76 MiB Load Address: 00d00000 Entry Point: 00d00314 Completed OK # rm -rf /kisskb/build/chleroy_mpc85xx_smp_defconfig_powerpc-gcc5 # Build took: 0:02:39.384882