Thread (5 messages) 5 messages, 2 authors, 2022-08-30

Re: [PATCH v2 00/10] crypto: Kconfig - simplify menus and help text

From: Christophe Leroy <hidden>
Date: 2022-08-30 07:20:32


Le 29/08/2022 à 15:59, Elliott, Robert (Servers) a écrit :
quoted
-----Original Message-----
From: Christophe Leroy <redacted>
Sent: Monday, August 29, 2022 3:53 AM
To: Elliott, Robert (Servers) <redacted>; Nayna
[off-list ref]; Andrew Donnellan [off-list ref]
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v2 00/10] crypto: Kconfig - simplify menus and help
text

Le 29/08/2022 à 02:05, Elliott, Robert (Servers) a écrit :
quoted
quoted
-----Original Message-----
From: Christophe Leroy <redacted>
Sent: Sunday, August 28, 2022 2:33 AM
To: Elliott, Robert (Servers) <redacted>; Nayna
[off-list ref]; Andrew Donnellan [off-list ref]
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v2 00/10] crypto: Kconfig - simplify menus and help
text

Le 27/08/2022 à 22:06, Elliott, Robert (Servers) a écrit :
quoted
(adding Christophe, per
bba496656a73fc1 ("powerpc/32: Fix boot failure with GCC latent entropy
plugin")
quoted
Adding libmpc-devel gets all the architectures building except powerpc.

(I also installed gcc-plugins-devel to get the native x86
build to detect plugins.)

However, powerpc still fails to build. Several of the Linux standard
include files end up including nodemask.h, which includes random.h,
which has a problem finding a global called latent_entropy while
building init/main.o:
Isn't it fixed in mainline by commit 012e8d2034f1 ("gcc-plugins:
Undefine LATENT_ENTROPY_PLUGIN when plugin disabled for a file") ?
Yes, adding that patch fixes this particular problem. Thanks!

Next up is:
Cannot find symbol for section 94: .text.free_initmem.
init/main.o: failed
make[2]: *** [../scripts/Makefile.build:249: init/main.o] Error 1
Can you please provide some context, which .config, which version of
gcc/binutils etc ....

FWIW, free_initmem() is supposed to be in arch/powerpc/mm/mem.o
I'm running the same commands for each architecture:
make ARCH=powerpc O=build-powerpc CROSS_COMPILE=powerpc64-linux-gnu- clean
make ARCH=powerpc O=build-powerpc CROSS_COMPILE=powerpc64-linux-gnu- mrproper
make ARCH=powerpc O=build-powerpc CROSS_COMPILE=powerpc64-linux-gnu- allmodconfig
make ARCH=powerpc O=build-powerpc CROSS_COMPILE=powerpc64-linux-gnu- olddefconfig
make ARCH=powerpc O=build-powerpc CROSS_COMPILE=powerpc64-linux-gnu- -j 55

For 6.0-rc3 (which includes 012e8d2034f1), that works for
     arm, arm64, sparc, and s390
but fails for
     mips, powerpc, and x86.

mips complains about:
../include/linux/fortify-string.h:44:33: error: ‘__builtin_memcmp’ specified bound 6 exceeds source size 0 [-W
error=stringop-overread]
    44 | #define __underlying_memcmp     __builtin_memcmp
       |                                 ^

x86 complains about:
You are building kernel with non-retpoline compiler.
Please update your compiler.

(I'm using gcc 12.2.1, from Fedora 36)

For powerpc, these are the error/failed/Cannot lines:

Cannot find symbol for section 19: .text.create_section_mapping.
Cannot find symbol for section 94: .text.free_initmem.
Cannot find symbol for section 27: .text.copy_from_kernel_nofault_allowed.
Cannot find symbol for section 31: .text.arch_suspend_disable_irqs.
Cannot find symbol for section 53: .text.arch_resume_nosmt.
Cannot find symbol for section 223: .text.arch_cpu_idle_prepare.
Cannot find symbol for section 44: .text.arch_show_interrupts.
Cannot find symbol for section 183: .text.arch_asym_cpu_priority.
Cannot find symbol for section 157: .text.module_arch_cleanup.
Cannot find symbol for section 13: .text.sched_clock.
Cannot find symbol for section 10: .text.arch_report_meminfo.
Cannot find symbol for section 18: .text.dereference_module_function_descriptor.
This is an issue in recordmcount together with binutils 37 when 
CONFIG_LD_DEAD_CODE_DATA_ELIMINATION is selected. There is some work in 
progress to replace recordmcount by objtool on powerpc, but it is not 
yet available, and even with objtool there may still be an issue with 
binutils 37 allthough it doesn't throw an error at build.

Unfortunately, Fedora 36 is shipped with 
binutils-powerpc64-linux-gnu-2.37-7.fc36.x86_64


If you take the crosstools from kernel.org, it works because they don't 
use binutils 37. See https://mirrors.edge.kernel.org/pub/tools/crosstool/.
All older ones are available at 
https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/

gcc 11.1 uses binutils 36.1
gcc 11.3 uses binutils 38
gcc 12.1 uses binutils 38
gcc 12.2 uses binutils 39

Christophe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help