public inbox for linux-efi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] efi: measure kernel command line
@ 2022-09-20 12:27 Ard Biesheuvel
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Ard Biesheuvel @ 2022-09-20 12:27 UTC (permalink / raw)
  To: linux-efi
  Cc: Ard Biesheuvel, Peter Jones, Matthew Garrett, Daniel Kiper,
	Ilias Apalodimas, Xu, Min M

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-20 12:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-20 12:27 [PATCH v2 0/2] efi: measure kernel command line Ard Biesheuvel
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox