lkml.org 
[lkml]   [2023]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] arm64: remove kaslr-seed node when it had used
On Tue, Nov 14, 2023 at 09:55:51PM +0800, Enlin Mu wrote:
> From: Enlin Mu <enlin.mu@unisoc.com>
>
> If this node value is zero,it means that kaslr is enabled.
> Removing it for the system safe,nobody knows if this feature is
> enable or not.
>
> Signed-off-by: Enlin Mu <enlin.mu@unisoc.com>
> ---
> arch/arm64/kernel/pi/kaslr_early.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/kernel/pi/kaslr_early.c b/arch/arm64/kernel/pi/kaslr_early.c
> index 17bff6e399e4..bc35d4ed84b7 100644
> --- a/arch/arm64/kernel/pi/kaslr_early.c
> +++ b/arch/arm64/kernel/pi/kaslr_early.c
> @@ -81,7 +81,7 @@ static u64 get_kaslr_seed(void *fdt)
> return 0;
>
> ret = fdt64_to_cpu(*prop);
> - *prop = 0;
> + fdt_nop_property(fdt, node, "kaslr-seed");
> return ret;
> }

Why is it a problem to know that KASLR is enabled? Wouldn't the presence
of the FDT_NOPs also give a pretty good hint?

Will

\
 
 \ /
  Last update: 2023-11-20 14:02    [W:0.041 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site