]> git.baikalelectronics.ru Git - 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)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 29 Apr 2019 08:43:46 +0000 (10:43 +0200)
commit94e1d2b34b30a7360a98355a815ffd7b595ef20f
tree8ac8b1f0692d1e9d155e379f1d0d33ed0fe8240b
parentdf4f917a3bce874eeb1f6e799f7142ce904f733c
s390/kexec_file: Fix detection of text segment in ELF loader

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>
arch/s390/kernel/kexec_elf.c