From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: seanedmond@linux.microsoft.com
Cc: u-boot@lists.denx.de, dphadke@linux.microsoft.com,
macromorgan@hotmail.com, sjg@chromium.org
Subject: Re: [PATCH 2/3] fdt: kaslr seed from tpm entropy
Date: Fri, 8 Sep 2023 19:42:35 +0300 [thread overview]
Message-ID: <ZPtO+7sQx5Tuin0n@hera> (raw)
In-Reply-To: <20230804233357.65214-3-seanedmond@linux.microsoft.com>
Hi Sean,
On Fri, Aug 04, 2023 at 04:33:56PM -0700, seanedmond@linux.microsoft.com wrote:
> From: Dhananjay Phadke <dphadke@linux.microsoft.com>
>
> Add support for KASLR seed from TPM device. Invokes tpm_get_random()
> API to read 8-bytes of random bytes for KASLR.
Can you elaborate a bit more why you specifically need an RNG from the TPM?
>
> Signed-off-by: Dhananjay Phadke <dphadke@linux.microsoft.com>
> Signed-off-by: Drew Kluemke <ankluemk@microsoft.com>
> Signed-off-by: Sean Edmond <seanedmond@microsoft.com>
> ---
> boot/image-fdt.c | 3 +++
> common/fdt_support.c | 39 ++++++++++++++++++++++++++++++++++++++-
> include/fdt_support.h | 1 +
> lib/Kconfig | 9 +++++++++
> 4 files changed, 51 insertions(+), 1 deletion(-)
>
> diff --git a/boot/image-fdt.c b/boot/image-fdt.c
> index f10200f647..127443963e 100644
> --- a/boot/image-fdt.c
> +++ b/boot/image-fdt.c
> @@ -624,6 +624,9 @@ int image_setup_libfdt(struct bootm_headers *images, void *blob,
> goto err;
> }
>
> + if (IS_ENABLED(CONFIG_KASLR_TPM_SEED))
> + fdt_tpm_kaslr_seed(blob);
So, why can't we just add entropy from any available RNG? In Arm world we
could have TF-A, OP-TEE, an RNG hardware or a TPM capable of doing that (or
all of them).
Can't we just do
platform_get_rng_device(&dev);
dm_rng_read(....);
And even if we specifically need an RNG from a TPM, I think it's better to
find a way and teach platform_get_rng_device() to return a list of devices
in priority instead of hardcoding that.
[...]
Thanks
/Ilias
next prev parent reply other threads:[~2023-09-08 16:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-04 23:33 [PATCH 0/3] Populate kaslr seed with TPM seanedmond
2023-08-04 23:33 ` [PATCH 1/3] fdt: common API to populate kaslr seed seanedmond
2023-08-09 2:03 ` Simon Glass
2023-08-09 22:35 ` Sean Edmond
2023-08-10 1:49 ` Simon Glass
2023-08-10 18:17 ` Chris Morgan
2023-08-11 17:14 ` Sean Edmond
2023-08-12 13:09 ` Simon Glass
2023-08-14 19:12 ` Sean Edmond
2023-08-15 14:44 ` Simon Glass
2023-08-15 17:46 ` Sean Edmond
2023-08-17 16:03 ` Sean Edmond
2023-08-18 3:09 ` Simon Glass
2023-08-04 23:33 ` [PATCH 2/3] fdt: kaslr seed from tpm entropy seanedmond
2023-08-09 2:03 ` Simon Glass
2023-09-08 16:42 ` Ilias Apalodimas [this message]
2023-08-04 23:33 ` [PATCH 3/3] cmd: kaslrseed: Use common API to fixup FDT seanedmond
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=ZPtO+7sQx5Tuin0n@hera \
--to=ilias.apalodimas@linaro.org \
--cc=dphadke@linux.microsoft.com \
--cc=macromorgan@hotmail.com \
--cc=seanedmond@linux.microsoft.com \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
/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.