]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
s390/kexec_file: Fix detection of text segment in ELF loader
authorPhilipp Rudo <prudo@linux.ibm.com>
Mon, 1 Apr 2019 10:48:43 +0000 (12:48 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 13 Aug 2019 12:11:36 +0000 (14:11 +0200)
commit8e2072c6fe802c4fd47f2420f70955101cecb8aa
treeb4acbd8395d3c0d4277d13a004528bbc47bdb968
parent27b255afba29530b6005b73f878af5e6cb2dfb3c
s390/kexec_file: Fix detection of text segment in ELF loader

BugLink: https://bugs.launchpad.net/bugs/1837517
[ Upstream commit 729829d775c9a5217abc784b2f16087d79c4eec8 ]

To register data for the next kernel (command line, oldmem_base, etc.) the
current kernel needs to find the ELF segment that contains head.S. This is
currently done by checking ifor 'phdr->p_paddr == 0'. This works fine for
the current kernel build but in theory the first few pages could be
skipped. Make the detection more robust by checking if the entry point lies
within the segment.

Signed-off-by: Philipp Rudo <prudo@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
arch/s390/kernel/kexec_elf.c