diff options
| author | Jann Horn <[email protected]> | 2025-07-28 20:11:54 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2025-08-05 20:28:46 +0000 |
| commit | 475356fe2814f2f0b188da8bf0f1fcc579d81272 (patch) | |
| tree | 5f18542afd0279d54c88a8505c6dccac906ede31 /fs/xfs/xfs_exchrange.c | |
| parent | Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux (diff) | |
| download | kernel-475356fe2814f2f0b188da8bf0f1fcc579d81272.tar.gz kernel-475356fe2814f2f0b188da8bf0f1fcc579d81272.zip | |
kasan/test: fix protection against compiler elision
The kunit test is using assignments to
"static volatile void *kasan_ptr_result" to prevent elision of memory
loads, but that's not working:
In this variable definition, the "volatile" applies to the "void", not to
the pointer.
To make "volatile" apply to the pointer as intended, it must follow
after the "*".
This makes the kasan_memchr test pass again on my system. The
kasan_strings test is still failing because all the definitions of
load_unaligned_zeropad() are lacking explicit instrumentation hooks and
ASAN does not instrument asm() memory operands.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 5f1c8108e7ad ("mm:kasan: fix sparse warnings: Should it be static?")
Signed-off-by: Jann Horn <[email protected]>
Cc: Alexander Potapenko <[email protected]>
Cc: Andrey Konovalov <[email protected]>
Cc: Andrey Ryabinin <[email protected]>
Cc: Dmitriy Vyukov <[email protected]>
Cc: Jann Horn <[email protected]>
Cc: Nihar Chaithanya <[email protected]>
Cc: Vincenzo Frascino <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'fs/xfs/xfs_exchrange.c')
0 files changed, 0 insertions, 0 deletions
