diff mbox series

[v2,5/5] powerpc: kcsan: Add KCSAN Support

Message ID 20230201043438.1301212-6-rmclure@linux.ibm.com (mailing list archive)
State Superseded
Headers show
Series powerpc: Add KCSAN support | expand

Checks

Context Check Description
snowpatch_ozlabs/github-powerpc_selftests success Successfully ran 8 jobs.
snowpatch_ozlabs/github-powerpc_ppctests success Successfully ran 8 jobs.
snowpatch_ozlabs/github-powerpc_sparse success Successfully ran 4 jobs.
snowpatch_ozlabs/github-powerpc_clang success Successfully ran 6 jobs.
snowpatch_ozlabs/github-powerpc_kernel_qemu success Successfully ran 24 jobs.

Commit Message

Rohan McLure Feb. 1, 2023, 4:34 a.m. UTC
Enable HAVE_ARCH_KCSAN on all powerpc platforms, permitting use of the
kernel concurrency sanitiser through the CONFIG_KCSAN_* kconfig options.

See documentation in Documentation/dev-tools/kcsan.rst for more
information.

Signed-off-by: Rohan McLure <rmclure@linux.ibm.com>
---
 arch/powerpc/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

kernel test robot Feb. 4, 2023, 12:10 p.m. UTC | #1
Hi Rohan,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on powerpc/next]
[also build test ERROR on powerpc/fixes linus/master v6.2-rc6]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Rohan-McLure/powerpc-kcsan-Add-exclusions-from-instrumentation/20230201-124058
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
patch link:    https://lore.kernel.org/r/20230201043438.1301212-6-rmclure%40linux.ibm.com
patch subject: [PATCH v2 5/5] powerpc: kcsan: Add KCSAN Support
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20230204/202302042021.oZyM71gG-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/c8579715105b6133b440d383ce4ab7844c12ab94
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Rohan-McLure/powerpc-kcsan-Add-exclusions-from-instrumentation/20230201-124058
        git checkout c8579715105b6133b440d383ce4ab7844c12ab94
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   powerpc-linux-ld: kernel/kcsan/core.o: in function `__tsan_atomic64_load':
>> core.c:(.text.__tsan_atomic64_load+0x258): undefined reference to `__atomic_load_8'
   powerpc-linux-ld: kernel/kcsan/core.o: in function `__tsan_atomic64_store':
>> core.c:(.text.__tsan_atomic64_store+0x278): undefined reference to `__atomic_store_8'
   powerpc-linux-ld: kernel/kcsan/core.o: in function `__tsan_atomic64_exchange':
>> core.c:(.text.__tsan_atomic64_exchange+0x278): undefined reference to `__atomic_exchange_8'
   powerpc-linux-ld: kernel/kcsan/core.o: in function `__tsan_atomic64_fetch_add':
>> core.c:(.text.__tsan_atomic64_fetch_add+0x278): undefined reference to `__atomic_fetch_add_8'
   powerpc-linux-ld: kernel/kcsan/core.o: in function `__tsan_atomic64_fetch_sub':
>> core.c:(.text.__tsan_atomic64_fetch_sub+0x278): undefined reference to `__atomic_fetch_sub_8'
   powerpc-linux-ld: kernel/kcsan/core.o: in function `__tsan_atomic64_fetch_and':
>> core.c:(.text.__tsan_atomic64_fetch_and+0x278): undefined reference to `__atomic_fetch_and_8'
   powerpc-linux-ld: kernel/kcsan/core.o: in function `__tsan_atomic64_fetch_or':
>> core.c:(.text.__tsan_atomic64_fetch_or+0x278): undefined reference to `__atomic_fetch_or_8'
   powerpc-linux-ld: kernel/kcsan/core.o: in function `__tsan_atomic64_fetch_xor':
>> core.c:(.text.__tsan_atomic64_fetch_xor+0x278): undefined reference to `__atomic_fetch_xor_8'
   powerpc-linux-ld: kernel/kcsan/core.o: in function `__tsan_atomic64_fetch_nand':
>> core.c:(.text.__tsan_atomic64_fetch_nand+0x278): undefined reference to `__atomic_fetch_nand_8'
   powerpc-linux-ld: kernel/kcsan/core.o: in function `__tsan_atomic64_compare_exchange_strong':
>> core.c:(.text.__tsan_atomic64_compare_exchange_strong+0x26c): undefined reference to `__atomic_compare_exchange_8'
   powerpc-linux-ld: kernel/kcsan/core.o: in function `__tsan_atomic64_compare_exchange_weak':
>> core.c:(.text.__tsan_atomic64_compare_exchange_weak+0x26c): undefined reference to `__atomic_compare_exchange_8'
   powerpc-linux-ld: kernel/kcsan/core.o: in function `__tsan_atomic64_compare_exchange_val':
>> core.c:(.text.__tsan_atomic64_compare_exchange_val+0x26c): undefined reference to `__atomic_compare_exchange_8'
diff mbox series

Patch

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index b8c4ac56bddc..66c777c78677 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -198,6 +198,7 @@  config PPC
 	select HAVE_ARCH_KASAN			if PPC_RADIX_MMU
 	select HAVE_ARCH_KASAN			if PPC_BOOK3E_64
 	select HAVE_ARCH_KASAN_VMALLOC		if HAVE_ARCH_KASAN
+	select HAVE_ARCH_KCSAN
 	select HAVE_ARCH_KFENCE			if ARCH_SUPPORTS_DEBUG_PAGEALLOC
 	select HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
 	select HAVE_ARCH_KGDB