* [PATCH] ARM: export __memset/__memcpy/__memmove
@ 2025-06-20 11:12 Arnd Bergmann
2025-06-20 20:26 ` Linus Walleij
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Arnd Bergmann @ 2025-06-20 11:12 UTC (permalink / raw)
To: Russell King
Cc: Arnd Bergmann, Abbott Liu, Ard Biesheuvel, Linus Walleij,
Florian Fainelli, Ahmad Fatoum, linux-arm-kernel, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
When KASAN is locally disabled for one file, the string functions
get redirected to internal helpers, but those are not actually exported,
so this only works in built-in code but fails for loadable modules:
ERROR: modpost: "__memset" [crypto/ecc.ko] undefined!
ERROR: modpost: "__memcpy" [crypto/ecc.ko] undefined!
Add the missig exports.
Fixes: d6d51a96c7d6 ("ARM: 9014/2: Replace string mem* functions for KASan")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/arm/kernel/armksyms.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c
index 82e96ac83684..1ff50106afa4 100644
--- a/arch/arm/kernel/armksyms.c
+++ b/arch/arm/kernel/armksyms.c
@@ -83,10 +83,13 @@ EXPORT_SYMBOL(__raw_writesl);
EXPORT_SYMBOL(strchr);
EXPORT_SYMBOL(strrchr);
EXPORT_SYMBOL(memset);
+EXPORT_SYMBOL(__memset);
EXPORT_SYMBOL(__memset32);
EXPORT_SYMBOL(__memset64);
EXPORT_SYMBOL(memcpy);
+EXPORT_SYMBOL(__memcpy);
EXPORT_SYMBOL(memmove);
+EXPORT_SYMBOL(__memmove);
EXPORT_SYMBOL(memchr);
EXPORT_SYMBOL(mmioset);
--
2.39.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: export __memset/__memcpy/__memmove
2025-06-20 11:12 [PATCH] ARM: export __memset/__memcpy/__memmove Arnd Bergmann
@ 2025-06-20 20:26 ` Linus Walleij
2025-06-22 20:29 ` Florian Fainelli
2025-06-23 6:27 ` Ahmad Fatoum
2 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2025-06-20 20:26 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Russell King, Arnd Bergmann, Abbott Liu, Ard Biesheuvel,
Florian Fainelli, Ahmad Fatoum, linux-arm-kernel, linux-kernel
On Fri, Jun 20, 2025 at 1:13 PM Arnd Bergmann <arnd@kernel.org> wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> When KASAN is locally disabled for one file, the string functions
> get redirected to internal helpers, but those are not actually exported,
> so this only works in built-in code but fails for loadable modules:
>
> ERROR: modpost: "__memset" [crypto/ecc.ko] undefined!
> ERROR: modpost: "__memcpy" [crypto/ecc.ko] undefined!
>
> Add the missig exports.
missing
>
> Fixes: d6d51a96c7d6 ("ARM: 9014/2: Replace string mem* functions for KASan")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: export __memset/__memcpy/__memmove
2025-06-20 11:12 [PATCH] ARM: export __memset/__memcpy/__memmove Arnd Bergmann
2025-06-20 20:26 ` Linus Walleij
@ 2025-06-22 20:29 ` Florian Fainelli
2025-06-23 6:27 ` Ahmad Fatoum
2 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2025-06-22 20:29 UTC (permalink / raw)
To: Arnd Bergmann, Russell King
Cc: Arnd Bergmann, Abbott Liu, Ard Biesheuvel, Linus Walleij,
Ahmad Fatoum, linux-arm-kernel, linux-kernel
On 20/06/2025 04:12, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> When KASAN is locally disabled for one file, the string functions
> get redirected to internal helpers, but those are not actually exported,
> so this only works in built-in code but fails for loadable modules:
>
> ERROR: modpost: "__memset" [crypto/ecc.ko] undefined!
> ERROR: modpost: "__memcpy" [crypto/ecc.ko] undefined!
>
> Add the missig exports.
>
> Fixes: d6d51a96c7d6 ("ARM: 9014/2: Replace string mem* functions for KASan")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: export __memset/__memcpy/__memmove
2025-06-20 11:12 [PATCH] ARM: export __memset/__memcpy/__memmove Arnd Bergmann
2025-06-20 20:26 ` Linus Walleij
2025-06-22 20:29 ` Florian Fainelli
@ 2025-06-23 6:27 ` Ahmad Fatoum
2 siblings, 0 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2025-06-23 6:27 UTC (permalink / raw)
To: Arnd Bergmann, Russell King
Cc: Arnd Bergmann, Abbott Liu, Ard Biesheuvel, Linus Walleij,
Florian Fainelli, linux-arm-kernel, linux-kernel
On 20.06.25 13:12, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> When KASAN is locally disabled for one file, the string functions
> get redirected to internal helpers, but those are not actually exported,
> so this only works in built-in code but fails for loadable modules:
>
> ERROR: modpost: "__memset" [crypto/ecc.ko] undefined!
> ERROR: modpost: "__memcpy" [crypto/ecc.ko] undefined!
>
> Add the missig exports.
>
> Fixes: d6d51a96c7d6 ("ARM: 9014/2: Replace string mem* functions for KASan")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> arch/arm/kernel/armksyms.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c
> index 82e96ac83684..1ff50106afa4 100644
> --- a/arch/arm/kernel/armksyms.c
> +++ b/arch/arm/kernel/armksyms.c
> @@ -83,10 +83,13 @@ EXPORT_SYMBOL(__raw_writesl);
> EXPORT_SYMBOL(strchr);
> EXPORT_SYMBOL(strrchr);
> EXPORT_SYMBOL(memset);
> +EXPORT_SYMBOL(__memset);
> EXPORT_SYMBOL(__memset32);
> EXPORT_SYMBOL(__memset64);
> EXPORT_SYMBOL(memcpy);
> +EXPORT_SYMBOL(__memcpy);
> EXPORT_SYMBOL(memmove);
> +EXPORT_SYMBOL(__memmove);
> EXPORT_SYMBOL(memchr);
>
> EXPORT_SYMBOL(mmioset);
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-06-23 6:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-20 11:12 [PATCH] ARM: export __memset/__memcpy/__memmove Arnd Bergmann
2025-06-20 20:26 ` Linus Walleij
2025-06-22 20:29 ` Florian Fainelli
2025-06-23 6:27 ` Ahmad Fatoum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).