Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1877759lqz; Mon, 1 Apr 2024 23:26:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWXSWk0tpxR8duDM2h0RmPfrJzRS5WfElCOwSeMspiXnTyjuN16EopB4HVWzqnHraK/xpnNUXAPrBvoUE5Cc5WjM7B64+h5CU+LYiZU/Q== X-Google-Smtp-Source: AGHT+IG9+eFuk4MuxVPAp1cy/6+VPsZyc8SgBaz/47dfDKga9ygxR3nh20C486KR6q05WUvNnygF X-Received: by 2002:a17:90a:dd82:b0:29c:7028:62bc with SMTP id l2-20020a17090add8200b0029c702862bcmr9758044pjv.17.1712039212513; Mon, 01 Apr 2024 23:26:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712039212; cv=pass; d=google.com; s=arc-20160816; b=pHA650eP7ufWWqV5GP8pu5RYlD+fjpNoF3jjvJK//BYKOIZ/MfRmE6D4lo4lL6vETO 96cDvBX0HupU0YojK3dC8iWGn2JuPlqxLBtDHq7F3TZCQfGBHt7sIqLIsaug5BTygDfo 55edSLJW3VhxCZQiGSzqqQUeTgPYMpmjQrcCjhEdSgNL2JCh2cNkX0RVIxPg6Vcwy9s5 LW2B9EMsyBXFDh3h09YXpBz04gJXkYN0vOTeGPWzAZ/9EkF+miRAVFbfw4uYHNjas9Sp ctjJRLBsuSMqw2rmBVYrwNqAB66AI7vOQMGbMJ8DqoCK24JluvVXZmDwCEFP36/3B9Ey YHng== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=qWNlzf9hVn7Nq9JKKcMH71MNQcX1Kc7lHC9pZXRDUEw=; fh=CG5swC+cnIUI4+9L1gYPjgE7QOlCJCiyKju84opwJl4=; b=fbRIQOE8qql2UP0ikOr2s131QPjLaFaFlM7P1HqTcPIjqVAQbWFlu7dgPzmiwYzmVk XnPlzv3s2jt/tLsecBbpgwiiRkLac1ya6O1GVr8A6AeAlL3IjAVRPDksdF2Gb19WYmDP Y7MOFiTKfdpOgSFPef7H/OWkd0Bf4+lSN5DhPqnSGytQ6j7HDMYyTDeJ3axhh5d6qB4B 2s0Ij769AA2oN5NNnFbkydEEovd0F5gfAb/2zL7oeSPDeRP5KW3Z9vMk8u9fI7LxZI96 M5J3YWFwFdLUalT5d17bMYA99YsnqKNW4uPQ7xfxxLwZLS1+SL8Gqk+5n7jzbu9wXsOL /Jww==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pBoduPgq; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-127439-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127439-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id cm1-20020a17090afa0100b002a054304478si10469088pjb.78.2024.04.01.23.26.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 23:26:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-127439-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pBoduPgq; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-127439-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127439-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id CBEC6B2291B for ; Tue, 2 Apr 2024 06:25:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 409012230F; Tue, 2 Apr 2024 06:25:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pBoduPgq" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 65F8C200AE; Tue, 2 Apr 2024 06:25:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712039124; cv=none; b=LoJTMAWmhBZ52/me3l0EalLOZ6Ts6Qz52+1CXiN50O9EwMNIMKIt9akSzE/kzT3zm0BHwsI5PFEn2Ta6blbQGdozff8/egyUF51yjjbvSWsizAo9nvV50xSaujyjDrEiuSGafMUaGNwFVFVQl848bLcqAl9baOyZFwDoDFcm7tk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712039124; c=relaxed/simple; bh=qWNlzf9hVn7Nq9JKKcMH71MNQcX1Kc7lHC9pZXRDUEw=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Yygrqc01Y3vqCam3bKQJUCY1M5dJUoOdSDI8/ziRY85A2mRKhMbcd/L9sS5NopHUsinBuP3RN2TfF1y47wtv5UErVsIIwxXxJn5rBCT7GnEyiu4npS04Su3PHLEAFE4bSCOjTfy+IK+uqzCe9GrIM0mgWUfhrNx/G3PZvc5teII= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pBoduPgq; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 316BAC433A6; Tue, 2 Apr 2024 06:25:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712039124; bh=qWNlzf9hVn7Nq9JKKcMH71MNQcX1Kc7lHC9pZXRDUEw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=pBoduPgqQBVKrCZGKup28FQzuFNeO+1oV8fiEpigtfVatinFyIgw8ZNeOm9RV9FH6 ntME1QS8fJHbDm3yU08kpeokI284bAUWnhJAhU9MNV1GPhgImTbB9/S8VEEFCAHyC+ dCpQeNnF81SEhQbE183YkYPH5amLNKDUkm//gsoirkR57UMVmIh/0x/L9FAMHqcItg 7jjD8XksSDM72QGw25si1SDxvRsLWlBOJh/LLjmY8TH7Ff3pLkFxOFneDHIkEVGFiD AlsgRU/PdVJ0T8usj2NDb/5Jf5hde0+VAWtxQbgCg1MXchScoEmSrcTq2wOOqtCAKr ARDGciy3PXMig== Received: by mail-lj1-f174.google.com with SMTP id 38308e7fff4ca-2d6ee6c9945so35341831fa.3; Mon, 01 Apr 2024 23:25:24 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCWRsXm6tH2yvKTAdsimyaejpXNhxdOFLJCc+hPp1PORz3X99RnVokbgM6EztQiNfmGQynOWyOXw/A8urTj2OzPE63rXjHONiGD1oGDmYhEYbzB86eQk1uCT0ENihz3Apuke4YhJkcVu X-Gm-Message-State: AOJu0YyI0ZKDWL6JGyC5Yq/AQ9BxWQKdI8Umisn0dj4fjBb1HNYBz3yb ST/GSQvifv1mpaE5OpZopl960HGBnf/EvERXXMOWaTQErnNpN6kFyrwIXUJeSAKZJn+jUPFCW+H BOiukyGCLqT+P+dNAT6bRKQyqpjg= X-Received: by 2002:a2e:a606:0:b0:2d4:973e:247f with SMTP id v6-20020a2ea606000000b002d4973e247fmr7308348ljp.23.1712039122487; Mon, 01 Apr 2024 23:25:22 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240321150510.GI8211@craftyguy.net> <749b1cea4fd9e8d8debadc51cf3c0374d9878ae9@craftyguy.net> <20240401154436.GB26633@craftyguy.net> In-Reply-To: <20240401154436.GB26633@craftyguy.net> From: Ard Biesheuvel Date: Tue, 2 Apr 2024 09:25:10 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: x86_64 32-bit EFI mixed mode boot broken To: Clayton Craft Cc: Hans de Goede , x86@kernel.org, linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , regressions@lists.linux.dev Content-Type: text/plain; charset="UTF-8" On Tue, 2 Apr 2024 at 01:44, Clayton Craft wrote: > > On Sun, 24 Mar 2024 22:53:47 +0200 Ard Biesheuvel wrote: > > > > Thanks. > > > > > > > > I pushed another branch > > > > > > > > https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/log/?h=efi-clayton-3 > > > > > > > > which has a proper fix for the issue that you found. > > > > > > > > As it turns out, the compat mixed mode (with handover protocol) was > > > > > > > > broken from the beginning, and the change you identified just happened > > > > > > > > to trigger it on your hardware. > > > > > > > > > Tested and fixes booting on my Bay Trail tablet and NUC. Thanks for fixing this! > > > > > > Tested-by: Clayton Craft > > So... maybe my testing wasn't as thorough as I thought, OR I am experiencing an > unrelated problem. In any case, I'm having some difficulty figuring out what to > blame. When using this patch on the 6.6 LTS: > > 1) kernel seems to panic right after displaying `disabling bootcon [efifb0]`. I > determined that it's panicking by setting `panic=-1` and seeing it reboot after > showing that message. I can work around it by setting `keep_bootcon`, but that's > not ideal. > First of all, if you make it all the way to this point, it is unlikely that this is the same issue. The issue that was fixed was preventing the boot from proceeding past the very early 32-bit boot stage in the decompressor, and by the time you hit this panic, the kernel is up an running. > 2) kernel complains about no root (from initrd). I can work around this by > passing `initrd=my-initramfs` on the kernel cmdline. > So why is systemd-boot not passing this directly? AFAIK this is the default method for systemd-boot, and I don't think it implements any other methods. > I haven't tried any newer kernels yet. The second issue above makes me wonder if > your patch related to args might be to blame, but I'm not sure. Any help poking > around further would be greatly appreciated :) > You might try this stable -rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/log/?h=linux-6.6.y which should get released any day now. It has a couple of EFI related fixes, although none of them seem related in particular. Another thing you might try is to pass efi=noruntime to the boot, to check whether EFI is implicated in this to begin with.