mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Guenter Roeck <linux@roeck-us.net>,
	Michael Ellerman <mpe@ellerman.id.au>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	ul Mackerras <paulus@samba.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Daniel Axtens <dja@axtens.net>
Subject: Re: [PATCH] powerpc/prom_init: Add memset as valid external symbol if CONFIG_KASAN=y
Date: Sun, 19 Jun 2022 08:55:16 +0200	[thread overview]
Message-ID: <90a002a5-52b0-a028-b729-33a072c077c1@csgroup.eu> (raw)
In-Reply-To: <9b2952c9-d6d7-b4c2-f5d6-cec8722decc8@csgroup.eu>



Le 19/06/2022 à 08:45, Christophe Leroy a écrit :
> 
> 
> Le 19/06/2022 à 05:52, Guenter Roeck a écrit :
>> 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.
> 
> No way. It is way too early to use the instrumented version of memset().

See commit 26deb04342e3 ("powerpc: prepare string/mem functions for 
KASAN") for more details

> 
> Did you try with the patch I sent ?
> 
> https://patchwork.ozlabs.org/project/linuxppc-dev/patch/3802811f7cf94f730be44688539c01bba3a3b5c0.1654875808.git.christophe.leroy@csgroup.eu/
> 
> Thanks
> Christophe
> 
>>
>> 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

      reply	other threads:[~2022-06-19  6:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-19  3:52 Guenter Roeck
2022-06-19  6:45 ` Christophe Leroy
2022-06-19  6:55   ` Christophe Leroy [this message]

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=90a002a5-52b0-a028-b729-33a072c077c1@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=dja@axtens.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®