Skip to contentSkip to conversation

shim_lock: Enable module for all EFI platforms

PATCH In review Tianjia Zhang 4 participants 8 messages Jul 29, 2020 – Oct 27, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 shim_lock: Enable module for all EFI platforms

Like tpm, the module is only enabled for x86_64, but there's nothing specific to x86_64 in the implementation and can be enabled for all EFI platforms.

---
 grub-core/Makefile.core.def | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
grub-core/Makefile.core.def +1 -1
index 166b444c7..b5f47fc41 100644
@@ -950,7 +950,7 @@ module = {
 module = {
   name = shim_lock;
   common = commands/efi/shim_lock.c;
-  enable = x86_64_efi;
+  enable = efi;
 };
 
 module = {
Signature · 1 line
2.17.1
#1 lore raw
Quoted 14 lines · Tianjia Zhang

Like tpm, the module is only enabled for x86_64, but there's nothing specific to x86_64 in the implementation and can be enabled for all EFI platforms.

---
 grub-core/Makefile.core.def | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
grub-core/Makefile.core.def +0 -0
index 166b444c7..b5f47fc41 100644

grub-core/Makefile.core.def module = { · line 953

Quoted 5 lines
grub-core/Makefile.core.def +1 -1
@@ -950,7 +950,7 @@ module = {
 module = {
   name = shim_lock;
   common = commands/efi/shim_lock.c;
-  enable = x86_64_efi;
+  enable = efi;

Did you test this with x86 32-bit EFI builds and e.g. ARM64 EFI builds?

Daniel

#2 lore raw

Hi,

Quoted 23 lines · Daniel Kiper
Quoted 14 lines · Tianjia Zhang

Like tpm, the module is only enabled for x86_64, but there's nothing specific to x86_64 in the implementation and can be enabled for all EFI platforms.

---
  grub-core/Makefile.core.def | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
grub-core/Makefile.core.def +0 -0
index 166b444c7..b5f47fc41 100644

grub-core/Makefile.core.def module = { · line 953

Quoted 5 lines
grub-core/Makefile.core.def +1 -1
@@ -950,7 +950,7 @@ module = {
  module = {
    name = shim_lock;
    common = commands/efi/shim_lock.c;
-  enable = x86_64_efi;
+  enable = efi;

Did you test this with x86 32-bit EFI builds and e.g. ARM64 EFI builds?

Quoted 2 lines

Daniel

It is tested on x86_64-efi and arm64-efi platforms. I don’t have an environment for x86 32-bit EFI, and I haven’t tested on this platform.

Thanks.

#3 lore raw

Dear Tianjia,

Thank you for your patch and your reply.

Am 18.09.20 um 07:08 schrieb Tianjia Zhang:

Quoted 24 lines · Daniel Kiper
Quoted 10 lines · Tianjia Zhang
Quoted 9 lines

Like tpm, the module is only enabled for x86_64, but there's nothing specific to x86_64 in the implementation and can be enabled for all EFI platforms.

---
  grub-core/Makefile.core.def | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 12 lines

grub-core/Makefile.core.def module = { · line 953

Quoted 10 lines
grub-core/Makefile.core.def +1 -1
index 166b444c7..b5f47fc41 100644
@@ -950,7 +950,7 @@ module = {
   module = {
     name = shim_lock;
     common = commands/efi/shim_lock.c;
-  enable = x86_64_efi;
+  enable = efi;

Did you test this with x86 32-bit EFI builds and e.g. ARM64 EFI builds?

Quoted 1 line

It is tested on x86_64-efi and arm64-efi platforms. I don’t have an environment for x86 32-bit EFI, and I haven’t tested on this platform.

Please always mention that in the commit message. Please also be specific about the device you used (mainboard name, firmware name/version and TPM used) and the command you run for the test.

It’d be great if you could test 32-bit EFI with QEMU.

Kind regards,

Paul

#4 lore raw
In reply to Tianjia Zhang
Quoted 26 lines · Tianjia Zhang

Hi,

Quoted 23 lines · Daniel Kiper
Quoted 14 lines · Tianjia Zhang

Like tpm, the module is only enabled for x86_64, but there's nothing specific to x86_64 in the implementation and can be enabled for all EFI platforms.

---
  grub-core/Makefile.core.def | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
grub-core/Makefile.core.def +0 -0
index 166b444c7..b5f47fc41 100644

grub-core/Makefile.core.def module = { · line 953

Quoted 5 lines
grub-core/Makefile.core.def +1 -1
@@ -950,7 +950,7 @@ module = {
  module = {
    name = shim_lock;
    common = commands/efi/shim_lock.c;
-  enable = x86_64_efi;
+  enable = efi;

Did you test this with x86 32-bit EFI builds and e.g. ARM64 EFI builds?

Quoted 4 lines
Quoted 1 line

Daniel

It is tested on x86_64-efi and arm64-efi platforms. I don’t have an environment for x86 32-bit EFI, and I haven’t tested on this platform.

It looks that this patch does not break any builds. So, I took it.

Have a nice weekend,

Daniel

#5 lore raw
Quoted 4 lines · Daniel Kiper
Quoted 2 lines

It is tested on x86_64-efi and arm64-efi platforms. I don’t have an environment for x86 32-bit EFI, and I haven’t tested on this platform.

It looks that this patch does not break any builds. So, I took it.

Don't forget ia64 is an EFI platform as well. Would it break the build or the boot process in case it's not compatible.

I can test it if necessary.

Adrian

Signature · 4 lines
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [email protected]
`. `'   Freie Universitaet Berlin - [email protected]
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
#6 lore raw
Quoted 8 lines · John Paul Adrian Glaubitz
Quoted 4 lines · Daniel Kiper
Quoted 2 lines

It is tested on x86_64-efi and arm64-efi platforms. I don’t have an environment for x86 32-bit EFI, and I haven’t tested on this platform.

It looks that this patch does not break any builds. So, I took it.

Don't forget ia64 is an EFI platform as well. Would it break the build or the boot process in case it's not compatible.

It looks that all EFI stuff, including IA-64, build without any issue. However, if you could test IA-64 GRUB binary that would be great.

Have a nice weekend,

Daniel

#7 lore raw
Quoted 5 lines · Daniel Kiper
Quoted 4 lines · John Paul Adrian Glaubitz
Quoted 3 lines · Daniel Kiper
Quoted 2 lines

It is tested on x86_64-efi and arm64-efi platforms. I don’t have an environment for x86 32-bit EFI, and I haven’t tested on this platform.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

It looks that this patch does not break any builds. So, I took it.

Don't forget ia64 is an EFI platform as well. Would it break the build or the boot process in case it's not compatible.

It looks that all EFI stuff, including IA-64, build without any issue. However, if you could test IA-64 GRUB binary that would be great.

John, did you have a chance to run GRUB with shim_lock module on IA-64?

Daniel