linux/mm/kasan
Andrey Konovalov 1cc4cdb521 kasan: fix stack traces dependency for HW_TAGS
Currently, whether the alloc/free stack traces collection is enabled by
default for hardware tag-based KASAN depends on CONFIG_DEBUG_KERNEL.
The intention for this dependency was to only enable collection on slow
debug kernels due to a significant perf and memory impact.

As it turns out, CONFIG_DEBUG_KERNEL is not considered a debug option
and is enabled on many productions kernels including Android and Ubuntu.
As the result, this dependency is pointless and only complicates the
code and documentation.

Having stack traces collection disabled by default would make the
hardware mode work differently to to the software ones, which is
confusing.

This change removes the dependency and enables stack traces collection
by default.

Looking into the future, this default might makes sense for production
kernels, assuming we implement a fast stack trace collection approach.

Link: https://lkml.kernel.org/r/6678d77ceffb71f1cff2cf61560e2ffe7bb6bfe9.1612808820.git.andreyknvl@google.com
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Reviewed-by: Marco Elver <elver@google.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Peter Collingbourne <pcc@google.com>
Cc: Evgenii Stepanov <eugenis@google.com>
Cc: Branislav Rankov <Branislav.Rankov@arm.com>
Cc: Kevin Brodsky <kevin.brodsky@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-02-09 17:26:44 -08:00
..
common.c kasan, mm: allow cache merging with no metadata 2020-12-22 12:55:09 -08:00
generic.c kasan: fix null pointer dereference in kasan_record_aux_stack 2020-12-29 15:36:49 -08:00
hw_tags.c kasan: fix stack traces dependency for HW_TAGS 2021-02-09 17:26:44 -08:00
init.c kasan: fix incorrect arguments passing in kasan_add_zero_shadow 2021-01-24 10:34:52 -08:00
kasan.h kasan: make addr_has_metadata() return true for valid addresses 2021-02-05 11:03:47 -08:00
Makefile kasan, arm64: implement HW_TAGS runtime 2020-12-22 12:55:08 -08:00
quarantine.c kasan: sanitize objects when metadata doesn't fit 2020-12-22 12:55:09 -08:00
report_generic.c kasan: separate metadata_fetch_row for each mode 2020-12-22 12:55:07 -08:00
report_hw_tags.c kasan: inline kasan_reset_tag for tag-based modes 2020-12-22 12:55:08 -08:00
report_sw_tags.c kasan: sanitize objects when metadata doesn't fit 2020-12-22 12:55:09 -08:00
report.c kasan: sanitize objects when metadata doesn't fit 2020-12-22 12:55:09 -08:00
shadow.c kasan: don't round_up too much 2020-12-22 12:55:09 -08:00
sw_tags.c kasan: sanitize objects when metadata doesn't fit 2020-12-22 12:55:09 -08:00