diff options
author | 2023-09-11 16:57:00 +0200 | |
---|---|---|
committer | 2023-10-04 10:32:22 -0700 | |
commit | 0be7b2c232cfb1621660c78b0fd7260361c75e27 (patch) | |
tree | 22ab2cba4a295674bab7b06b1b2b0782a82dfa3d /mm/shrinker_debug.c | |
parent | kmsan: simplify kmsan_internal_memmove_metadata() (diff) | |
download | wireguard-linux-0be7b2c232cfb1621660c78b0fd7260361c75e27.tar.xz wireguard-linux-0be7b2c232cfb1621660c78b0fd7260361c75e27.zip |
kmsan: prevent optimizations in memcpy tests
Clang 18 learned to optimize away memcpy() calls of small uninitialized
scalar values. To ensure that memcpy tests in kmsan_test.c still perform
calls to memcpy() (which KMSAN replaces with __msan_memcpy()), declare a
separate memcpy_noinline() function with volatile parameters, which won't
be optimized.
Also retire DO_NOT_OPTIMIZE(), as memcpy_noinline() is apparently enough.
Link: https://lkml.kernel.org/r/20230911145702.2663753-2-glider@google.com
Signed-off-by: Alexander Potapenko <glider@google.com>
Acked-by: Marco Elver <elver@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/shrinker_debug.c')
0 files changed, 0 insertions, 0 deletions