Messages in this thread | | | Date | Mon, 30 Mar 2020 14:37:02 +0100 | From | Will Deacon <> | 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@sdf.org> > Cc: Hsin-Yi Wang <hsinyi@chromium.org> > Cc: Catalin Marinas <catalin.marinas@arm.com> > Cc: Will Deacon <will@kernel.org> > Cc: linux-arm-kernel@lists.infradead.org > --- > arch/arm64/kernel/machine_kexec_file.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-)
Acked-by: Will Deacon <will@kernel.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
| |