diff options
author | Alexander Potapenko <glider@google.com> | 2022-12-05 15:57:40 +0100 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2022-12-11 18:12:21 -0800 |
commit | 5478afc55a2104caaef5b78c7c1f9acb9ec1f92a (patch) | |
tree | d69444d2dd641b8f0006f7030c257a024e44deef /drivers/pci/controller/dwc/pci-layerscape.c | |
parent | de2e5171433126d340573cb7d0d4fcac084ab2a0 (diff) | |
download | linux-5478afc55a2104caaef5b78c7c1f9acb9ec1f92a.tar.bz2 |
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 'drivers/pci/controller/dwc/pci-layerscape.c')
0 files changed, 0 insertions, 0 deletions