linux/mm/kmsan
Andrey Konovalov 36aa1e6779 lib/stacktrace, kasan, kmsan: rework extra_bits interface
The current implementation of the extra_bits interface is confusing:
passing extra_bits to __stack_depot_save makes it seem that the extra
bits are somehow stored in stack depot. In reality, they are only
embedded into a stack depot handle and are not used within stack depot.

Drop the extra_bits argument from __stack_depot_save and instead provide
a new stack_depot_set_extra_bits function (similar to the exsiting
stack_depot_get_extra_bits) that saves extra bits into a stack depot
handle.

Update the callers of __stack_depot_save to use the new interace.

This change also fixes a minor issue in the old code: __stack_depot_save
does not return NULL if saving stack trace fails and extra_bits is used.

Link: https://lkml.kernel.org/r/317123b5c05e2f82854fc55d8b285e0869d3cb77.1676063693.git.andreyknvl@google.com
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Reviewed-by: Alexander Potapenko <glider@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2023-02-16 20:43:51 -08:00
..
core.c lib/stacktrace, kasan, kmsan: rework extra_bits interface 2023-02-16 20:43:51 -08:00
hooks.c kmsan: export kmsan_handle_urb 2022-12-21 14:31:52 -08:00
init.c init: kmsan: call KMSAN initialization routines 2022-10-03 14:03:21 -07:00
instrumentation.c kmsan: silence -Wmissing-prototypes warnings 2023-02-02 22:33:05 -08:00
kmsan.h kmsan: core: kmsan_in_runtime() should return true in NMI context 2022-11-08 15:57:24 -08:00
kmsan_test.c kmsan: include linux/vmalloc.h 2022-12-21 14:31:51 -08:00
Makefile kmsan: add tests for KMSAN 2022-10-03 14:03:22 -07:00
report.c kmsan: add KMSAN runtime core 2022-10-03 14:03:19 -07:00
shadow.c mm: kmsan: export kmsan_copy_page_meta() 2022-10-28 13:37:22 -07:00