aboutsummaryrefslogtreecommitdiff
path: root/lib/memory-notifier-error-inject.c
diff options
context:
space:
mode:
authorDaniel Axtens <[email protected]>2019-08-20 12:49:41 +1000
committerMichael Ellerman <[email protected]>2019-11-07 13:15:40 +1100
commit5bece3d66153d78f1fd62108a1553c3f15e71412 (patch)
tree51601bf479c97064128a2cef170355131f2694f3 /lib/memory-notifier-error-inject.c
parent81d2c6f81996e01fbcd2b5aeefbb519e21c806e9 (diff)
powerpc: support KASAN instrumentation of bitops
The powerpc-specific bitops are not being picked up by the KASAN test suite. Instrumentation is done via the bitops/instrumented-{atomic,lock}.h headers. They require that arch-specific versions of bitop functions are renamed to arch_*. Do this renaming. For clear_bit_unlock_is_negative_byte, the current implementation uses the PG_waiters constant. This works because it's a preprocessor macro - so it's only actually evaluated in contexts where PG_waiters is defined. With instrumentation however, it becomes a static inline function, and all of a sudden we need the actual value of PG_waiters. Because of the order of header includes, it's not available and we fail to compile. Instead, manually specify that we care about bit 7. This is still correct: bit 7 is the bit that would mark a negative byte. While we're at it, replace __inline__ with inline across the file. Reviewed-by: Christophe Leroy <[email protected]> Signed-off-by: Daniel Axtens <[email protected]> Tested-by: Christophe Leroy <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions