]> www.infradead.org Git - users/jedix/linux-maple.git/commit
kasan: add kunit tests for kmalloc_track_caller, kmalloc_node_track_caller
authorNihar Chaithanya <niharchaithanya@gmail.com>
Mon, 14 Oct 2024 19:01:30 +0000 (00:31 +0530)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 12 Nov 2024 01:22:25 +0000 (17:22 -0800)
commit3738290bfc99606787f515a4590ad38dc4f79ca4
treedc7d8ddf5fe009b628e6990903974c63595da115
parent1857099c18e16a72bb7d0a84afb323663d49ee00
kasan: add kunit tests for kmalloc_track_caller, kmalloc_node_track_caller

The Kunit tests for kmalloc_track_caller and kmalloc_node_track_caller
were missing in kasan_test_c.c, which check that these functions poison
the memory properly.

Add a Kunit test:
-> kmalloc_tracker_caller_oob_right(): This includes out-of-bounds
   access test for kmalloc_track_caller and kmalloc_node_track_caller.

Link: https://lkml.kernel.org/r/20241014190128.442059-1-niharchaithanya@gmail.com
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216509
Signed-off-by: Nihar Chaithanya <niharchaithanya@gmail.com>
Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/kasan/kasan_test_c.c