lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <90a002a5-52b0-a028-b729-33a072c077c1@csgroup.eu>
Date:   Sun, 19 Jun 2022 08:55:16 +0200
From:   Christophe Leroy <christophe.leroy@...roup.eu>
To:     Guenter Roeck <linux@...ck-us.net>,
        Michael Ellerman <mpe@...erman.id.au>
Cc:     "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
        ul Mackerras <paulus@...ba.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Daniel Axtens <dja@...ens.net>
Subject: Re: [PATCH] powerpc/prom_init: Add memset as valid external symbol if
 CONFIG_KASAN=y



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@...erman.id.au>
>> Cc: Daniel Axtens <dja@...ens.net>
>> Signed-off-by: Guenter Roeck <linux@...ck-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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ