linux/mm/kfence
Nirjhar Roy 811808d365 mm/kfence: add a new kunit test test_use_after_free_read_nofault()
Faults from copy_from_kernel_nofault() need to be handled by fixup table
and should not be handled by kfence.  Otherwise while reading /proc/kcore
which uses copy_from_kernel_nofault(), kfence can generate false
negatives.  This can happen when /proc/kcore ends up reading an unmapped
address from kfence pool.

Let's add a testcase to cover this case.

Link: https://lkml.kernel.org/r/210e561f7845697a32de44b643393890f180069f.1729272697.git.ritesh.list@gmail.com
Signed-off-by: Nirjhar Roy <nirjhar@linux.ibm.com>
Co-developed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Tested-by: Marco Elver <elver@google.com>
Reviewed-by: Marco Elver <elver@google.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-11-14 22:49:19 -08:00
..
.kunitconfig kfence: test: use new suite_{init/exit} support, add .kunitconfig 2022-05-02 12:35:57 -06:00
core.c kfence: save freeing stack trace at calling time instead of freeing time 2024-09-01 20:26:12 -07:00
kfence_test.c mm/kfence: add a new kunit test test_use_after_free_read_nofault() 2024-11-14 22:49:19 -08:00
kfence.h kfence: save freeing stack trace at calling time instead of freeing time 2024-09-01 20:26:12 -07:00
Makefile kfence: avoid passing -g for test 2023-03-23 17:18:35 -07:00
report.c mm: kfence: fix elapsed time for allocated/freed track 2024-09-26 14:01:44 -07:00