* [PATCH] arm64: adjust KASLR relocation after ARCH_RANDOM removal
@ 2022-07-21 10:04 ` Lukas Bulwahn
0 siblings, 0 replies; 6+ messages in thread
From: Lukas Bulwahn @ 2022-07-21 10:04 UTC (permalink / raw)
To: Ard Biesheuvel, Catalin Marinas, Will Deacon, linux-arm-kernel
Cc: Jason A . Donenfeld, kernel-janitors, linux-kernel, Lukas Bulwahn
Commit aacd149b6238 ("arm64: head: avoid relocating the kernel twice for
KASLR") adds the new file arch/arm64/kernel/pi/kaslr_early.c with a small
code part guarded by '#ifdef CONFIG_ARCH_RANDOM'.
Concurrently, commit 9592eef7c16e ("random: remove CONFIG_ARCH_RANDOM")
removes the config CONFIG_ARCH_RANDOM and turns all '#ifdef
CONFIG_ARCH_RANDOM' code parts into unconditional code parts, which is
generally safe to do.
Remove a needless ifdef guard after the ARCH_RANDOM removal.
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
---
arch/arm64/kernel/pi/kaslr_early.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/arch/arm64/kernel/pi/kaslr_early.c b/arch/arm64/kernel/pi/kaslr_early.c
index 6c3855e69395..17bff6e399e4 100644
--- a/arch/arm64/kernel/pi/kaslr_early.c
+++ b/arch/arm64/kernel/pi/kaslr_early.c
@@ -94,11 +94,9 @@ asmlinkage u64 kaslr_early_init(void *fdt)
seed = get_kaslr_seed(fdt);
if (!seed) {
-#ifdef CONFIG_ARCH_RANDOM
- if (!__early_cpu_has_rndr() ||
- !__arm64_rndr((unsigned long *)&seed))
-#endif
- return 0;
+ if (!__early_cpu_has_rndr() ||
+ !__arm64_rndr((unsigned long *)&seed))
+ return 0;
}
/*
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] arm64: adjust KASLR relocation after ARCH_RANDOM removal
@ 2022-07-21 10:04 ` Lukas Bulwahn
0 siblings, 0 replies; 6+ messages in thread
From: Lukas Bulwahn @ 2022-07-21 10:04 UTC (permalink / raw)
To: Ard Biesheuvel, Catalin Marinas, Will Deacon, linux-arm-kernel
Cc: Jason A . Donenfeld, kernel-janitors, linux-kernel, Lukas Bulwahn
Commit aacd149b6238 ("arm64: head: avoid relocating the kernel twice for
KASLR") adds the new file arch/arm64/kernel/pi/kaslr_early.c with a small
code part guarded by '#ifdef CONFIG_ARCH_RANDOM'.
Concurrently, commit 9592eef7c16e ("random: remove CONFIG_ARCH_RANDOM")
removes the config CONFIG_ARCH_RANDOM and turns all '#ifdef
CONFIG_ARCH_RANDOM' code parts into unconditional code parts, which is
generally safe to do.
Remove a needless ifdef guard after the ARCH_RANDOM removal.
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
---
arch/arm64/kernel/pi/kaslr_early.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/arch/arm64/kernel/pi/kaslr_early.c b/arch/arm64/kernel/pi/kaslr_early.c
index 6c3855e69395..17bff6e399e4 100644
--- a/arch/arm64/kernel/pi/kaslr_early.c
+++ b/arch/arm64/kernel/pi/kaslr_early.c
@@ -94,11 +94,9 @@ asmlinkage u64 kaslr_early_init(void *fdt)
seed = get_kaslr_seed(fdt);
if (!seed) {
-#ifdef CONFIG_ARCH_RANDOM
- if (!__early_cpu_has_rndr() ||
- !__arm64_rndr((unsigned long *)&seed))
-#endif
- return 0;
+ if (!__early_cpu_has_rndr() ||
+ !__arm64_rndr((unsigned long *)&seed))
+ return 0;
}
/*
--
2.17.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] 6+ messages in thread
* Re: [PATCH] arm64: adjust KASLR relocation after ARCH_RANDOM removal
2022-07-21 10:04 ` Lukas Bulwahn
@ 2022-07-22 15:17 ` Ard Biesheuvel
-1 siblings, 0 replies; 6+ messages in thread
From: Ard Biesheuvel @ 2022-07-22 15:17 UTC (permalink / raw)
To: Lukas Bulwahn
Cc: Catalin Marinas, Will Deacon, Linux ARM, Jason A . Donenfeld,
kernel-janitors, Linux Kernel Mailing List
On Thu, 21 Jul 2022 at 12:04, Lukas Bulwahn <lukas.bulwahn@gmail.com> wrote:
>
> Commit aacd149b6238 ("arm64: head: avoid relocating the kernel twice for
> KASLR") adds the new file arch/arm64/kernel/pi/kaslr_early.c with a small
> code part guarded by '#ifdef CONFIG_ARCH_RANDOM'.
>
> Concurrently, commit 9592eef7c16e ("random: remove CONFIG_ARCH_RANDOM")
> removes the config CONFIG_ARCH_RANDOM and turns all '#ifdef
> CONFIG_ARCH_RANDOM' code parts into unconditional code parts, which is
> generally safe to do.
>
> Remove a needless ifdef guard after the ARCH_RANDOM removal.
>
> Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
> ---
> arch/arm64/kernel/pi/kaslr_early.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm64/kernel/pi/kaslr_early.c b/arch/arm64/kernel/pi/kaslr_early.c
> index 6c3855e69395..17bff6e399e4 100644
> --- a/arch/arm64/kernel/pi/kaslr_early.c
> +++ b/arch/arm64/kernel/pi/kaslr_early.c
> @@ -94,11 +94,9 @@ asmlinkage u64 kaslr_early_init(void *fdt)
>
> seed = get_kaslr_seed(fdt);
> if (!seed) {
> -#ifdef CONFIG_ARCH_RANDOM
> - if (!__early_cpu_has_rndr() ||
> - !__arm64_rndr((unsigned long *)&seed))
> -#endif
> - return 0;
> + if (!__early_cpu_has_rndr() ||
> + !__arm64_rndr((unsigned long *)&seed))
> + return 0;
> }
>
> /*
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm64: adjust KASLR relocation after ARCH_RANDOM removal
@ 2022-07-22 15:17 ` Ard Biesheuvel
0 siblings, 0 replies; 6+ messages in thread
From: Ard Biesheuvel @ 2022-07-22 15:17 UTC (permalink / raw)
To: Lukas Bulwahn
Cc: Catalin Marinas, Will Deacon, Linux ARM, Jason A . Donenfeld,
kernel-janitors, Linux Kernel Mailing List
On Thu, 21 Jul 2022 at 12:04, Lukas Bulwahn <lukas.bulwahn@gmail.com> wrote:
>
> Commit aacd149b6238 ("arm64: head: avoid relocating the kernel twice for
> KASLR") adds the new file arch/arm64/kernel/pi/kaslr_early.c with a small
> code part guarded by '#ifdef CONFIG_ARCH_RANDOM'.
>
> Concurrently, commit 9592eef7c16e ("random: remove CONFIG_ARCH_RANDOM")
> removes the config CONFIG_ARCH_RANDOM and turns all '#ifdef
> CONFIG_ARCH_RANDOM' code parts into unconditional code parts, which is
> generally safe to do.
>
> Remove a needless ifdef guard after the ARCH_RANDOM removal.
>
> Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
> ---
> arch/arm64/kernel/pi/kaslr_early.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm64/kernel/pi/kaslr_early.c b/arch/arm64/kernel/pi/kaslr_early.c
> index 6c3855e69395..17bff6e399e4 100644
> --- a/arch/arm64/kernel/pi/kaslr_early.c
> +++ b/arch/arm64/kernel/pi/kaslr_early.c
> @@ -94,11 +94,9 @@ asmlinkage u64 kaslr_early_init(void *fdt)
>
> seed = get_kaslr_seed(fdt);
> if (!seed) {
> -#ifdef CONFIG_ARCH_RANDOM
> - if (!__early_cpu_has_rndr() ||
> - !__arm64_rndr((unsigned long *)&seed))
> -#endif
> - return 0;
> + if (!__early_cpu_has_rndr() ||
> + !__arm64_rndr((unsigned long *)&seed))
> + return 0;
> }
>
> /*
> --
> 2.17.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] 6+ messages in thread
* Re: [PATCH] arm64: adjust KASLR relocation after ARCH_RANDOM removal
2022-07-21 10:04 ` Lukas Bulwahn
@ 2022-08-17 14:58 ` Will Deacon
-1 siblings, 0 replies; 6+ messages in thread
From: Will Deacon @ 2022-08-17 14:58 UTC (permalink / raw)
To: linux-arm-kernel, Catalin Marinas, Lukas Bulwahn, Ard Biesheuvel
Cc: kernel-team, Will Deacon, linux-kernel, Jason A . Donenfeld,
kernel-janitors
On Thu, 21 Jul 2022 12:04:33 +0200, Lukas Bulwahn wrote:
> Commit aacd149b6238 ("arm64: head: avoid relocating the kernel twice for
> KASLR") adds the new file arch/arm64/kernel/pi/kaslr_early.c with a small
> code part guarded by '#ifdef CONFIG_ARCH_RANDOM'.
>
> Concurrently, commit 9592eef7c16e ("random: remove CONFIG_ARCH_RANDOM")
> removes the config CONFIG_ARCH_RANDOM and turns all '#ifdef
> CONFIG_ARCH_RANDOM' code parts into unconditional code parts, which is
> generally safe to do.
>
> [...]
Applied to arm64 (for-next/fixes), thanks!
[1/1] arm64: adjust KASLR relocation after ARCH_RANDOM removal
https://git.kernel.org/arm64/c/ff5900092227
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm64: adjust KASLR relocation after ARCH_RANDOM removal
@ 2022-08-17 14:58 ` Will Deacon
0 siblings, 0 replies; 6+ messages in thread
From: Will Deacon @ 2022-08-17 14:58 UTC (permalink / raw)
To: linux-arm-kernel, Catalin Marinas, Lukas Bulwahn, Ard Biesheuvel
Cc: kernel-team, Will Deacon, linux-kernel, Jason A . Donenfeld,
kernel-janitors
On Thu, 21 Jul 2022 12:04:33 +0200, Lukas Bulwahn wrote:
> Commit aacd149b6238 ("arm64: head: avoid relocating the kernel twice for
> KASLR") adds the new file arch/arm64/kernel/pi/kaslr_early.c with a small
> code part guarded by '#ifdef CONFIG_ARCH_RANDOM'.
>
> Concurrently, commit 9592eef7c16e ("random: remove CONFIG_ARCH_RANDOM")
> removes the config CONFIG_ARCH_RANDOM and turns all '#ifdef
> CONFIG_ARCH_RANDOM' code parts into unconditional code parts, which is
> generally safe to do.
>
> [...]
Applied to arm64 (for-next/fixes), thanks!
[1/1] arm64: adjust KASLR relocation after ARCH_RANDOM removal
https://git.kernel.org/arm64/c/ff5900092227
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
_______________________________________________
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] 6+ messages in thread
end of thread, other threads:[~2022-08-17 14:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-21 10:04 [PATCH] arm64: adjust KASLR relocation after ARCH_RANDOM removal Lukas Bulwahn
2022-07-21 10:04 ` Lukas Bulwahn
2022-07-22 15:17 ` Ard Biesheuvel
2022-07-22 15:17 ` Ard Biesheuvel
2022-08-17 14:58 ` Will Deacon
2022-08-17 14:58 ` Will Deacon
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.