linux-stable/mm/kasan
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
..
common.c lib/stacktrace, kasan, kmsan: rework extra_bits interface 2023-02-16 20:43:51 -08:00
generic.c Merge branch 'mm-hotfixes-stable' into mm-stable 2023-02-10 15:34:48 -08:00
hw_tags.c kasan: allow sampling page_alloc allocations for HW_TAGS 2023-01-18 17:12:45 -08:00
init.c kasan: use MAX_PTRS_PER_* for early shadow tables 2021-06-29 10:53:53 -07:00
kasan.h kasan: infer allocation size by scanning metadata 2023-02-09 16:51:40 -08:00
kasan_test.c hardening updates for v6.2-rc1 2022-12-14 12:20:00 -08:00
kasan_test_module.c kasan: migrate workqueue_uaf test to kunit 2022-11-08 17:37:14 -08:00
Makefile kasan: move tests to mm/kasan/ 2022-10-03 14:03:02 -07:00
quarantine.c kasan: give better names to shadow values 2022-05-13 07:20:19 -07:00
report.c kasan: infer allocation size by scanning metadata 2023-02-09 16:51:40 -08:00
report_generic.c kasan: infer allocation size by scanning metadata 2023-02-09 16:51:40 -08:00
report_hw_tags.c kasan: infer allocation size by scanning metadata 2023-02-09 16:51:40 -08:00
report_sw_tags.c kasan: infer allocation size by scanning metadata 2023-02-09 16:51:40 -08:00
report_tags.c kasan: infer allocation size by scanning metadata 2023-02-09 16:51:40 -08:00
shadow.c kasan: fix Oops due to missing calls to kasan_arch_is_ready() 2023-02-09 15:56:50 -08:00
sw_tags.c kasan: infer allocation size by scanning metadata 2023-02-09 16:51:40 -08:00
tags.c kasan: dynamically allocate stack ring entries 2022-10-03 14:03:02 -07:00