Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp5194218rdb; Sat, 16 Sep 2023 06:50:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG9bdZ1reHq1qRQDirQkYGqUTVUAuJGlfhU35s+lC8Clzg7xZ02C+qScz3gFMZfd741fSXv X-Received: by 2002:a17:902:ecc5:b0:1c3:2df4:8791 with SMTP id a5-20020a170902ecc500b001c32df48791mr4862278plh.27.1694872256323; Sat, 16 Sep 2023 06:50:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694872256; cv=none; d=google.com; s=arc-20160816; b=0Go7hKMJ6GhmEKCPvvJ5TvlL9Lh8wnfM4P1CoopIVVDNsLCR+Gh2Vq9R9PMeW/+fh8 2g0g0cRPMBf9nd0PckEvOCVVz2zOzH813okKlKuWchwd6j6dGcRgT3ybl/qkwwFk3PcX MxiXFU6DKU2W5EqYRbICLqYxv/xyycdMEhGCrWv7G78FDtJ447J9i9516iyxBaEED3o+ K29Jqv3pNiDX/p8u0ZGw7G6UJEWTuWnFV/5/1jNOHEtrdev8zqnk0HcRn4pURaHenOyC x3FjldQoqSfw/N+5M12Y5XjgL4fGNhQtdjKy2h8UeFOUrvIJW3TFtICnx+fhVtsmMooT mTTA== 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=Cz0nFFjGS/VjM8ZCLU/MfUnOrqxOApO0n/0p+KUIE9A=; fh=Ks6uqCWcvLHCBPe032MNfWLdR2+dJcgPVuh8uW4J1jI=; b=a0BArlSaV85gXwZbfbDtNqH03EqgOHNTzvHqx/ywnYez7clRHYORpp38orEgC3NA+z t/2VC/h57B97nGXDdIo9cLlEmHb4jprunyyACve9bqbKp3wLHCQJlwzpDpr9/k1ltNey XULONA4t3wVP1B0kE8cHeWITPYcO9CcgmOoQccwse3BA730ctwC//q932nNze7EoSwG5 bEMBu0aYBoutDKwR7IXWVz8duBIuNcwbUbCekAnyD/poJ2fho0NSJnkbBNZi3lhi2xBu AO+Ze5IwyOQwYf2tpdw592rSPpvO2lMSyFlqheBplr6dBdJCmz6WAdh6jyI/8Xk0e/9C lrhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=W1qvaVaG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id o15-20020a170902d4cf00b001c1e4f9c63esi5294617plg.491.2023.09.16.06.50.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Sep 2023 06:50:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=W1qvaVaG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 0FA0B81121C2; Sat, 16 Sep 2023 02:13:23 -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 S238215AbjIPJLa (ORCPT + 99 others); Sat, 16 Sep 2023 05:11:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230487AbjIPJLL (ORCPT ); Sat, 16 Sep 2023 05:11:11 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F06C170E; Sat, 16 Sep 2023 02:11:02 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-99357737980so374427666b.2; Sat, 16 Sep 2023 02:11:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694855461; x=1695460261; 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=Cz0nFFjGS/VjM8ZCLU/MfUnOrqxOApO0n/0p+KUIE9A=; b=W1qvaVaGBUSIOUgy2tGvdv8QAVy8wuHbKDafVSVleIQzQjewyqtR5nk+xM+yVU0zjY nUy5nNivmR+vMsR/iR8q/OZ+YhMJS7dEe8wGoK78ekiRTmJf1Ejdws/TJRtN+iL42t8D uENeVA1ylI+LHykgGpZ0kxsPBKFybTqFtMol6hThjhkh8c7BGGsYBFGFQTsUpHendiw0 UVPFFsgXxosY7D74zzfBfIrSffNSOZPOvVLiRLGyOFXy0GACtFc0AI4IW1RkWapRklDr bNa9KAMW49Ze/YK9iMqtuh+N3jjaYPh9niqUBiQQzJXMEnQNPjNjofaV5Y2s6sHR3R2S JeLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694855461; x=1695460261; 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=Cz0nFFjGS/VjM8ZCLU/MfUnOrqxOApO0n/0p+KUIE9A=; b=Eim6auGGUQGq5ej3dQ96ZF9JOJ2UJ6xauCFaaxkff5Qreb/fgLXVsJ6Xm0qspkjHs9 p7r094XGKJVgeIkGS0yl+X92aLD7+xuKC05p+iNTuY815T1Pjs5ZK78nMVczONlnCsFB dBNAFzjL/GbofeVktd9iJ4EgVpbVA6L2nnlyqw0gr3tEgVdiTJFPqtn6uvVs3uCFIz+6 L+1aRTWzIYfjLWu5RZzTHfx9qoBhoResZAeYTfwJ5OpUvtddz+K1XQWJN8gfG+lP7hJZ 1F+WzQVfau+h8hMgf1C4zJwMuNngX/c/EIa/pqsaezVBcKD97vyOnpqE6NWj5bLrsadi idpg== X-Gm-Message-State: AOJu0Yx3g+fAixtcGVdi9ZFgw0hIgbrWDTx3rHpYsv7LMIomlPduCAbP EOmFdf+PreHL3oPs9SPDpHU= X-Received: by 2002:a17:906:73cc:b0:9ad:7e21:5a6d with SMTP id n12-20020a17090673cc00b009ad7e215a6dmr3664033ejl.33.1694855460588; Sat, 16 Sep 2023 02:11:00 -0700 (PDT) Received: from gmail.com (84-236-113-53.pool.digikabel.hu. [84.236.113.53]) by smtp.gmail.com with ESMTPSA id f19-20020a170906561300b009a16975ee5asm3460357ejq.169.2023.09.16.02.10.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Sep 2023 02:10:58 -0700 (PDT) Sender: Ingo Molnar Date: Sat, 16 Sep 2023 11:10:56 +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]); Sat, 16 Sep 2023 02:13:23 -0700 (PDT) * 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? Thanks, Ingo --- tip.orig/arch/x86/boot/setup.ld +++ tip/arch/x86/boot/setup.ld @@ -41,7 +41,7 @@ SECTIONS LONG(0x5a5aaa55) /* Reserve some extra space for the reloc and compat sections */ - setup_size = ABSOLUTE(ALIGN(. + 64, 512)); + setup_size = ALIGN(ABSOLUTE(.) + 64, 512); setup_sects = ABSOLUTE(setup_size / 512); }