public inbox for linux-efi@vger.kernel.org
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ardb@kernel.org>
To: linux-efi@vger.kernel.org
Cc: Ard Biesheuvel <ardb@kernel.org>, Peter Jones <pjones@redhat.com>,
	Matthew Garrett <mjg59@google.com>,
	Daniel Kiper <daniel.kiper@oracle.com>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	"Xu, Min M" <min.m.xu@intel.com>
Subject: [PATCH v2 0/2] efi: measure kernel command line
Date: Tue, 20 Sep 2022 14:27:44 +0200	[thread overview]
Message-ID: <20220920122746.3553306-1-ardb@kernel.org> (raw)

Measuring the kernel command line (or more generically, image load
options in EFI parlance) is not covered by the TCG spec, which only
reasons about images started as boot options.

Let's work around this oversight by measuring the kernel command line
from the EFI stub itself. Since load options is essentially just a
sequence of bytes, which happens to be interpreted as UTF-16 and
subsequently converted into ASCII before being used as the kernel
command line, let's just measure the whole thing and not the resulting
ASCII string.

Cc: Peter Jones <pjones@redhat.com>
Cc: Matthew Garrett <mjg59@google.com>
Cc: Daniel Kiper <daniel.kiper@oracle.com>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: "Xu, Min M" <min.m.xu@intel.com>

Ilias Apalodimas (2):
  efi/libstub: refactor the initrd measuring functions
  efi/libstub: measure EFI LoadOptions

 drivers/firmware/efi/libstub/efi-stub-helper.c | 130 +++++++++++++-------
 drivers/firmware/efi/libstub/efistub.h         |   1 +
 2 files changed, 88 insertions(+), 43 deletions(-)

-- 
2.35.1


             reply	other threads:[~2022-09-20 12:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-20 12:27 Ard Biesheuvel [this message]
2022-09-20 12:27 ` [PATCH v2 1/2] efi/libstub: refactor the initrd measuring functions Ard Biesheuvel
2022-09-20 12:27 ` [PATCH v2 2/2] efi/libstub: measure EFI LoadOptions Ard Biesheuvel

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=20220920122746.3553306-1-ardb@kernel.org \
    --to=ardb@kernel.org \
    --cc=daniel.kiper@oracle.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=min.m.xu@intel.com \
    --cc=mjg59@google.com \
    --cc=pjones@redhat.com \
    /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