WSL2-Linux-Kernel/scripts/atomic
Mark Rutland ec570320b0 locking/atomic: Correct (cmp)xchg() instrumentation
All xchg() and cmpxchg() ops are atomic RMWs, but currently we
instrument these with instrument_atomic_write() rather than
instrument_atomic_read_write(), missing the read aspect.

Similarly, all try_cmpxchg() ops are non-atomic RMWs on *oldp, but we
instrument these accesses with instrument_atomic_write() rather than
instrument_read_write(), missing the read aspect and erroneously marking
these as atomic.

Fix the instrumentation for both points.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lkml.kernel.org/r/20230413160644.490976-1-mark.rutland@arm.com
Cc: Linus Torvalds <torvalds@linux-foundation.org>
2023-04-29 09:09:31 +02:00
..
fallbacks atomics: Provide atomic_add_negative() variants 2023-03-28 10:39:29 +02:00
atomic-tbl.sh locking/atomics: Change 'fold' to 'grep' 2019-02-11 14:27:33 +01:00
atomics.tbl atomics: Provide atomic_add_negative() variants 2023-03-28 10:39:29 +02:00
gen-atomic-fallback.sh locking/atomic: Add generic try_cmpxchg{,64}_local() support 2023-04-29 09:09:02 +02:00
gen-atomic-instrumented.sh locking/atomic: Correct (cmp)xchg() instrumentation 2023-04-29 09:09:31 +02:00
gen-atomic-long.sh locking/atomic: add arch_atomic_long*() 2021-07-16 18:46:45 +02:00
gen-atomics.sh locking/atomic: centralize generated headers 2021-07-16 18:46:45 +02:00