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)
commitac49303d9ef0ad98b79867a380ef23480e48870b
tree712a6f50423cbf0bf3bd3e99a56789cf8b00dacc
parent388bb19be8eab4674a660e0c97eaf60775362bc7
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: 805bc0bc238f ("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