All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: Russell King <linux@armlinux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Abbott Liu <liuwenliang@huawei.com>,
	Ard Biesheuvel <ardb@kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Ahmad Fatoum <a.fatoum@pengutronix.de>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] ARM: export __memset/__memcpy/__memmove
Date: Fri, 20 Jun 2025 13:12:44 +0200	[thread overview]
Message-ID: <20250620111257.3365489-1-arnd@kernel.org> (raw)

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



             reply	other threads:[~2025-06-20 13:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-20 11:12 Arnd Bergmann [this message]
2025-06-20 20:26 ` [PATCH] ARM: export __memset/__memcpy/__memmove Linus Walleij
2025-06-22 20:29 ` Florian Fainelli
2025-06-23  6:27 ` Ahmad Fatoum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250620111257.3365489-1-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=a.fatoum@pengutronix.de \
    --cc=ardb@kernel.org \
    --cc=arnd@arndb.de \
    --cc=f.fainelli@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=liuwenliang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.