[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200330133701.GA10633@willie-the-truck>
Date: Mon, 30 Mar 2020 14:37:02 +0100
From: Will Deacon <will@...nel.org>
To: George Spelvin <lkml@....org>
Cc: linux-kernel@...r.kernel.org, Hsin-Yi Wang <hsinyi@...omium.org>,
Catalin Marinas <catalin.marinas@....com>,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [RFC PATCH v1 39/50] arm: kexec_file: Avoid temp buffer for RNG
seed
On Tue, Dec 10, 2019 at 10:45:27AM -0500, George Spelvin wrote:
> After using get_random_bytes(), you want to wipe the buffer
> afterward so the seed remains secret.
>
> In this case, we can eliminate the temporary buffer entirely.
> fdt_setprop_placeholder returns a pointer to the property value
> buffer, allowing us to put the random data directy in there without
s/directy/directly/
> using a temporary buffer at all. Faster and less stack all in one.
>
> Signed-off-by: George Spelvin <lkml@....org>
> Cc: Hsin-Yi Wang <hsinyi@...omium.org>
> Cc: Catalin Marinas <catalin.marinas@....com>
> Cc: Will Deacon <will@...nel.org>
> Cc: linux-arm-kernel@...ts.infradead.org
> ---
> arch/arm64/kernel/machine_kexec_file.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
Acked-by: Will Deacon <will@...nel.org>
Please let me know if you'd like this queued via the arm64 tree, as it
appears to be independent of the rest of this series.
Will
Powered by blists - more mailing lists