diff options
| author | Alexander Potapenko <glider@google.com> | 2023-09-11 17:57:00 +0300 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2023-10-04 20:32:22 +0300 |
| commit | 0be7b2c232cfb1621660c78b0fd7260361c75e27 (patch) | |
| tree | 22ab2cba4a295674bab7b06b1b2b0782a82dfa3d /include | |
| parent | be1ab60eb04f27e559d8be9655beb04d2bc90b25 (diff) | |
| download | linux-0be7b2c232cfb1621660c78b0fd7260361c75e27.tar.xz | |
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 'include')
0 files changed, 0 insertions, 0 deletions
