Skip to contentSkip to conversation

Secure Boot Advanced Targeting (SBAT) support on powerpc

PATCH New Sudhakar Kuppusamy 1 participant 2 messages Apr 16, 2024

lore
Share & tools
lore
#0 lore raw

cover Secure Boot Advanced Targeting (SBAT) support on powerpc

This patch set contains the v0 for Secure Boot Advanced Targeting (SBAT) support on powerpc secure boot.

In powerpc, PE format Binary are not supported and can't use shim (https://github.com/rhboot/shim/blob/main/SBAT.md).
However, ELF binary are supported. So, we created new ELF note for SBAT in ELF binary which store the SBAT data and SBAT verifier will be there in firmware to read SBAT data from ELF note and validate it.

this patch series consists of 2 parts:

1) Patch 1: create new ELF Note for SBAT

we add a new ELF note for SBAT which store the SBAT data.
The name field of shall be the string "Secure-Boot-Advanced-Targeting", zero-padded to 4 byte alignment. The type field shall be 0x41536967 (the ASCII values for the string "sbat").

2) Patch 2: adding sbat data into sbat ELF Note

it reads the SBAT data from sbat.csv and create the ELF Note for it then store the SBAT data on it while generate image with -s option

Sudhakar Kuppusamy and Daniel Axtens (2):
mkimage: create new ELF Note for SBAT
mkimage: adding sbat data into sbat ELF Note on powerpc

 include/grub/util/mkimage.h |  4 +--
 util/grub-mkimagexx.c       | 61 ++++++++++++++++++++++++++++++++++---
 util/mkimage.c              | 21 ++++++++++---
 3 files changed, 74 insertions(+), 12 deletions(-)
Signature · 7 lines
2.39.3


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
#1 lore raw

PATCH 1/2 mkimage: create new ELF Note for SBAT

we add a new ELF note for SBAT which store the SBAT data.
The name field of shall be the string "Secure-Boot-Advanced-Targeting", zero-padded to 4 byte alignment. The type field shall be 0x41536967 (the ASCII values for the string "sbat").

---
 include/grub/util/mkimage.h |  4 +--
 util/grub-mkimagexx.c       | 61 ++++++++++++++++++++++++++++++++++---
 2 files changed, 58 insertions(+), 7 deletions(-)
include/grub/util/mkimage.h +2 -2
index 6f1da89b9..881e3031f 100644
@@ -51,12 +51,12 @@ grub_mkimage_load_image64 (const char *kernel_path,
 			   const struct grub_install_image_target_desc *image_target);
 void
 grub_mkimage_generate_elf32 (const struct grub_install_image_target_desc *image_target,
-			     int note, size_t appsig_size, char **core_img, size_t *core_size,
+			     int note, size_t appsig_size, char *sbat, char **core_img, size_t *core_size,
 			     Elf32_Addr target_addr,
 			     struct grub_mkimage_layout *layout);
 void
 grub_mkimage_generate_elf64 (const struct grub_install_image_target_desc *image_target,
-			     int note, size_t appsig_size, char **core_img, size_t *core_size,
+			     int note, size_t appsig_size, char *sbat, char **core_img, size_t *core_size,
 			     Elf64_Addr target_addr,
 			     struct grub_mkimage_layout *layout);
 
util/grub-mkimagexx.c +56 -5

117 lines not on this page · raw message

Signature · 7 lines
2.39.3


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel