alistair23-linux/mm/kasan
Peter Zijlstra 57b78a62e7 x86/uaccess, kasan: Fix KASAN vs SMAP
KASAN inserts extra code for every LOAD/STORE emitted by te compiler.
Much of this code is simple and safe to run with AC=1, however the
kasan_report() function, called on error, is most certainly not safe
to call with AC=1.

Therefore wrap kasan_report() in user_access_{save,restore}; which for
x86 SMAP, saves/restores EFLAGS and clears AC before calling the real
function.

Also ensure all the functions are without __fentry__ hook. The
function tracer is also not safe.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2019-04-03 11:02:24 +02:00
..
common.c x86/uaccess, kasan: Fix KASAN vs SMAP 2019-04-03 11:02:24 +02:00
generic.c kasan: remove use after scope bugs detection. 2019-03-05 21:07:13 -08:00
generic_report.c kasan: remove use after scope bugs detection. 2019-03-05 21:07:13 -08:00
init.c treewide: add checks for the return value of memblock_alloc*() 2019-03-12 10:04:02 -07:00
kasan.h kasan: fix variable 'tag' set but not used warning 2019-03-29 10:01:36 -07:00
Makefile x86/uaccess, kasan: Fix KASAN vs SMAP 2019-04-03 11:02:24 +02:00
quarantine.c mm: convert totalram_pages and totalhigh_pages variables to atomic 2018-12-28 12:11:47 -08:00
report.c x86/uaccess, kasan: Fix KASAN vs SMAP 2019-04-03 11:02:24 +02:00
tags.c kasan: fix random seed generation for tag-based mode 2019-02-21 09:01:00 -08:00
tags_report.c kasan: add SPDX-License-Identifier mark to source files 2018-12-28 12:11:44 -08:00