# git rev-parse -q --verify b791d1bdf9212d944d749a5c7ff6febdba241771^{commit} b791d1bdf9212d944d749a5c7ff6febdba241771 already have revision, skipping fetch # git checkout -q -f -B kisskb b791d1bdf9212d944d749a5c7ff6febdba241771 # git clean -qxdf # < git log -1 # commit b791d1bdf9212d944d749a5c7ff6febdba241771 # Merge: 9716e57a0195 1f44328ea24c # Author: Linus Torvalds # Date: Thu Jun 11 18:55:43 2020 -0700 # # Merge tag 'locking-kcsan-2020-06-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip # # Pull the Kernel Concurrency Sanitizer from Thomas Gleixner: # "The Kernel Concurrency Sanitizer (KCSAN) is a dynamic race detector, # which relies on compile-time instrumentation, and uses a # watchpoint-based sampling approach to detect races. # # The feature was under development for quite some time and has already # found legitimate bugs. # # Unfortunately it comes with a limitation, which was only understood # late in the development cycle: # # It requires an up to date CLANG-11 compiler # # CLANG-11 is not yet released (scheduled for June), but it's the only # compiler today which handles the kernel requirements and especially # the annotations of functions to exclude them from KCSAN # instrumentation correctly. # # These annotations really need to work so that low level entry code and # especially int3 text poke handling can be completely isolated. # # A detailed discussion of the requirements and compiler issues can be # found here: # # https://lore.kernel.org/lkml/CANpmjNMTsY_8241bS7=XAfqvZHFLrVEkv_uM4aDUWE_kh3Rvbw@mail.gmail.com/ # # We came to the conclusion that trying to work around compiler # limitations and bugs again would end up in a major trainwreck, so # requiring a working compiler seemed to be the best choice. # # For Continous Integration purposes the compiler restriction is # manageable and that's where most xxSAN reports come from. # # For a change this limitation might make GCC people actually look at # their bugs. Some issues with CSAN in GCC are 7 years old and one has # been 'fixed' 3 years ago with a half baken solution which 'solved' the # reported issue but not the underlying problem. # # The KCSAN developers also ponder to use a GCC plugin to become # independent, but that's not something which will show up in a few # days. # # Blocking KCSAN until wide spread compiler support is available is not # a really good alternative because the continuous growth of lockless # optimizations in the kernel demands proper tooling support" # # * tag 'locking-kcsan-2020-06-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (76 commits) # compiler_types.h, kasan: Use __SANITIZE_ADDRESS__ instead of CONFIG_KASAN to decide inlining # compiler.h: Move function attributes to compiler_types.h # compiler.h: Avoid nested statement expression in data_race() # compiler.h: Remove data_race() and unnecessary checks from {READ,WRITE}_ONCE() # kcsan: Update Documentation to change supported compilers # kcsan: Remove 'noinline' from __no_kcsan_or_inline # kcsan: Pass option tsan-instrument-read-before-write to Clang # kcsan: Support distinguishing volatile accesses # kcsan: Restrict supported compilers # kcsan: Avoid inserting __tsan_func_entry/exit if possible # ubsan, kcsan: Don't combine sanitizer with kcov on clang # objtool, kcsan: Add kcsan_disable_current() and kcsan_enable_current_nowarn() # kcsan: Add __kcsan_{enable,disable}_current() variants # checkpatch: Warn about data_race() without comment # kcsan: Use GFP_ATOMIC under spin lock # Improve KCSAN documentation a bit # kcsan: Make reporting aware of KCSAN tests # kcsan: Fix function matching in report # kcsan: Change data_race() to no longer require marking racing accesses # kcsan: Move kcsan_{disable,enable}_current() to kcsan-checks.h # ... # < /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/m68k-linux/bin/m68k-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/m68k-linux/bin/m68k-linux-ld --version # < git log --format=%s --max-count=1 b791d1bdf9212d944d749a5c7ff6febdba241771 # < make -s -j 20 ARCH=m68k O=/kisskb/build/linus_sun3_defconfig_m68k-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/m68k-linux/bin/m68k-linux- sun3_defconfig WARNING: unmet direct dependencies detected for NEED_MULTIPLE_NODES Depends on [n]: DISCONTIGMEM [=n] || NUMA Selected by [y]: - SINGLE_MEMORY_CHUNK [=y] && MMU [=y] WARNING: unmet direct dependencies detected for NEED_MULTIPLE_NODES Depends on [n]: DISCONTIGMEM [=n] || NUMA Selected by [y]: - SINGLE_MEMORY_CHUNK [=y] && MMU [=y] # < make -s -j 20 ARCH=m68k O=/kisskb/build/linus_sun3_defconfig_m68k-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/m68k-linux/bin/m68k-linux- help # make -s -j 20 ARCH=m68k O=/kisskb/build/linus_sun3_defconfig_m68k-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/m68k-linux/bin/m68k-linux- olddefconfig WARNING: unmet direct dependencies detected for NEED_MULTIPLE_NODES Depends on [n]: DISCONTIGMEM [=n] || NUMA Selected by [y]: - SINGLE_MEMORY_CHUNK [=y] && MMU [=y] WARNING: unmet direct dependencies detected for NEED_MULTIPLE_NODES Depends on [n]: DISCONTIGMEM [=n] || NUMA Selected by [y]: - SINGLE_MEMORY_CHUNK [=y] && MMU [=y] # make -s -j 20 ARCH=m68k O=/kisskb/build/linus_sun3_defconfig_m68k-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/m68k-linux/bin/m68k-linux- In file included from /kisskb/src/arch/m68k/include/asm/atomic.h:7, from /kisskb/src/include/linux/atomic.h:7, from /kisskb/src/include/linux/spinlock.h:460, from /kisskb/src/include/linux/seqlock.h:36, from /kisskb/src/include/linux/time.h:6, from /kisskb/src/include/linux/stat.h:19, from /kisskb/src/include/linux/module.h:13, from /kisskb/src/net/core/filter.c:20: /kisskb/src/net/core/filter.c: In function 'bpf_clear_redirect_map': /kisskb/src/arch/m68k/include/asm/cmpxchg.h:137:3: warning: value computed is not used [-Wunused-value] ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\ ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long)(n), sizeof(*(ptr)))) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /kisskb/src/include/asm-generic/cmpxchg.h:106:28: note: in expansion of macro 'cmpxchg_local' #define cmpxchg(ptr, o, n) cmpxchg_local((ptr), (o), (n)) ^~~~~~~~~~~~~ /kisskb/src/net/core/filter.c:3567:4: note: in expansion of macro 'cmpxchg' cmpxchg(&ri->map, map, NULL); ^~~~~~~ In file included from /kisskb/src/arch/m68k/include/asm/atomic.h:7, from /kisskb/src/include/linux/atomic.h:7, from /kisskb/src/include/linux/spinlock.h:460, from /kisskb/src/include/linux/mmzone.h:8, from /kisskb/src/include/linux/gfp.h:6, from /kisskb/src/include/linux/mm.h:10, from /kisskb/src/kernel/acct.c:47: /kisskb/src/kernel/acct.c: In function 'acct_pin_kill': /kisskb/src/arch/m68k/include/asm/cmpxchg.h:137:3: warning: value computed is not used [-Wunused-value] ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\ ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long)(n), sizeof(*(ptr)))) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /kisskb/src/include/asm-generic/cmpxchg.h:106:28: note: in expansion of macro 'cmpxchg_local' #define cmpxchg(ptr, o, n) cmpxchg_local((ptr), (o), (n)) ^~~~~~~~~~~~~ /kisskb/src/kernel/acct.c:177:2: note: in expansion of macro 'cmpxchg' cmpxchg(&acct->ns->bacct, pin, NULL); ^~~~~~~ In file included from /kisskb/src/arch/m68k/include/asm/atomic.h:7, from /kisskb/src/include/linux/atomic.h:7, from /kisskb/src/include/linux/spinlock.h:460, from /kisskb/src/include/linux/wait.h:9, from /kisskb/src/include/linux/wait_bit.h:8, from /kisskb/src/include/linux/fs.h:6, from /kisskb/src/fs/ocfs2/file.c:13: /kisskb/src/fs/ocfs2/file.c: In function 'ocfs2_file_write_iter': /kisskb/src/arch/m68k/include/asm/cmpxchg.h:79:22: warning: value computed is not used [-Wunused-value] #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /kisskb/src/fs/ocfs2/file.c:2419:3: note: in expansion of macro 'xchg' xchg(&iocb->ki_complete, saved_ki_complete); ^~~~ In file included from /kisskb/src/arch/m68k/include/asm/atomic.h:7, from /kisskb/src/include/linux/atomic.h:7, from /kisskb/src/include/linux/spinlock.h:460, from /kisskb/src/include/linux/mmzone.h:8, from /kisskb/src/include/linux/gfp.h:6, from /kisskb/src/include/linux/slab.h:15, from /kisskb/src/fs/posix_acl.c:15: /kisskb/src/fs/posix_acl.c: In function 'get_acl': /kisskb/src/arch/m68k/include/asm/cmpxchg.h:137:3: warning: value computed is not used [-Wunused-value] ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\ ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (unsigned long)(n), sizeof(*(ptr)))) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /kisskb/src/include/asm-generic/cmpxchg.h:106:28: note: in expansion of macro 'cmpxchg_local' #define cmpxchg(ptr, o, n) cmpxchg_local((ptr), (o), (n)) ^~~~~~~~~~~~~ /kisskb/src/fs/posix_acl.c:148:3: note: in expansion of macro 'cmpxchg' cmpxchg(p, sentinel, ACL_NOT_CACHED); ^~~~~~~ Completed OK # rm -rf /kisskb/build/linus_sun3_defconfig_m68k-gcc8 # Build took: 0:02:33.542464