Skip to contentSkip to conversation

Fix noinstr warnings for KCSAN

GIT PULL Paul E. McKenney 1 participant 2 messages Jun 26, 2020 RCU

lore
Share & tools
lore

Paul E. McKenney

author maintainer
#0 lore raw

Hello!

This pull request contains a single commit that uses "arch_" atomic operations to avoid the instrumentation that comes with the non-"arch_" versions. In preparation for that commit, it also has another commit that makes these "arch_" atomic operations available to generic code.

Without these commits, KCSAN uses can see pointless errors.

This pull request is currently RFC pending ongoing -next testing. This was not entirely free of drama, with Stephen needing to handle a merge conflict:

https://lore.kernel.org/lkml/[email protected]/

However, the resolution looks straightforward to me. In addition, these two commits pass rcutorture testing and associated KCSAN testing.

The following changes since commit b3a9e3b9622ae10064826dccb4f7a52bd88c7407:

Linux 5.8-rc1 (2020-06-14 12:45:04 -0700)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git rcu/urgent

for you to fetch changes up to b58e733fd774f3f4b49d9e7640d172a57e35200e:

rcu: Fixup noinstr warnings (2020-06-25 08:24:32 -0700)

----------------------------------------------------------------
Peter Zijlstra (2):
locking/atomics: Provide the arch_atomic_ interface to generic code
rcu: Fixup noinstr warnings

 include/linux/atomic-fallback.h       | 236 +++++++++++++++++++++++++++++++++-
 include/linux/compiler.h              |   2 +-
 kernel/rcu/tree.c                     |  32 ++++-
 scripts/atomic/gen-atomic-fallback.sh |  31 +++++
 4 files changed, 292 insertions(+), 9 deletions(-)
author maintainer
#1 lore raw
Quoted 10 lines · Paul E. McKenney

Hello!

This pull request contains a single commit that uses "arch_" atomic operations to avoid the instrumentation that comes with the non-"arch_" versions. In preparation for that commit, it also has another commit that makes these "arch_" atomic operations available to generic code.

Without these commits, KCSAN uses can see pointless errors.

This pull request is currently RFC pending ongoing -next testing.

And it has now cleared a round of -next testing! ;-)

Thanx, Paul

Quoted 30 lines

This was not entirely free of drama, with Stephen needing to handle a merge conflict:

https://lore.kernel.org/lkml/[email protected]/

However, the resolution looks straightforward to me. In addition, these two commits pass rcutorture testing and associated KCSAN testing.

The following changes since commit b3a9e3b9622ae10064826dccb4f7a52bd88c7407:

Linux 5.8-rc1 (2020-06-14 12:45:04 -0700)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git rcu/urgent

for you to fetch changes up to b58e733fd774f3f4b49d9e7640d172a57e35200e:

rcu: Fixup noinstr warnings (2020-06-25 08:24:32 -0700)

----------------------------------------------------------------
Peter Zijlstra (2):
locking/atomics: Provide the arch_atomic_ interface to generic code
rcu: Fixup noinstr warnings

 include/linux/atomic-fallback.h       | 236 +++++++++++++++++++++++++++++++++-
 include/linux/compiler.h              |   2 +-
 kernel/rcu/tree.c                     |  32 ++++-
 scripts/atomic/gen-atomic-fallback.sh |  31 +++++
 4 files changed, 292 insertions(+), 9 deletions(-)