Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1qM72L-0005aj-JC for mharc-grub-devel@gnu.org; Wed, 19 Jul 2023 09:16:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qM72I-0005Z2-IA for grub-devel@gnu.org; Wed, 19 Jul 2023 09:16:10 -0400 Received: from smtp-relay-internal-0.canonical.com ([185.125.188.122]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qM72F-0002w2-Kt for grub-devel@gnu.org; Wed, 19 Jul 2023 09:16:09 -0400 Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 10BEB3F0F7 for ; Wed, 19 Jul 2023 13:16:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1689772564; bh=JpMzdH07xWkVLYkUJJB1fq46k1bVaYs3dn9jU72uqVs=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=K4scjVRaVuQAaL0ibcNwcerp5vOuiWaXdpr5ccpgRR5XiKUuxRQtR06rseSddl7Xd FjMQhghK96U9LUR1U5CvNiDVWUTDp1w7sJgXN5GT8c7QDyuQx03fcBbdYNkDl6SCm4 5kvlasFRPAyxbQ74tlT9xNPWTdgAEq1AbteeHuUa3n6OWjuwYauonRiVm5yB2huVnl Yk7DhEhsPPnye67fGzJNao1Dg3fd8XjGEvKnHghDuEKIkGbYUn2/DurGVKuc4HAG+V H9wG2Jl2wdWiQv4q8YUzxx6bZv0/VivBwhEgFXydb1EyazyT75Wa//5XVMp8QvhntC m510I4wUAKVNw== Received: by mail-lf1-f70.google.com with SMTP id 2adb3069b0e04-4fbe4f88b67so5987798e87.0 for ; Wed, 19 Jul 2023 06:16:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689772563; x=1690377363; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JpMzdH07xWkVLYkUJJB1fq46k1bVaYs3dn9jU72uqVs=; b=j5ET2KN1U+PPviifyzqklUOcWVvCWeiAlG38xLODqAUWKrfYMpWoWjJFXDWOhb3JqM uuZMfB1733xXQ0BTduxj2r7jKZKIk4cgH+vyNXW/3bkBQK6fWCGtkr17vkW0nqy9+J+w xwi0pmMVDCb9tPPFu3I4OvLWpHMKUsgwgd4jsknQR5Covbdy4uW2vz13eqdI5IPGsMdM QbDutVfhrqqyAgnhFoPz3+2Xn+o1anEVcJmjW362ai8DZlZ30Ipi95zNm5VJxRIV5IDE /Tbdc24LaXpW1rkBDpPo4SDgf3ZMzNXwtd1jtk0UCRT9ZZs/kDszj/tqBzdOSfyPSF4n Etqw== X-Gm-Message-State: ABy/qLZ4LklYNk1CDCiLZ5RJZi06oSmBL+ZmYeDqI42CU/OvJ3Q0gYfB 4bWw6xNP6jqxs91JhBbPOy+woqOd52pww/P1eQiNWq64HP0Eq9Attr0ZcAIUDB44yn3y2MOy118 xvGlWnKsjFSW9gpYaHniiOpDc4u2i3vJGzBbX X-Received: by 2002:a05:6512:110e:b0:4fb:8771:e898 with SMTP id l14-20020a056512110e00b004fb8771e898mr2242712lfg.15.1689772562903; Wed, 19 Jul 2023 06:16:02 -0700 (PDT) X-Google-Smtp-Source: APBJJlG2spAB09zxk3OUZBSxLggch9e/2HgWCmz+vLxymjzdVNgaAJ2LKIqy8omhilzBCZNPNztuDg== X-Received: by 2002:a05:6512:110e:b0:4fb:8771:e898 with SMTP id l14-20020a056512110e00b004fb8771e898mr2242677lfg.15.1689772562369; Wed, 19 Jul 2023 06:16:02 -0700 (PDT) Received: from jak-t14-g3.. ([2a02:908:2812:7d20::34d9]) by smtp.gmail.com with ESMTPSA id l12-20020a1ced0c000000b003fc00212c1esm1680112wmh.28.2023.07.19.06.16.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jul 2023 06:16:01 -0700 (PDT) From: Julian Andres Klode To: grub-devel@gnu.org Cc: Julian Andres Klode Subject: [PATCH] efi: Set shim_lock_enabled even if validation is disabled Date: Wed, 19 Jul 2023 15:16:00 +0200 Message-Id: <20230719131600.95029-1-julian.klode@canonical.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=185.125.188.122; envelope-from=julian.klode@canonical.com; helo=smtp-relay-internal-0.canonical.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jul 2023 13:16:10 -0000 If validation has been disabled via MokSbState, secure boot on the firmware is still enabled, and the kernel fails to boot. This is a bit hacky, because shim_lock is not *fully* enabled, but it triggers the right code paths. Ultimately, all this will be resolved by shim gaining it's own image loading and starting protocol, so this is more a temporary workaround. Fixes: 6425c12cd (efi: Fallback to legacy mode if shim is loaded on x86 archs) Signed-off-by: Julian Andres Klode --- grub-core/kern/efi/sb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/grub-core/kern/efi/sb.c b/grub-core/kern/efi/sb.c index 60550a6da..ea15d4514 100644 --- a/grub-core/kern/efi/sb.c +++ b/grub-core/kern/efi/sb.c @@ -95,6 +95,7 @@ grub_efi_get_secureboot (void) if (!(attr & GRUB_EFI_VARIABLE_RUNTIME_ACCESS) && *moksbstate == 1) { secureboot = GRUB_EFI_SECUREBOOT_MODE_DISABLED; + shim_lock_enabled = true; goto out; } -- 2.40.1