From: Stafford Horne <shorne@gmail.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: peter.maydell@linaro.org, pbonzini@redhat.com,
qemu-devel@nongnu.org, richard.henderson@linaro.org
Subject: Re: [PATCH v3 6/8] openrisc: re-randomize rng-seed on reboot
Date: Sat, 15 Oct 2022 16:52:04 +0000 [thread overview]
Message-ID: <Y0rlNIWFtqc3xSuW@oscomms1> (raw)
In-Reply-To: <20221014021653.1461512-7-Jason@zx2c4.com>
Hi Jason,
On Thu, Oct 13, 2022 at 08:16:51PM -0600, Jason A. Donenfeld wrote:
> When the system reboots, the rng-seed that the FDT has should be
> re-randomized, so that the new boot gets a new seed. Since the FDT is in
> the ROM region at this point, we add a hook right after the ROM has been
> added, so that we have a pointer to that copy of the FDT.
This looks good to me.
Acked-by: Stafford Horne <shorne@gmail.com>
> Cc: Stafford Horne <shorne@gmail.com>
> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
> ---
> hw/openrisc/boot.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/hw/openrisc/boot.c b/hw/openrisc/boot.c
> index 128ccbcba2..007e80cd5a 100644
> --- a/hw/openrisc/boot.c
> +++ b/hw/openrisc/boot.c
> @@ -14,6 +14,7 @@
> #include "hw/openrisc/boot.h"
> #include "sysemu/device_tree.h"
> #include "sysemu/qtest.h"
> +#include "sysemu/reset.h"
>
> #include <libfdt.h>
>
> @@ -111,6 +112,8 @@ uint32_t openrisc_load_fdt(void *fdt, hwaddr load_start,
>
> rom_add_blob_fixed_as("fdt", fdt, fdtsize, fdt_addr,
> &address_space_memory);
> + qemu_register_reset_nosnapshotload(qemu_fdt_randomize_seeds,
> + rom_ptr_for_as(&address_space_memory, fdt_addr, fdtsize));
>
> return fdt_addr;
> }
> --
> 2.37.3
>
next prev parent reply other threads:[~2022-10-15 16:53 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-14 2:16 [PATCH v3 0/8] rerandomize RNG seeds on reboot and handle record&replay Jason A. Donenfeld
2022-10-14 2:16 ` [PATCH v3 1/8] reset: allow registering handlers that aren't called by snapshot loading Jason A. Donenfeld
2022-10-24 11:06 ` Peter Maydell
2022-10-24 12:00 ` Jason A. Donenfeld
2022-10-24 12:28 ` Markus Armbruster
2022-10-24 12:39 ` Peter Maydell
2022-10-24 13:19 ` Markus Armbruster
2022-10-24 14:27 ` Peter Maydell
2022-10-24 17:39 ` Markus Armbruster
2022-10-25 0:56 ` Jason A. Donenfeld
2022-10-14 2:16 ` [PATCH v3 2/8] x86: do not re-randomize RNG seed on snapshot load Jason A. Donenfeld
2022-10-14 2:16 ` [PATCH v3 3/8] device-tree: add re-randomization helper function Jason A. Donenfeld
2022-10-14 2:16 ` [PATCH v3 4/8] arm: re-randomize rng-seed on reboot Jason A. Donenfeld
2022-10-14 2:16 ` [PATCH v3 5/8] riscv: " Jason A. Donenfeld
2022-10-14 2:16 ` [PATCH v3 6/8] openrisc: " Jason A. Donenfeld
2022-10-15 16:52 ` Stafford Horne [this message]
2022-10-14 2:16 ` [PATCH v3 7/8] rx: " Jason A. Donenfeld
2022-10-14 2:16 ` [PATCH v3 8/8] mips: " Jason A. Donenfeld
2022-10-20 17:38 ` [PATCH v3 0/8] rerandomize RNG seeds on reboot and handle record&replay Jason A. Donenfeld
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y0rlNIWFtqc3xSuW@oscomms1 \
--to=shorne@gmail.com \
--cc=Jason@zx2c4.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.