]> git.baikalelectronics.ru Git - kernel.git/commit
s390/kaslr: add support for R_390_GLOB_DAT relocation type
authorGerald Schaefer <gerald.schaefer@de.ibm.com>
Mon, 21 Oct 2019 17:56:00 +0000 (19:56 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Tue, 22 Oct 2019 15:55:51 +0000 (17:55 +0200)
commit2d04c04a66ce4e405cd097f58308640cfc2318a2
tree712a6f50423cbf0bf3bd3e99a56789cf8b00dacc
parent3bee77c5bccdbb7c9794e7870d86ee974bf6f14a
s390/kaslr: add support for R_390_GLOB_DAT relocation type

Commit "bpf: Process in-kernel BTF" in linux-next introduced an undefined
__weak symbol, which results in an R_390_GLOB_DAT relocation type. That
is not yet handled by the KASLR relocation code, and the kernel stops with
the message "Unknown relocation type".

Add code to detect and handle R_390_GLOB_DAT relocation types and undefined
symbols.

Fixes: 82680dc5a8eb ("s390/kernel: build a relocatable kernel")
Cc: <stable@vger.kernel.org> # v5.2+
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/boot/startup.c
arch/s390/kernel/machine_kexec_reloc.c