Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp5861018rdb; Sun, 17 Sep 2023 16:21:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEAh+s4Nn9mtXcc6vSguhvA7TuRx4DsjLP8h9ipnGEiLOiJu+np6HkvrB/dRWqEAjXl2pVh X-Received: by 2002:a17:902:dacc:b0:1c5:70d3:f193 with SMTP id q12-20020a170902dacc00b001c570d3f193mr898738plx.10.1694992909428; Sun, 17 Sep 2023 16:21:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694992909; cv=none; d=google.com; s=arc-20160816; b=PpAg2hmVwoiBNrqKXdnGWBfvXUhJnczcpENkJXac/qzEsQr5GzBG/aseHtEB21NoHQ KG8rRsOV8x+sVkXmToKnJQbpLdoo+PgC2vExNcuMxQCeVVNmAOvMnox7L9yIXm3wkFyD Sq/KYtGrpPxrgVvsA4EqR3MGsR1Q1i87oICb/0dvhH61//oR574W0FvMgnNPKKSg5x85 uLRqwTFk88/PBaTtThFGT+zMHCp6tGP6K6ft2WtakabZKYSjgIdN5gU+puRRHP6stPsj IMSsqtX/xtfkbj9bfRTdI1afzXbdLF7iRkqjphST4ASz4dAS1iSMrpQnsCo5SK+PTg9s /x6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=GIu2xad4yPPJphEXscXACo8A+mc86HHOHMLqh4/KKH8=; fh=Ks6uqCWcvLHCBPe032MNfWLdR2+dJcgPVuh8uW4J1jI=; b=08PPBvD29DyU/fpzoae1acZE94JAQi/1j5LZ1pu9upaxTeGAjTrlwhmbTYjDXwUYSe L9eY5LCq4XtwtI5v4aq+3PIaeNZlPkRDrbL/etPC7Pstay0j6UfDHjYEdgCoTWLNVASf VX7ZiIggsKuqFPE9qHpBfs7FZtfm6+i9U+NOGR7lR80jKysVekH8iAB7crL7KdflOavC H6wNrKMFNycy8qHu6ryEP6CCVeKyaEYeR+J8xKoQqby17kC3xoXbJqCcWCX+N48pAewb rEeRzQuGENqqLOBn3wJIBEhdUW0oOrIqzuR0SKfiiKZV9jq4PQECJf726hEbu1WNIZ4S LHeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=FV9VP6Av; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id b13-20020a170902650d00b001c46edd8ecfsi2031895plk.276.2023.09.17.16.21.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Sep 2023 16:21:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=FV9VP6Av; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 1E3DE802C654; Sun, 17 Sep 2023 10:51:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237269AbjIQRuq (ORCPT + 99 others); Sun, 17 Sep 2023 13:50:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234032AbjIQRuW (ORCPT ); Sun, 17 Sep 2023 13:50:22 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2283FF4; Sun, 17 Sep 2023 10:50:17 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-3214de9cd8bso313737f8f.2; Sun, 17 Sep 2023 10:50:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694973015; x=1695577815; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=GIu2xad4yPPJphEXscXACo8A+mc86HHOHMLqh4/KKH8=; b=FV9VP6AvlR/cdTC6cFs//boxHepvhHpGFqK5SwUQa1QJE5fT9fhYpJbnl5Mpw9YXIa 1hEaVldBTrrqSBDwXNCpG2an5MciHYCcJCrESgw1AgncM/bOtEMR55P4/3eTxt0/EoLV h2qYEN0LWH+Pi5aEJ7bD1EwMhOmgrwYhOJjcakNu3TGpThEG6A5kSu59tZR29GqEsVej FC8s0v0OM88fXNXpjiN2+e14v+y4+N1wU8b4Z6ZmfO6hF7NKc0OxfYc6qepQPGkmSNmQ qb3xec+4r1B4cSwQSegJfRiv9ccStfJ+OnxFFvVYkwj9WCnOVdZsrEaZ+XEIdNrNz21A hrpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694973015; x=1695577815; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GIu2xad4yPPJphEXscXACo8A+mc86HHOHMLqh4/KKH8=; b=bWveCq+ID13kJGLETYdjrS1c8Y4fc5gHzdqc7Vll0akSGDpS9XistPLvhncM6yuedm k6EuusJs9LGdVSgOs/bqjJcat5CmnuGxyrAQm9XeFYGrXoQ+rvX3/ckGQms1MwrLJu0X zKMnZgtz2ZUjZQ4fMEeKeJyxQMIKEPBxOLyawaEc+n5nc/7kgVceN4sjDokLi3yo8jBz elaIC1eJ+xhPqGlZ6CCYByzQJxCRceD/1EKxr/S8xgVn5tugRHXswmbCBUnTPRqp/F9H THvpDGEUqWHN5QrgPk8oX1LXa1BCkwVGhkkvxiRWZPj/LHk/oi8tvjFgaTCYt/JNFwC+ dEhQ== X-Gm-Message-State: AOJu0YxzVujdDxJg+dC+kMYPZijrOgqApLE38y7wNZDKX6ky5kQZ0cbU MXDC7CCqNRGtDqtkLWP/n1E= X-Received: by 2002:a5d:5188:0:b0:318:7bc:122e with SMTP id k8-20020a5d5188000000b0031807bc122emr6450169wrv.23.1694973015444; Sun, 17 Sep 2023 10:50:15 -0700 (PDT) Received: from gmail.com (1F2EF265.nat.pool.telekom.hu. [31.46.242.101]) by smtp.gmail.com with ESMTPSA id t8-20020a5d42c8000000b00317a04131c5sm3329267wrr.57.2023.09.17.10.50.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Sep 2023 10:50:13 -0700 (PDT) Sender: Ingo Molnar Date: Sun, 17 Sep 2023 19:50:11 +0200 From: Ingo Molnar To: Ard Biesheuvel Cc: Ard Biesheuvel , linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, Evgeniy Baskov , Borislav Petkov , Dave Hansen , Ingo Molnar , Thomas Gleixner , Peter Jones , Matthew Garrett , Gerd Hoffmann , Kees Cook , "H. Peter Anvin" Subject: Re: [PATCH v2 00/15] x86/boot: Rework PE header generation Message-ID: References: <20230912090051.4014114-17-ardb@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS autolearn=no 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 17 Sep 2023 10:51:15 -0700 (PDT) * Ard Biesheuvel wrote: > On Sat, 16 Sept 2023 at 11:11, Ingo Molnar wrote: > > > > > > * Ard Biesheuvel wrote: > > > > > > > So, the first 8 patches broke the x86-64-defconfig-ish Qemu bzImage bootup, > > > > > due to the 8th patch: > > > > > > > > > > 988b52b207a9fe74c3699bda8c2256714926b94b is the first bad commit > > > > > commit 988b52b207a9fe74c3699bda8c2256714926b94b > > > > > Author: Ard Biesheuvel > > > > > Date: Tue Sep 12 09:01:01 2023 +0000 > > > > > > > > > > x86/boot: Define setup size in linker script > > > > > > > > > > I've removed it for now - but this side effect was not expected. > > > > > > > > > > > > > No, definitely not expected. I tested various combinations of i386 / > > > > x86_64 built with GCC / Clang doing EFI or BIOS boot. > > > > > > > > I'll rebase the remaining stuff onto -tip and see if I can reproduce this. > > > > > > This is actually quite bizarre. x86_64_defconfig has > > > CONFIG_EFI_MIXED=y and i tested that this change produces the exact > > > same bzImage binary in that case. > > > > > > Could you send me the .config and the QEMU command line perhaps? > > > > So the patch below is the delta between v2 and v3 - that is expected > > to fix the bzImage boot crash, right? > > > > Yes. > > ld.bfd does something unexpected [to me] here, and the resulting value > turns out not to be a multiple of 512 at all. > > With this tweak, my claim that this patch does not affect the binary > bzImage at all actually holds for ld.bfd as well (provided that > CONFIG_EFI_MIXED=y and CONFIG_LOCAL_VERSION_AUTO is disabled) Ok - it boots & works fine for me too now, with the full series applied. Thanks, Ingo