diff options
author | Alexander Potapenko <glider@google.com> | 2022-12-05 15:57:40 +0100 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2022-12-12 03:12:21 +0100 |
commit | 5478afc55a2104caaef5b78c7c1f9acb9ec1f92a (patch) | |
tree | d69444d2dd641b8f0006f7030c257a024e44deef /fs/jffs2/os-linux.h | |
parent | mm: add cond_resched() in swapin_walk_pmd_entry() (diff) | |
download | linux-5478afc55a2104caaef5b78c7c1f9acb9ec1f92a.tar.xz linux-5478afc55a2104caaef5b78c7c1f9acb9ec1f92a.zip |
kmsan: fix memcpy tests
Recent Clang changes may cause it to delete calls of memcpy(), if the
source is an uninitialized volatile local. This happens because passing a
pointer to a volatile local into memcpy() discards the volatile qualifier,
giving the compiler a free hand to optimize the memcpy() call away.
Use OPTIMIZER_HIDE_VAR() to hide the uninitialized var from the too-smart
compiler.
Link: https://lkml.kernel.org/r/20221205145740.694038-1-glider@google.com
Signed-off-by: Alexander Potapenko <glider@google.com>
Suggested-by: Marco Elver <elver@google.com>
Reviewed-by: Marco Elver <elver@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'fs/jffs2/os-linux.h')
0 files changed, 0 insertions, 0 deletions