]> www.infradead.org Git - users/jedix/linux-maple.git/commit
kasan: use EXPORT_SYMBOL_IF_KUNIT to export symbols
authorSabyrzhan Tasbolatov <snovitoll@gmail.com>
Fri, 1 Nov 2024 18:40:10 +0000 (23:40 +0500)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 11 Nov 2024 21:09:43 +0000 (13:09 -0800)
commitc28432acf61751c2be8b36cb831dd490d2aed465
tree936f04e63f43800aeeb192e3d50cc0d422c344a4
parentad2bc8812fc17c8536d5e37aa0754463b76b66a4
kasan: use EXPORT_SYMBOL_IF_KUNIT to export symbols

Patch series "kasan: few improvements on kunit tests".

This patch series addresses the issue [1] with KASAN symbols used in the
Kunit test, but exported as EXPORT_SYMBOL_GPL.

Also a small tweak of marking kasan_atomics() as KUNIT_CASE_SLOW to avoid
kunit report that the test should be marked as slow.

This patch (of 2):

Replace EXPORT_SYMBOL_GPL with EXPORT_SYMBOL_IF_KUNIT to mark the symbols
as visible only if CONFIG_KUNIT is enabled.

KASAN Kunit test should import the namespace EXPORTED_FOR_KUNIT_TESTING to
use these marked symbols.

Link: https://lkml.kernel.org/r/20241101184011.3369247-1-snovitoll@gmail.com
Link: https://lkml.kernel.org/r/20241101184011.3369247-2-snovitoll@gmail.com
Signed-off-by: Sabyrzhan Tasbolatov <snovitoll@gmail.com>
Reported-by: Andrey Konovalov <andreyknvl@gmail.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218315
Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Marco Elver <elver@google.com>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/kasan/hw_tags.c
mm/kasan/kasan_test_c.c
mm/kasan/report.c