arm64: Use default kernel offset when the image file can't be seeked
While introducing new code to extract the kernel offset from the image, commit fd0a05bd ("arm64: Obtain text offset from kernel image") introduced a regression where something such as: ./lkvm run -c 8 -p earlycon <(zcat /boot/vmlinuz-5.8.0-rc5-00172-ga161216e31ba) now fails to load the kernel, as the file descriptor cannot be seeked. Let's assume the good old 0x80000 offset when the seek syscall fails, with a warning for a good measure. Fixes: fd0a05bd ("arm64: Obtain text offset from kernel image") Signed-off-by:Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20200716120801.2996-1-maz@kernel.org Signed-off-by:
Will Deacon <will@kernel.org>
Loading
Please register or sign in to comment