Skip to contentSkip to conversation

efi: Don't use knowledge about efi_guid_t internals

PATCH In review Andy Shevchenko 3 participants 7 messages Feb 9, 2021 – Aug 26, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 efi: Don't use knowledge about efi_guid_t internals

When print GUIDs supply pointer to the efi_guid_t (guid_t) type rather its internal members.

---
 security/integrity/platform_certs/efi_parser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
security/integrity/platform_certs/efi_parser.c +1 -1
index 18f01f36fe6a..d98260f8402a 100644
@@ -55,7 +55,7 @@ int __init parse_efi_signature_list(
 		memcpy(&list, data, sizeof(list));
 		pr_devel("LIST[%04x] guid=%pUl ls=%x hs=%x ss=%x\n",
 			 offs,
-			 list.signature_type.b, list.signature_list_size,
+			 &list.signature_type, list.signature_list_size,
 			 list.signature_header_size, list.signature_size);
 
 		lsize = list.signature_list_size;
Signature · 1 line
2.30.0
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Andy Shevchenko

When print GUIDs supply pointer to the efi_guid_t (guid_t) type rather its internal members.

Quoted 20 lines
---
 security/integrity/platform_certs/efi_parser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
security/integrity/platform_certs/efi_parser.c +1 -2
index 18f01f36fe6a..d98260f8402a 100644
@@ -55,7 +55,7 @@ int __init parse_efi_signature_list(
                memcpy(&list, data, sizeof(list));
                pr_devel("LIST[%04x] guid=%pUl ls=%x hs=%x ss=%x\n",
                         offs,
-                        list.signature_type.b, list.signature_list_size,
+                        &list.signature_type, list.signature_list_size,
                         list.signature_header_size, list.signature_size);
 
                lsize = list.signature_list_size;
--

2.30.0

#4 lore raw
Quoted 11 lines · Ard Biesheuvel
Quoted 9 lines · Andy Shevchenko
Quoted 8 lines · Ard Biesheuvel
Quoted 5 lines · Andy Shevchenko

When print GUIDs supply pointer to the efi_guid_t (guid_t) type rather its internal members.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Thanks!

Can we get this applied, please?

Apologies, this one slipped behind the desk.

Do I need to resend it?

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#5 lore raw
Quoted 15 lines · Andy Shevchenko
Quoted 13 lines · Ard Biesheuvel
Quoted 11 lines · Andy Shevchenko
Quoted 9 lines · Ard Biesheuvel
Quoted 5 lines · Andy Shevchenko

When print GUIDs supply pointer to the efi_guid_t (guid_t) type rather its internal members.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Thanks!

Can we get this applied, please?

Apologies, this one slipped behind the desk.

Do I need to resend it?

No, but I need an ack from James or Serge as it targets security/

maintainer Reviewed-by
#6 lore raw
Quoted 19 lines · Ard Biesheuvel
Quoted 17 lines · Andy Shevchenko
Quoted 15 lines · Ard Biesheuvel
Quoted 13 lines · Andy Shevchenko
Quoted 9 lines · Ard Biesheuvel
Quoted 5 lines · Andy Shevchenko

When print GUIDs supply pointer to the efi_guid_t (guid_t) type rather its internal members.

Thanks!

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line

Can we get this applied, please?

Apologies, this one slipped behind the desk.

Do I need to resend it?

No, but I need an ack from James or Serge as it targets security/

It looks correct to me, based on Documentation/core-api/printk-formats.rst and existing examples.

thanks
-serge