* [PATCH v2] efi/arm64: Update debug prints to reflect other entropy sources
@ 2021-01-20 16:38 Mark Brown
2021-01-20 16:47 ` Ard Biesheuvel
0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2021-01-20 16:38 UTC (permalink / raw)
To: Ard Biesheuvel; +Cc: Mark Brown, linux-efi, linux-arm-kernel
Currently the EFI stub prints a diagnostic on boot saying that KASLR will
be disabled if it is unable to use the EFI RNG protocol to obtain a seed
for KASLR. With the addition of support for v8.5-RNG and the SMCCC RNG
protocol it is now possible for KASLR to obtain entropy even if the EFI
RNG protocol is unsupported in the system, and the main kernel now
explicitly says if KASLR is active itself. This can result in a boot
log where the stub says KASLR has been disabled and the main kernel says
that it is enabled which is confusing for users.
Remove the explicit reference to KASLR from the diagnostics, the warnings
are still useful as EFI is the only source of entropy the stub uses when
randomizing the physical address of the kernel and the other sources may
not be available.
Signed-off-by: Mark Brown <broonie@kernel.org>
---
v2: Remove all reference to KASLR from the log messages and clarify
physical address randomization use of the EFI RNG seed.
drivers/firmware/efi/libstub/arm64-stub.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/firmware/efi/libstub/arm64-stub.c b/drivers/firmware/efi/libstub/arm64-stub.c
index 22ece1ad68a8..b69d63143e0d 100644
--- a/drivers/firmware/efi/libstub/arm64-stub.c
+++ b/drivers/firmware/efi/libstub/arm64-stub.c
@@ -61,10 +61,10 @@ efi_status_t handle_kernel_image(unsigned long *image_addr,
status = efi_get_random_bytes(sizeof(phys_seed),
(u8 *)&phys_seed);
if (status == EFI_NOT_FOUND) {
- efi_info("EFI_RNG_PROTOCOL unavailable, KASLR will be disabled\n");
+ efi_info("EFI_RNG_PROTOCOL unavailable\n");
efi_nokaslr = true;
} else if (status != EFI_SUCCESS) {
- efi_err("efi_get_random_bytes() failed (0x%lx), KASLR will be disabled\n",
+ efi_err("efi_get_random_bytes() failed (0x%lx)\n",
status);
efi_nokaslr = true;
}
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] efi/arm64: Update debug prints to reflect other entropy sources
2021-01-20 16:38 [PATCH v2] efi/arm64: Update debug prints to reflect other entropy sources Mark Brown
@ 2021-01-20 16:47 ` Ard Biesheuvel
0 siblings, 0 replies; 2+ messages in thread
From: Ard Biesheuvel @ 2021-01-20 16:47 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-efi, Linux ARM
On Wed, 20 Jan 2021 at 17:38, Mark Brown <broonie@kernel.org> wrote:
>
> Currently the EFI stub prints a diagnostic on boot saying that KASLR will
> be disabled if it is unable to use the EFI RNG protocol to obtain a seed
> for KASLR. With the addition of support for v8.5-RNG and the SMCCC RNG
> protocol it is now possible for KASLR to obtain entropy even if the EFI
> RNG protocol is unsupported in the system, and the main kernel now
> explicitly says if KASLR is active itself. This can result in a boot
> log where the stub says KASLR has been disabled and the main kernel says
> that it is enabled which is confusing for users.
>
> Remove the explicit reference to KASLR from the diagnostics, the warnings
> are still useful as EFI is the only source of entropy the stub uses when
> randomizing the physical address of the kernel and the other sources may
> not be available.
>
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
>
> v2: Remove all reference to KASLR from the log messages and clarify
> physical address randomization use of the EFI RNG seed.
>
Thanks Mark. I will merge this in efi/next
> drivers/firmware/efi/libstub/arm64-stub.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/firmware/efi/libstub/arm64-stub.c b/drivers/firmware/efi/libstub/arm64-stub.c
> index 22ece1ad68a8..b69d63143e0d 100644
> --- a/drivers/firmware/efi/libstub/arm64-stub.c
> +++ b/drivers/firmware/efi/libstub/arm64-stub.c
> @@ -61,10 +61,10 @@ efi_status_t handle_kernel_image(unsigned long *image_addr,
> status = efi_get_random_bytes(sizeof(phys_seed),
> (u8 *)&phys_seed);
> if (status == EFI_NOT_FOUND) {
> - efi_info("EFI_RNG_PROTOCOL unavailable, KASLR will be disabled\n");
> + efi_info("EFI_RNG_PROTOCOL unavailable\n");
> efi_nokaslr = true;
> } else if (status != EFI_SUCCESS) {
> - efi_err("efi_get_random_bytes() failed (0x%lx), KASLR will be disabled\n",
> + efi_err("efi_get_random_bytes() failed (0x%lx)\n",
> status);
> efi_nokaslr = true;
> }
> --
> 2.20.1
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-20 16:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-20 16:38 [PATCH v2] efi/arm64: Update debug prints to reflect other entropy sources Mark Brown
2021-01-20 16:47 ` Ard Biesheuvel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).