aboutsummaryrefslogtreecommitdiffstats
path: root/mm/debug.c
diff options
context:
space:
mode:
authorAndrey Konovalov <[email protected]>2022-01-14 22:05:01 +0000
committerLinus Torvalds <[email protected]>2022-01-15 14:30:26 +0000
commit26dca996ea7b1ac7008b6b6063fc88b849e3ac3e (patch)
treecba343dcba067570b75226033f93f85de5310c17 /mm/debug.c
parentkasan: test: add test case for double-kmem_cache_destroy() (diff)
downloadkernel-26dca996ea7b1ac7008b6b6063fc88b849e3ac3e.tar.gz
kernel-26dca996ea7b1ac7008b6b6063fc88b849e3ac3e.zip
kasan: fix quarantine conflicting with init_on_free
KASAN's quarantine might save its metadata inside freed objects. As this happens after the memory is zeroed by the slab allocator when init_on_free is enabled, the memory coming out of quarantine is not properly zeroed. This causes lib/test_meminit.c tests to fail with Generic KASAN. Zero the metadata when the object is removed from quarantine. Link: https://lkml.kernel.org/r/2805da5df4b57138fdacd671f5d227d58950ba54.1640037083.git.andreyknvl@google.com Fixes: 6471384af2a6 ("mm: security: introduce init_on_alloc=1 and init_on_free=1 boot options") Signed-off-by: Andrey Konovalov <[email protected]> Reviewed-by: Marco Elver <[email protected]> Cc: Alexander Potapenko <[email protected]> Cc: Andrey Konovalov <[email protected]> Cc: Dmitry Vyukov <[email protected]> Cc: Andrey Ryabinin <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'mm/debug.c')
0 files changed, 0 insertions, 0 deletions