[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADVatmO9XzFnX+N0TuOtr0FYyxKr1oe5RAhCEJjmnvjteT5QNw@mail.gmail.com>
Date: Sun, 17 Jul 2022 10:12:42 +0100
From: Sudip Mukherjee <sudipm.mukherjee@...il.com>
To: Michael Ellerman <mpe@...erman.id.au>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Kees Cook <keescook@...omium.org>
Cc: linuxppc-dev@...ts.ozlabs.org,
linux-kernel <linux-kernel@...r.kernel.org>,
linux-hardening@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: mainline build failure of powerpc allmodconfig for prom_init_check
On Thu, Jul 14, 2022 at 9:55 AM Sudip Mukherjee (Codethink)
<sudipm.mukherjee@...il.com> wrote:
>
> Hi All,
>
> Not sure if it has been reported before but the latest mainline kernel
> branch fails to build for powerpc allmodconfig with gcc-12 and the error is:
>
> Error: External symbol 'memset' referenced from prom_init.c
> make[2]: *** [arch/powerpc/kernel/Makefile:204: arch/powerpc/kernel/prom_init_check] Error 1
I was trying to check it. With gcc-11 the assembly code generated is
not using memset, but using __memset.
But with gcc-12, I can see the assembly code is using memset. One
example from the assembly:
call_prom:
.quad .call_prom,.TOC.@...base,0
.previous
.size call_prom,24
.type .call_prom,@function
.call_prom:
mflr 0 #,
std 29,-24(1) #,
std 30,-16(1) #,
std 31,-8(1) #,
mr 29,3 # tmp166, service
mr 31,4 # nargs, tmp167
mr 30,5 # tmp168, nret
# arch/powerpc/kernel/prom_init.c:396: struct prom_args args;
li 4,254 #,
li 5,52 #,
# arch/powerpc/kernel/prom_init.c:394: {
std 0,16(1) #,
stdu 1,-208(1) #,,
# arch/powerpc/kernel/prom_init.c:396: struct prom_args args;
addi 3,1,112 # tmp174,,
# arch/powerpc/kernel/prom_init.c:394: {
std 9,304(1) #,
std 10,312(1) #,
std 6,280(1) #,
std 7,288(1) #,
std 8,296(1) #,
# arch/powerpc/kernel/prom_init.c:396: struct prom_args args;
bl .memset #
nop
rldicl 9,31,0,32 # nargs, nargs
addi 9,9,1 # tmp163, nargs,
mtctr 9 # tmp163, tmp163
--
Regards
Sudip
Powered by blists - more mailing lists