summaryrefslogtreecommitdiffstats
path: root/kernel/reboot.c
diff options
context:
space:
mode:
authorArvind Sankar <nivedita@alum.mit.edu>2020-11-13 22:51:59 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2020-11-14 11:26:03 -0800
commit3347acc6fcd4ee71ad18a9ff9d9dac176b517329 (patch)
tree8f772f831cb409deb52f570e816ad3abbff18d03 /kernel/reboot.c
parent96e1fac162cc0086c50b2b14062112adb2ba640e (diff)
downloadlinux-stable-3347acc6fcd4ee71ad18a9ff9d9dac176b517329.tar.gz
linux-stable-3347acc6fcd4ee71ad18a9ff9d9dac176b517329.tar.bz2
linux-stable-3347acc6fcd4ee71ad18a9ff9d9dac176b517329.zip
compiler.h: fix barrier_data() on clang
Commit 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h mutually exclusive") neglected to copy barrier_data() from compiler-gcc.h into compiler-clang.h. The definition in compiler-gcc.h was really to work around clang's more aggressive optimization, so this broke barrier_data() on clang, and consequently memzero_explicit() as well. For example, this results in at least the memzero_explicit() call in lib/crypto/sha256.c:sha256_transform() being optimized away by clang. Fix this by moving the definition of barrier_data() into compiler.h. Also move the gcc/clang definition of barrier() into compiler.h, __memory_barrier() is icc-specific (and barrier() is already defined using it in compiler-intel.h) and doesn't belong in compiler.h. [rdunlap@infradead.org: fix ALPHA builds when SMP is not enabled] Link: https://lkml.kernel.org/r/20201101231835.4589-1-rdunlap@infradead.org Fixes: 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h mutually exclusive") Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu> Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Tested-by: Nick Desaulniers <ndesaulniers@google.com> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Reviewed-by: Kees Cook <keescook@chromium.org> Cc: <stable@vger.kernel.org> Link: https://lkml.kernel.org/r/20201014212631.207844-1-nivedita@alum.mit.edu Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/reboot.c')
0 files changed, 0 insertions, 0 deletions