diff options
author | Andrey Konovalov <andreyknvl@google.com> | 2023-11-20 18:47:19 +0100 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-12-10 16:51:48 -0800 |
commit | 773688a6cb24b0b3c2ba40354d883348a2befa38 (patch) | |
tree | 7777e7a212937ca49769a84c64e90a77de9c1a74 /lib/stackdepot.c | |
parent | 2d5524635b00fc90016577e1a18c21682b1bb913 (diff) | |
download | linux-773688a6cb24b0b3c2ba40354d883348a2befa38.tar.gz linux-773688a6cb24b0b3c2ba40354d883348a2befa38.tar.bz2 linux-773688a6cb24b0b3c2ba40354d883348a2befa38.zip |
kasan: use stack_depot_put for Generic mode
Evict alloc/free stack traces from the stack depot for Generic KASAN once
they are evicted from the quaratine.
For auxiliary stack traces, evict the oldest stack trace once a new one is
saved (KASAN only keeps references to the last two).
Also evict all saved stack traces on krealloc.
To avoid double-evicting and mis-evicting stack traces (in case KASAN's
metadata was corrupted), reset KASAN's per-object metadata that stores
stack depot handles when the object is initialized and when it's evicted
from the quarantine.
Note that stack_depot_put is no-op if the handle is 0.
Link: https://lkml.kernel.org/r/5cef104d9b842899489b4054fe8d1339a71acee0.1700502145.git.andreyknvl@google.com
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Reviewed-by: Marco Elver <elver@google.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Evgenii Stepanov <eugenis@google.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'lib/stackdepot.c')
0 files changed, 0 insertions, 0 deletions