linux/mm/kasan
Daniel Axtens af3751f3c2 kasan: allow architectures to provide an outline readiness check
Allow architectures to define a kasan_arch_is_ready() hook that bails out
of any function that's about to touch the shadow unless the arch says that
it is ready for the memory to be accessed.  This is fairly uninvasive and
should have a negligible performance penalty.

This will only work in outline mode, so an arch must specify
ARCH_DISABLE_KASAN_INLINE if it requires this.

Link: https://lkml.kernel.org/r/20210624034050.511391-3-dja@axtens.net
Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Marco Elver <elver@google.com>
Suggested-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Balbir Singh <bsingharora@gmail.com>
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-06-29 10:53:53 -07:00
..
common.c kasan: allow architectures to provide an outline readiness check 2021-06-29 10:53:53 -07:00
generic.c kasan: allow architectures to provide an outline readiness check 2021-06-29 10:53:53 -07:00
hw_tags.c kasan, arm64: tests supports for HW_TAGS async mode 2021-04-11 10:57:45 +01:00
init.c mm/kasan/init.c: fix doc warning 2021-06-05 08:58:11 -07:00
kasan.h kasan: allow architectures to provide an outline readiness check 2021-06-29 10:53:53 -07:00
Makefile kasan, arm64: implement HW_TAGS runtime 2020-12-22 12:55:08 -08:00
quarantine.c mm: fix typos in comments 2021-05-07 00:26:35 -07:00
report.c kasan: use dump_stack_lvl(KERN_ERR) to print stacks 2021-06-29 10:53:52 -07:00
report_generic.c mm/kasan: switch from strlcpy to strscpy 2021-04-30 11:20:41 -07:00
report_hw_tags.c kasan: prefix global functions with kasan_ 2021-02-24 13:38:30 -08:00
report_sw_tags.c kasan: prefix global functions with kasan_ 2021-02-24 13:38:30 -08:00
shadow.c kasan: allow architectures to provide an outline readiness check 2021-06-29 10:53:53 -07:00
sw_tags.c kasan: init memory in kasan_(un)poison for HW_TAGS 2021-04-30 11:20:41 -07:00