Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1321831rwd; Sat, 27 May 2023 15:29:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7VBeeX0RkFxf/qXzTjZRf9vatKgwdVJ1umVEbM+R+5nYI0H0oUSJKhMgKcjEcWqjeyEINV X-Received: by 2002:a05:6a00:891:b0:643:2559:80f3 with SMTP id q17-20020a056a00089100b00643255980f3mr10508883pfj.2.1685226569658; Sat, 27 May 2023 15:29:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685226569; cv=none; d=google.com; s=arc-20160816; b=dPlOpFPS9eYAByNTH8XbsUCHjrWQHliqTBQwS+nhqpVfzMmv8hVCGQh/ygTOqONK94 BKDtGhWeEWFeHE+FErVjgjFhn4y3LfaoJJetr+N2dsBKY80XBSWV7wDuKJYRCW/t6EPF H38kaPPFM6WHDUCl5APkL1CFis7ji1/vtVeoijQP11RmrE/GitfbWmNQupPfNCxuGqXi cbK6hwcNFnVRkZPNQatkdKJsViMy1IB/a27dag3HYGQuegonOUMc2EvpdlhshZkO6RiN o53V2ic+jl/xn2CrTOg9+oCw7NDwJtrzRWRQYb54JlFNK3zZaSSUmGMiXajvEN5Ei0QT VWyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=XcV0CRj90YCAX78c57CfjwwWPMo1uG7M5MrUdK1qHoM=; b=O0lZVugwGcW9lS3KGJMA6Vttn49W5D5IuBFXKHXAO+FAGRuWoyK0AoEVPxhIVk5euB SASwcwo8EDe4i2x2BiQ0SpDuG6NuqU+UeLzyxnIbd+TrIq2zxm2IG8n7p+0KdPc66780 q3wdFc3eErQ01UhD5UerFfEWiFxjuzKo52iXYLRBeUda/g0xIvEI3sVR0QyLMVcvw5sG S43Dc2wo97H9e3PS+4z30qz3+eoWqeX+KgpgVXKoY0JpsuJbnOdnHKhfpmoGCswWG/zi sERFTbpD8i2PNLo5AJFviFU5Iz0Uy/cz0MBnG204m9jqp6OjoukFyjwVnNvpgnAaqvVa wPuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="IlRR9K/i"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z13-20020aa79f8d000000b0063f1582c50bsi7182710pfr.338.2023.05.27.15.29.07; Sat, 27 May 2023 15:29:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="IlRR9K/i"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229470AbjE0Vst (ORCPT + 99 others); Sat, 27 May 2023 17:48:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjE0Vsp (ORCPT ); Sat, 27 May 2023 17:48:45 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50FCFD8; Sat, 27 May 2023 14:48:44 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DC50761163; Sat, 27 May 2023 21:48:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 39E65C4339E; Sat, 27 May 2023 21:48:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685224123; bh=Vm5/RmUcnEK73zeR+XV3P+M+ZQNPsr35kUTRoGQH2Ak=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=IlRR9K/iSeiwMxZsnkKtAKw+FzR8F640PZNRtZy4jL2z8G/LQxeUKTZZulxRs5pwb vzHJP2IAivX7dq6e9dhIttasrfBUJSSyQWmLAg9dAO1y0OQxh2oNxwFcj7o0sjkzqM cTq5roEB18oDJURqIhgIGZF934TMnZoNcHzo1y8HukJ6nhUQQauwg9Zu/hMCExfG75 Q3kPVMR8yBhX4Uw7bHwbmJaBCdZl4iB1yezgggdCU4fWg7mwxuHXt+MLc5Tn2gQZfF CwgZEjnLYrgCzZmz5bsynQeirqOJlIu547xVJ4ohsFRrqr7r6y7DryfyUqcsGyJIa/ sEl7eXRxr/mNg== Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-4f3bb395e69so2233671e87.2; Sat, 27 May 2023 14:48:43 -0700 (PDT) X-Gm-Message-State: AC+VfDzltJ1BxzKKByr6fMfBr47+YEN6DfT0BwqsY+v6AAwr8HTOfw33 UczWlYmA/SHYIj/solPwcM5Z7h+3bo3nTGNbAyw= X-Received: by 2002:ac2:551b:0:b0:4f3:bbb2:c185 with SMTP id j27-20020ac2551b000000b004f3bbb2c185mr2162804lfk.3.1685224121168; Sat, 27 May 2023 14:48:41 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ard Biesheuvel Date: Sat, 27 May 2023 23:48:29 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: mix of ACPICA regression and EFISTUB regression (Was: kernel >= v6.2 no longer boots on Apple's Virtualization.framework (x86_64); likely to be related to ACPICA) To: Linus Torvalds Cc: Akihiro Suda , Bagas Sanjaya , linux-efi@vger.kernel.org, Linux Kernel Mailing List , Linux Regressions , Linux x86 , Linux ACPI , Linux ACPICA , Linux Stable , "Rafael J. Wysocki" , Jianmin Lv , Huacai Chen , Robert Moore Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 27 May 2023 at 21:40, Linus Torvalds wrote: > > On Sat, May 27, 2023 at 11:42=E2=80=AFAM Ard Biesheuvel = wrote: > > > > Yes, that makes the most sense. If the existing virtual machine BIOS > > has a hardcoded check that the EFI stub version is 1.0 even if it does > > not boot via EFI to begin with, I don't see how we can reasonably > > treat this as a regression that needs fixing on the Linux side. > > Well, we consider firmware issues to be the same as any hardware > issue. If firmware has a bug that requires us to do things certain > ways, that's really no different from hardware that requires some > insane init sequence. > > So why not just say that LINUX_EFISTUB_MINOR_VERSION should be 0, and > just add the comment that versioning doesn't work? > Fair enough. Or we could try bumping it from v1.1 to v2.0 (or v3.0 if we make it a bit mask). Akihiro, would you mind checking if changing the major/minor to any of these values results in the same problem? Unfortunately, the only data point we have is that a non-EFI bootloader (which is unlikely to carry a PE/COFF loader) needs the byte at that specific offset to be 0x0, and we really have no idea why, or whether we could hit this in other ways (i.e., by changing the PE/COFF header to comply with new MS requirements for secure boot, which is another thing that is in progress) > I'm not sure why this was tied into always enabling the initrd command > line loader. > For x86, it doesn't actually make a difference, but on other architectures, the command line initrd=3D loader could be disabled, but that possibility was removed. The idea was that by bumping the version to v1.1 at the same time, generic EFI loaders would be able to identify this capability without arch specific conditionals in the logic. Currently, GRUB and systemd-stub check this version field, but only for v1.0 or higher. Upstream GRUB switched to this generic version of the EFI loader just this week, but does not actually use initrd=3D at all for EFI boot (on any architecture). > Numbered version checks are a fundamentally broken and stupid concept > anyway. Don't do them. Just leave it at zero, and maybe some day there > is a sane model that actually has a bitfield of capabilities and > requirements. > Yeah, maybe you're right. Currently, only a single feature is tied to LINUX_EFISTUB_MAJOR_VERSION=3D=3D1 (LoadFile2 support for initrd loading), and this PE/COFF version field has no meaning to UEFI firmware itself, so we could simply treat these fields as bit masks if we wanted to (and setting the initrd command line loader bit for x86 would be redundant anyway) But not being able to freely set such a bit because some rarely used non-EFI BIOS implementation imposes requirements on the contents of the EFI specific image header is rather disappointing.