android_kernel_motorola_sm6375/mm/kasan
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Marco Elver c2a26769b4 kasan: disable branch tracing for core runtime
commit 33cd65e73abd693c00c4156cf23677c453b41b3b upstream.

During early boot, while KASAN is not yet initialized, it is possible to
enter reporting code-path and end up in kasan_report().

While uninitialized, the branch there prevents generating any reports,
however, under certain circumstances when branches are being traced
(TRACE_BRANCH_PROFILING), we may recurse deep enough to cause kernel
reboots without warning.

To prevent similar issues in future, we should disable branch tracing
for the core runtime.

[[email protected]: remove duplicate DISABLE_BRANCH_PROFILING, per Qian Cai]
  Link: https://lore.kernel.org/lkml/20200517011732.GE24705@shao2-debian/
  Link: http://lkml.kernel.org/r/[email protected]
Reported-by: kernel test robot <[email protected]>
Signed-off-by: Marco Elver <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Reviewed-by: Andrey Konovalov <[email protected]>
Cc: Dmitry Vyukov <[email protected]>
Cc: Alexander Potapenko <[email protected]>
Cc: Andrey Ryabinin <[email protected]>
Cc: Qian Cai <[email protected]>
Cc: <[email protected]>
Link: http://lkml.kernel.org/r//20200517011732.GE24705@shao2-debian/
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2020-05-27 17:46:48 +02:00
..
common.c mm: introduce compound_nr() 2019-09-24 15:54:08 -07:00
generic.c kasan: disable branch tracing for core runtime 2020-05-27 17:46:48 +02:00
generic_report.c
init.c
kasan.h kasan: add memory corruption identification for software tag-based mode 2019-09-24 15:54:07 -07:00
Makefile kasan: disable branch tracing for core runtime 2020-05-27 17:46:48 +02:00
quarantine.c
report.c kasan: add memory corruption identification for software tag-based mode 2019-09-24 15:54:07 -07:00
tags.c kasan: disable branch tracing for core runtime 2020-05-27 17:46:48 +02:00
tags_report.c kasan: add memory corruption identification for software tag-based mode 2019-09-24 15:54:07 -07:00