lkml.org 
[lkml]   [2022]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] powerpc/prom_init: Add memset as valid external symbol if CONFIG_KASAN=y
Date
If CONFIG_KASAN=y, powerpc:allmodconfig fails to build with the following
error.

Error: External symbol 'memset' referenced from prom_init.c

The problem was introduced with commit 41b7a347bf14 ("powerpc: Book3S
64-bit outline-only KASAN support"). So far, with CONFIG_KASAN=y, only
__memset was accepted as valid external symbol in prom_init_check.sh.
Add memset as well to fix the problem.

Fixes: 41b7a347bf14 ("powerpc: Book3S 64-bit outline-only KASAN support")
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Daniel Axtens <dja@axtens.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
arch/powerpc/kernel/prom_init_check.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/prom_init_check.sh b/arch/powerpc/kernel/prom_init_check.sh
index b183ab9c5107..787142b5dd26 100644
--- a/arch/powerpc/kernel/prom_init_check.sh
+++ b/arch/powerpc/kernel/prom_init_check.sh
@@ -16,7 +16,7 @@
grep "^CONFIG_KASAN=y$" .config >/dev/null
if [ $? -eq 0 ]
then
- MEM_FUNCS="__memcpy __memset"
+ MEM_FUNCS="__memcpy __memset memset"
else
MEM_FUNCS="memcpy memset"
fi
--
2.35.1
\
 
 \ /
  Last update: 2022-06-19 05:53    [W:0.040 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site