summaryrefslogtreecommitdiffstats
path: root/mm/kasan/hw_tags.c
diff options
context:
space:
mode:
authorAndrey Konovalov <andreyknvl@google.com>2022-09-05 23:05:45 +0200
committerAndrew Morton <akpm@linux-foundation.org>2022-10-03 14:03:01 -0700
commit7bc0584e5d2a687c0855a1b3dec9a6d6857d757b (patch)
treec08b7cb13e8ec5dd82a1aa82e9416aabc2bcee12 /mm/kasan/hw_tags.c
parent59e6e098d1c156f7c449af903c3b48a5470f6120 (diff)
downloadlinux-7bc0584e5d2a687c0855a1b3dec9a6d6857d757b.tar.bz2
kasan: implement stack ring for tag-based modes
Implement storing stack depot handles for alloc/free stack traces for slab objects for the tag-based KASAN modes in a ring buffer. This ring buffer is referred to as the stack ring. On each alloc/free of a slab object, the tagged address of the object and the current stack trace are recorded in the stack ring. On each bug report, if the accessed address belongs to a slab object, the stack ring is scanned for matching entries. The newest entries are used to print the alloc/free stack traces in the report: one entry for alloc and one for free. The number of entries in the stack ring is fixed in this patch, but one of the following patches adds a command-line argument to control it. [andreyknvl@google.com: initialize read-write lock in stack ring] Link: https://lkml.kernel.org/r/576182d194e27531e8090bad809e4136953895f4.1663700262.git.andreyknvl@google.com Link: https://lkml.kernel.org/r/692de14b6b6a1bc817fd55e4ad92fc1f83c1ab59.1662411799.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov <andreyknvl@google.com> Acked-by: Marco Elver <elver@google.com> Cc: Alexander Potapenko <glider@google.com> Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Evgenii Stepanov <eugenis@google.com> Cc: Peter Collingbourne <pcc@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/kasan/hw_tags.c')
0 files changed, 0 insertions, 0 deletions