# git rev-parse -q --verify 200a8ef398b452a9ba7e4a45b9fa1abf9b9b298f^{commit} 200a8ef398b452a9ba7e4a45b9fa1abf9b9b298f already have revision, skipping fetch # git checkout -q -f -B kisskb 200a8ef398b452a9ba7e4a45b9fa1abf9b9b298f # git clean -qxdf # < git log -1 # commit 200a8ef398b452a9ba7e4a45b9fa1abf9b9b298f # Author: Daniel Axtens # Date: Thu Feb 21 14:03:45 2019 +0000 # # powerpc: KASAN for 64bit Book3E # # 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 a 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 kasan_arch_is_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. # # Lightly 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 # Signed-off-by: Christophe Leroy # < /opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux-gcc --version # < /opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux-ld --version # < git log --format=%s --max-count=1 200a8ef398b452a9ba7e4a45b9fa1abf9b9b298f # < make -s -j 120 ARCH=powerpc O=/kisskb/build/chleroy_powerpc-randconfig_powerpc-gcc4.6 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- randconfig KCONFIG_SEED=0xB576DC84 # Added to kconfig CONFIG_STANDALONE=y # Added to kconfig CONFIG_BUILD_DOCSRC=n # Added to kconfig CONFIG_MODULE_SIG=n # Added to kconfig CONFIG_CPU_BIG_ENDIAN=y # Added to kconfig CONFIG_PPC64=y # Added to kconfig CONFIG_PPC_DISABLE_WERROR=y # Added to kconfig CONFIG_SECTION_MISMATCH_WARN_ONLY=y # Added to kconfig CONFIG_PREVENT_FIRMWARE_BUILD=y # Added to kconfig CONFIG_CC_STACKPROTECTOR_STRONG=n # Added to kconfig CONFIG_GCC_PLUGINS=n # Added to kconfig CONFIG_LD_HEAD_STUB_CATCH=y # Added to kconfig # yes \n | make -s -j 120 ARCH=powerpc O=/kisskb/build/chleroy_powerpc-randconfig_powerpc-gcc4.6 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- oldconfig yes: standard output: Broken pipe # make -s -j 120 ARCH=powerpc O=/kisskb/build/chleroy_powerpc-randconfig_powerpc-gcc4.6 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- /kisskb/src/kernel/printk/printk.c: In function 'devkmsg_sysctl_set_loglvl': /kisskb/src/kernel/printk/printk.c:186:16: warning: 'old' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/arch/powerpc/lib/mem_64.S: Assembler messages: /kisskb/src/arch/powerpc/lib/mem_64.S:35: Error: Unrecognized opcode: `_global_kasan(memset)' /kisskb/src/arch/powerpc/lib/mem_64.S:100: Error: Unrecognized opcode: `export_symbol_kasan(memset)' /kisskb/src/arch/powerpc/lib/mem_64.S:102: Error: Unrecognized opcode: `_global_toc_kasan(memmove)' /kisskb/src/arch/powerpc/lib/mem_64.S:143: Error: Unrecognized opcode: `export_symbol_kasan(memmove)' make[3]: *** [/kisskb/src/scripts/Makefile.build:367: arch/powerpc/lib/mem_64.o] Error 1 make[3]: *** Waiting for unfinished jobs.... /kisskb/src/kernel/cgroup/cgroup-v1.c: In function 'cgroup1_mount': /kisskb/src/kernel/cgroup/cgroup-v1.c:1263:20: warning: 'root' may be used uninitialized in this function [-Wuninitialized] In file included from /kisskb/src/arch/powerpc/include/asm/kasan.h:19:0, from /kisskb/src/arch/powerpc/kernel/setup-common.c:70: /kisskb/src/arch/powerpc/include/asm/pgtable-types.h:9:37: error: conflicting types for 'pte_t' /kisskb/src/arch/powerpc/include/asm/pgtable-be-types.h:8:32: note: previous declaration of 'pte_t' was here /kisskb/src/arch/powerpc/include/asm/pgtable-types.h:11:0: warning: "__pte" redefined [enabled by default] /kisskb/src/arch/powerpc/include/asm/pgtable-be-types.h:9:0: note: this is the location of the previous definition /kisskb/src/arch/powerpc/include/asm/pgtable-types.h:12:27: error: conflicting types for 'pte_val' /kisskb/src/arch/powerpc/include/asm/pgtable-be-types.h:11:29: note: previous definition of 'pte_val' was here /kisskb/src/arch/powerpc/include/asm/pgtable-types.h:19:39: error: conflicting types for 'pmd_t' /kisskb/src/arch/powerpc/include/asm/pgtable-be-types.h:23:32: note: previous declaration of 'pmd_t' was here /kisskb/src/arch/powerpc/include/asm/pgtable-types.h:20:0: warning: "__pmd" redefined [enabled by default] /kisskb/src/arch/powerpc/include/asm/pgtable-be-types.h:24:0: note: this is the location of the previous definition /kisskb/src/arch/powerpc/include/asm/pgtable-types.h:21:29: error: conflicting types for 'pmd_val' /kisskb/src/arch/powerpc/include/asm/pgtable-be-types.h:26:29: note: previous definition of 'pmd_val' was here /kisskb/src/arch/powerpc/include/asm/pgtable-types.h:31:39: error: conflicting types for 'pud_t' /kisskb/src/arch/powerpc/include/asm/pgtable-be-types.h:41:32: note: previous declaration of 'pud_t' was here /kisskb/src/arch/powerpc/include/asm/pgtable-types.h:32:0: warning: "__pud" redefined [enabled by default] /kisskb/src/arch/powerpc/include/asm/pgtable-be-types.h:42:0: note: this is the location of the previous definition /kisskb/src/arch/powerpc/include/asm/pgtable-types.h:33:29: error: conflicting types for 'pud_val' /kisskb/src/arch/powerpc/include/asm/pgtable-be-types.h:44:29: note: previous definition of 'pud_val' was here /kisskb/src/arch/powerpc/include/asm/pgtable-types.h:41:39: error: conflicting types for 'pgd_t' /kisskb/src/arch/powerpc/include/asm/pgtable-be-types.h:58:32: note: previous declaration of 'pgd_t' was here /kisskb/src/arch/powerpc/include/asm/pgtable-types.h:42:0: warning: "__pgd" redefined [enabled by default] /kisskb/src/arch/powerpc/include/asm/pgtable-be-types.h:59:0: note: this is the location of the previous definition /kisskb/src/arch/powerpc/include/asm/pgtable-types.h:43:29: error: conflicting types for 'pgd_val' /kisskb/src/arch/powerpc/include/asm/pgtable-be-types.h:61:29: note: previous definition of 'pgd_val' was here /kisskb/src/arch/powerpc/include/asm/pgtable-types.h:49:42: error: conflicting types for 'pgprot_t' /kisskb/src/arch/powerpc/include/asm/pgtable-be-types.h:72:42: note: previous declaration of 'pgprot_t' was here /kisskb/src/arch/powerpc/include/asm/pgtable-types.h:60:31: error: conflicting types for 'real_pte_t' /kisskb/src/arch/powerpc/include/asm/pgtable-be-types.h:83:31: note: previous declaration of 'real_pte_t' was here /kisskb/src/arch/powerpc/include/asm/pgtable-types.h:66:20: error: conflicting types for 'pte_xchg' /kisskb/src/arch/powerpc/include/asm/pgtable-be-types.h:86:20: note: previous definition of 'pte_xchg' was here /kisskb/src/arch/powerpc/include/asm/pgtable-types.h:75:38: error: conflicting types for 'hugepd_t' /kisskb/src/arch/powerpc/include/asm/pgtable-be-types.h:109:33: note: previous declaration of 'hugepd_t' was here /kisskb/src/arch/powerpc/include/asm/pgtable-types.h:76:0: warning: "__hugepd" redefined [enabled by default] /kisskb/src/arch/powerpc/include/asm/pgtable-be-types.h:110:0: note: this is the location of the previous definition /kisskb/src/arch/powerpc/include/asm/pgtable-types.h:77:29: error: conflicting types for 'hpd_val' /kisskb/src/arch/powerpc/include/asm/pgtable-be-types.h:112:29: note: previous definition of 'hpd_val' was here make[3]: *** [/kisskb/src/scripts/Makefile.build:277: arch/powerpc/kernel/setup-common.o] Error 1 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [/kisskb/src/scripts/Makefile.build:492: arch/powerpc/lib] Error 2 make[2]: *** Waiting for unfinished jobs.... make[2]: *** [/kisskb/src/scripts/Makefile.build:492: arch/powerpc/kernel] Error 2 /kisskb/src/drivers/base/regmap/regmap.c: In function '_regmap_raw_write': /kisskb/src/drivers/base/regmap/regmap.c:1855:6: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/base/regmap/regmap.c: In function 'regmap_raw_read': /kisskb/src/drivers/base/regmap/regmap.c:2594:6: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] make[1]: *** [/kisskb/src/Makefile:1043: arch/powerpc] Error 2 make[1]: *** Waiting for unfinished jobs.... /kisskb/src/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c: In function 'amdgpu_set_pp_od_clk_voltage': /kisskb/src/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c:593:5: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/mfd/arizona-core.c: In function 'arizona_dev_init': /kisskb/src/drivers/mfd/arizona-core.c:1422:6: warning: 'n_subdevs' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/i2c/i2c-core-base.c: In function 'i2c_generic_scl_recovery': /kisskb/src/drivers/i2c/i2c-core-base.c:235:5: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c: In function 'gmc_v8_0_process_interrupt': /kisskb/src/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c:1474:10: warning: missing braces around initializer [-Wmissing-braces] /kisskb/src/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c:1474:10: warning: (near initialization for 'task_info.process_name') [-Wmissing-braces] /kisskb/src/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c: In function 'gmc_v9_0_process_interrupt': /kisskb/src/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c:323:10: warning: missing braces around initializer [-Wmissing-braces] /kisskb/src/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c:323:10: warning: (near initialization for 'task_info.process_name') [-Wmissing-braces] /kisskb/src/net/bridge/br_netlink.c: In function 'br_afspec': /kisskb/src/net/bridge/br_netlink.c:652:7: warning: 'err' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/usb/misc/usbtest.c: In function 'test_queue': /kisskb/src/drivers/usb/misc/usbtest.c:2128:1: warning: the frame size of 1232 bytes is larger than 1024 bytes [-Wframe-larger-than=] /kisskb/src/drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 'amdgpu_dm_do_flip': /kisskb/src/drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4591:9: warning: missing braces around initializer [-Wmissing-braces] /kisskb/src/drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4591:9: warning: (near initialization for 'stream_update.src') [-Wmissing-braces] /kisskb/src/drivers/gpu/drm/nouveau/nvkm/subdev/top/gk104.c: In function 'gk104_top_oneinit': /kisskb/src/drivers/gpu/drm/nouveau/nvkm/subdev/top/gk104.c:90:20: warning: 'inst' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/gpu/drm/nouveau/nvkm/subdev/top/gk104.c:76:3: warning: 'type' may be used uninitialized in this function [-Wuninitialized] make: *** [Makefile:152: sub-make] Error 2 Command 'make -s -j 120 ARCH=powerpc O=/kisskb/build/chleroy_powerpc-randconfig_powerpc-gcc4.6 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- ' returned non-zero exit status 2 # rm -rf /kisskb/build/chleroy_powerpc-randconfig_powerpc-gcc4.6 # Build took: 0:01:28.605248