kasan: export kasan_poison
Subsystems (2)
PATCH 1/1 kasan: export kasan_poison
From: Arnd Bergmann <[email protected]>
The unit test module fails to build after adding a reference to kasan_poison:
ERROR: modpost: "kasan_poison" [lib/test_kasan.ko] undefined!
Export this symbol to make it available to loadable modules.
--- mm/kasan/shadow.c | 1 + 1 file changed, 1 insertion(+)
mm/kasan/shadow.c +1 -0
@@ -94,6 +94,7 @@ void kasan_poison(const void *address, size_t size, u8 value)__memset (shadow_start, value, shadow_end - shadow_start); } +EXPORT_SYMBOL_GPL (kasan_poison);void kasan_unpoison (const void *address,size_t size) {
Signature · 1 line
2.29.2
Quoted 11 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
The unit test module fails to build after adding a reference to
kasan_poison:ERROR: modpost: "
kasan_poison" [lib/test_kasan.ko] undefined!Export this symbol to make it available to loadable modules.
Fixes b9b322c2bba9 ("kasan: add match-all tag tests")Signed-off-by Arnd Bergmann <[email protected]>
Thanks I just stumbled on the same issue ;)
Quoted 17 lines
--- mm/kasan/shadow.c | 1 + 1 file changed, 1 insertion(+)mm/kasan/shadow.c +1
-0@@ -94,6 +94,7 @@ void kasan_poison(const void *address, size_t size, u8 value)__memset (shadow_start, value, shadow_end - shadow_start); } +EXPORT_SYMBOL_GPL (kasan_poison);void kasan_unpoison (const void *address,size_t size) {
Signature · 2 lines
Regards, Vincenzo
Quoted 9 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
The unit test module fails to build after adding a reference to
kasan_poison:ERROR: modpost: "
kasan_poison" [lib/test_kasan.ko] undefined!Export this symbol to make it available to loadable modules.
Could you share the config you used to trigger this?
Quoted 11 lines
Fixes b9b322c2bba9 ("kasan: add match-all tag tests")Signed-off-by Arnd Bergmann <[email protected]>--- mm/kasan/shadow.c | 1 + 1 file changed, 1 insertion(+)mm/kasan/shadow.c +0
-0
mm/kasan/shadow.c void kasan_poison(const void *address, size_t size, u8 value) · line 97
Quoted 4 lines
mm/kasan/shadow.c +1
-0@@ -94,6 +94,7 @@ void kasan_poison(const void *address, size_t size, u8 value)__memset (shadow_start, value, shadow_end - shadow_start); } +EXPORT_SYMBOL_GPL (kasan_poison);
Should this be _GPL? All of the other EXPORT_SYMBOL() we use in KASAN are without the GPL suffix.
Quoted 6 lines
mm/kasan/shadow.c +0
-1void kasan_unpoison (const void *address,size_t size) { --2.29.2
Quoted 5 lines · Andrey Konovalov
Quoted 3 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
Quoted 8 lines
Quoted 6 lines
The unit test module fails to build after adding a reference to
kasan_poison:ERROR: modpost: "
kasan_poison" [lib/test_kasan.ko] undefined!Export this symbol to make it available to loadable modules.
Could you share the config you used to trigger this?
Never mind, I realized I've been using a branch that already contains your fix :)
Quoted 7 lines · Andrey Konovalov
Quoted 6 lines · Arnd Bergmann
mm/kasan/shadow.c +0
-0@@ -94,6 +94,7 @@ void kasan_poison(const void *address, size_t size, u8 value)
Quoted 6 lines
mm/kasan/shadow.c void kasan_poison(const void *address, size_t size, u8 value) · line 97
Quoted 3 lines
mm/kasan/shadow.c +1
-0__memset (shadow_start, value, shadow_end - shadow_start); } +EXPORT_SYMBOL_GPL (kasan_poison);Should this be
_GPL? All of the otherEXPORT_SYMBOL()we use in KASAN are without the GPL suffix.
I don't care much either way, the reason I went for the _GPL variant was that this
seems to only be used internally in mm/kasan/ and lib/test_kasan.c, unlike the other
symbols that are meant to be called by other modules.
Arnd