[PATCH] arm64: If 'getrandom' syscall fails, don't error out - just warn and proceed.
horms at verge.net.au
Mon Oct 29 03:15:05 PDT 2018
On Tue, Oct 23, 2018 at 01:50:20AM +0530, Bhupesh Sharma wrote:
> For calculating the random 'kaslr-seed' value to be passed to the
> secondary kernel (kexec or kdump), we invoke the 'getrandom' syscall
> inside 'setup_2nd_dtb()' function.
> Normally on most arm64 systems this syscall doesn't fail when the
> initrd scriptware (which arms kdump service) invokes the same.
> However, recently I noticed that on the 'hp-moonshot' arm64 boards,
> we have an issue with the newer kernels which causes the same
> to fail. As a result, the kdump service fails and we are not able
> to use the kdump infrastructure just after boot. As expected, once the
> random pool is sufficiently populated and we launch the kdump service
> arming scripts again (manually), then the kdump service is properly
> Lets handle the same, by not error'ing out if 'getrandom' syscall fails.
> Rather lets warn the user and proceed further by setting the
> 'kaslr-seed' value as 0 for the secondary kernel - which implies that it
> boots in a 'nokaslr' mode.
> Tested on my 'hp-moonshot' and 'qualcomm-amberwing' arm64 boards.
> Signed-off-by: Bhupesh Sharma <bhsharma at redhat.com>
More information about the kexec