From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: ardb@kernel.org, Alexander Graf <agraf@csgraf.de>, u-boot@lists.denx.de
Subject: Re: [PATCH] efi_loader: Get rid of kaslr-seed
Date: Thu, 16 Dec 2021 18:01:12 +0200 [thread overview]
Message-ID: <YbtiyNTplKZ/EcOe@hades> (raw)
In-Reply-To: <9b4e59b2-5dd0-6c29-b1c7-8f42b64c231c@gmx.de>
Hi Heinrich,
> > @@ -40,6 +40,28 @@ static void efi_reserve_memory(u64 addr, u64 size, bool nomap)
> > addr, size);
> > }
> >
> > +/**
> > + * efi_remove_kaslr_seed() - Removed unused kaslr-seed
>
> name mismatch
>
> > + *
> > + * Kernel's EFI STUB only relies on EFI_RNG_PROTOCOL for randomization
> > + * and completely ignores the kaslr-seed. Weed it out from the DTB we
> > + * hand over, which would mess up our DTB TPM measurements as well.
> > + *
> > + * @fdt: Pointer to device tree
> > + */
> > +void efi_purge_kaslr_seed(void *fdt)
> > +{
> > + int nodeoff = fdt_path_offset(fdt, "/chosen");
> > + int err = 0;
> > +
> > + if (nodeoff < 0)
> > + return;
> > +
> > + err = fdt_delprop(fdt, nodeoff, "kaslr-seed");
> > + if (err < 0)
> > + log_err("Error deleting kaslr-seed\n");
>
> If the node does not present this is not an error!
Ah true, I'll fix that
Cheers
/Ilias
prev parent reply other threads:[~2021-12-16 16:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-16 14:52 [PATCH] efi_loader: Get rid of kaslr-seed Ilias Apalodimas
2021-12-16 14:54 ` Ard Biesheuvel
2021-12-16 16:56 ` Mark Kettenis
2021-12-16 17:12 ` Ard Biesheuvel
2021-12-16 17:55 ` Mark Kettenis
2021-12-16 19:00 ` Ard Biesheuvel
2021-12-16 19:53 ` Ilias Apalodimas
2021-12-16 15:25 ` Mark Kettenis
2021-12-16 15:28 ` Ard Biesheuvel
2021-12-16 15:48 ` Mark Kettenis
2021-12-16 15:56 ` Ilias Apalodimas
2021-12-16 15:59 ` Heinrich Schuchardt
2021-12-16 16:04 ` Ilias Apalodimas
2021-12-16 15:59 ` Heinrich Schuchardt
2021-12-16 16:01 ` Ilias Apalodimas [this message]
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=YbtiyNTplKZ/EcOe@hades \
--to=ilias.apalodimas@linaro.org \
--cc=agraf@csgraf.de \
--cc=ardb@kernel.org \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox