Disable fallback to legacy mode if shim is loaded on x86 archs
authorJulian Andres Klode <julian.klode@canonical.com>
Wed, 19 Jul 2023 13:52:09 +0000 (15:52 +0200)
committerJulian Andres Klode <jak@debian.org>
Sun, 2 Nov 2025 11:08:11 +0000 (12:08 +0100)
Gbp-Pq: Topic secure-boot
Gbp-Pq: Name disable-efi-fallback-to-legacy.patch

grub-core/loader/efi/linux.c

index 2c7c874f22915f5de02e846027e86032776689ec..41d1728ae37619eec504ae2dd6cd69cc1029a98a 100644 (file)
@@ -473,22 +473,6 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
 
   grub_dl_ref (my_mod);
 
-  if (grub_is_using_legacy_shim_lock_protocol () == true)
-    {
-#if defined(__i386__) || defined(__x86_64__)
-      grub_dprintf ("linux", "using legacy shim_lock protocol, falling back to legacy Linux kernel loader\n");
-
-      err = grub_cmd_linux_x86_legacy (cmd, argc, argv);
-
-      if (err == GRUB_ERR_NONE)
-       return GRUB_ERR_NONE;
-      else
-       goto fail;
-#else
-      grub_dprintf ("linux", "using legacy shim_lock protocol on non-x86, only db verifiable kernels will work\n");
-#endif
-    }
-
   if (argc == 0)
     {
       grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));