]> git.baikalelectronics.ru Git - kernel.git/commit
s390: always build relocatable kernel
authorHeiko Carstens <hca@linux.ibm.com>
Sun, 30 Oct 2022 18:22:02 +0000 (19:22 +0100)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Tue, 8 Nov 2022 18:32:32 +0000 (19:32 +0100)
commit3d8a293733a4ee57dd92fa632da99f2548528630
treee3a4a2661afdd032707d48b1f1353d024c0b5256
parentc4a1155a5a282252681af02e21234bc6214b93ff
s390: always build relocatable kernel

Nathan Chancellor reported several link errors on s390 with
CONFIG_RELOCATABLE disabled, after binutils commit 906f69cf65da ("IBM
zSystems: Issue error for *DBL relocs on misaligned symbols"). The binutils
commit reveals potential miscompiles that might have happened already
before with linker script defined symbols at odd addresses.

A similar bug was recently fixed in the kernel with commit 1d0f9fc4832f
("s390: fix nospec table alignments").

See https://github.com/ClangBuiltLinux/linux/issues/1747 for an analysis
from Ulich Weigand.

Therefore always build a relocatable kernel to avoid this problem. There is
hardly any use-case for non-relocatable kernels, so this shouldn't be
controversial.

Link: https://github.com/ClangBuiltLinux/linux/issues/1747
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Reported-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20221030182202.2062705-1-hca@linux.ibm.com
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
arch/s390/Kconfig
arch/s390/Makefile
arch/s390/boot/Makefile
arch/s390/boot/startup.c