]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
arm64: kexec_file: try more regions if loading segments fails
authorBenjamin Gwin <bgwin@google.com>
Tue, 3 Nov 2020 20:11:06 +0000 (12:11 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Nov 2020 18:22:14 +0000 (19:22 +0100)
commit950fd0db5dbfc2f8e1c89c7c19c65daf2684ad9e
tree512fa13a2fe7c1f83171d4df68591252dd74d681
parentf3c3bb3bf862c4527a0cc6df60d6560419a1bd26
arm64: kexec_file: try more regions if loading segments fails

[ Upstream commit 108aa503657ee2fe8aa071dc620d96372c252ecd ]

It's possible that the first region picked for the new kernel will make
it impossible to fit the other segments in the required 32GB window,
especially if we have a very large initrd.

Instead of giving up, we can keep testing other regions for the kernel
until we find one that works.

Suggested-by: Ryan O'Leary <ryanoleary@google.com>
Signed-off-by: Benjamin Gwin <bgwin@google.com>
Link: https://lore.kernel.org/r/20201103201106.2397844-1-bgwin@google.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm64/kernel/kexec_image.c
arch/arm64/kernel/machine_kexec_file.c