Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4784868rdb; Fri, 15 Sep 2023 12:07:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE3DWC2ELoL5efsQr2KxdEq81hWdL3AKHBfsI6HMMhSt636fu+pSAoCvnoERdCT+YdPCfiw X-Received: by 2002:a17:90a:bf90:b0:273:e073:1d02 with SMTP id d16-20020a17090abf9000b00273e0731d02mr2549773pjs.38.1694804876667; Fri, 15 Sep 2023 12:07:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694804876; cv=none; d=google.com; s=arc-20160816; b=0SEMN2qR+8U0UY79nytoF4Hj4Ui9YMrVPq6eKDDVexmtA4vEeepjdVBZdKgTq1+Zmg kZJ7TuyTCWRgDF3HkDvk8lUWjYabv1ASo1lt3ytQZDEKkjU2QvVJzmFP/ajJoWzf9C18 Bde0q9hDfWgbwF7j7q1MIbxlgi7C1HJIke8tOiLJQm3g2NkW2BlfHldSiZEEvsS2Mhgs D3cvZa6SqIvORiRpA+aE+GdqIlZnQwjrZpyn4dX5D0LgtzOi7YPVGuu0GPM9jJrbLLWA APCkqPyfcY5lia5vHk6/i2vORUe/XZR6/A67H/tItVuBkMrLN2VgiGFHNH/e3oNIt12B SR3A== 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=UQik1sImnP3JtDcAUVKtHO2B2JhgasNq9FvI7Jv8Wqk=; fh=+4OqbGpzCxmas2DP4pZ1nJh/emk0P1daWkmPXYtTQIs=; b=wwDCVerwBzkh/VxaSsofXtdIfkun/7NyNBOk67EtnLcYYEBEh25HHsMwFgmo6H/L8T LDd2WVMFClk2VXuEttmvfXsMbd/7AgOFt0Tn97zs8anX7pNhRPUnP3jKlzEjIPxsEa4X Mnpz0BCTnvY5W/bl5IMz2afXEO8CnnF6L8n8bEWWXebFEsIhck94B9UL8EuG3vUYNrll X8glpVaiuSjtB6kV/SU0hAo/QDVEcP3qSEIwBaVeBazA/xKvLkPY8NW0VKhcSwBFke5J U9R749/LC/FQuX2TGlvVh6i7IeQYusPDOmgIDAMrY2ovgE1DyIAbZa0WrJohIH7a/Z1L VBJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=hZrphL8D; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id il15-20020a17090b164f00b002692eb69014si6345708pjb.20.2023.09.15.12.07.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 12:07:56 -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=@google.com header.s=20230601 header.b=hZrphL8D; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 8FD3D8370812; Fri, 15 Sep 2023 06:22:31 -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 S235297AbjIONWc (ORCPT + 99 others); Fri, 15 Sep 2023 09:22:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235270AbjIONWb (ORCPT ); Fri, 15 Sep 2023 09:22:31 -0400 Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C30730D1 for ; Fri, 15 Sep 2023 06:21:48 -0700 (PDT) Received: by mail-qt1-x832.google.com with SMTP id d75a77b69052e-41761e9181eso250731cf.1 for ; Fri, 15 Sep 2023 06:21:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1694784107; x=1695388907; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=UQik1sImnP3JtDcAUVKtHO2B2JhgasNq9FvI7Jv8Wqk=; b=hZrphL8DPTEGN7qAAAhqLE8+4x4H2fDUQAuAkFd9V8k/T8ibASLW+okXtt2S0rHlry 6TyLq1FWg7qaouQXhKktUsR0Sb2kalOe2dQjobYhoXtefI60zivG1s31hgkTDzoB5Yxl 1L4VYwjra8NLaGJ4STo6zk+Efbslir5MGdyNxfBApnXjVwhmCMIAvwF0Yye8uwQgdRQh RdpMh91/hOgZvWPSOt+/JaRkQTDZlBe2PmZqt+Gu2qm2QO+g4790Dscw6U7zi/hdcLR5 PQCpfO+nSx9Upd0Gx9xLuqkNH+IDoWcYAKYdJPC/mYFxpWqZUxVGJPHrhzGEjHrEVJez nKpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694784107; x=1695388907; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UQik1sImnP3JtDcAUVKtHO2B2JhgasNq9FvI7Jv8Wqk=; b=GPPftiWVhjZbqDWte1J3a3m5KHaHT4rbbTjSBy6niIjbcIb2H1CgDWYWbvt0yeP8nC LIZl7V+QlCqwlTBjOodZ2g4mbypj4h1FU3sCaGDBXqC/AW8T9WAeg9zt2QA6KI4yeIW0 0Sa1zkRRfwSYy94lzHWGhedlGDQZ3paexFHZ7439H25r0nOGfhZ3f4UgZT+IbVu3FnGh gf6MbB8E7c9u5FUjW0luJzt5z32Hf1PcKpcftTR9nHJnqLDDkEN6ALRfWwHUjUbqZkU0 rJv2Z4Yzmhve1uA1tcCLzbKWPj7MNr3tzg7V0VR70o7apiLhEGonxhUyj0GxKscVDVf8 jKRQ== X-Gm-Message-State: AOJu0YzifFj85etg5/hR/5C5UQ2Qu1Y5p0aRVFnZHi8HuVzdhwnKZuQH s/Vn1xbg93Moh5S9PBQXK/hyaw1EybnmtaTPA+9rsA== X-Received: by 2002:ac8:4e51:0:b0:3de:1aaa:42f5 with SMTP id e17-20020ac84e51000000b003de1aaa42f5mr218397qtw.15.1694784107649; Fri, 15 Sep 2023 06:21:47 -0700 (PDT) MIME-Version: 1.0 References: <20230912090051.4014114-17-ardb@google.com> In-Reply-To: From: Ard Biesheuvel Date: Fri, 15 Sep 2023 15:21:36 +0200 Message-ID: Subject: Re: [PATCH v2 00/15] x86/boot: Rework PE header generation To: Ingo Molnar Cc: linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, Ard Biesheuvel , Evgeniy Baskov , Borislav Petkov , Dave Hansen , Ingo Molnar , Thomas Gleixner , Peter Jones , Matthew Garrett , Gerd Hoffmann , Kees Cook , "H. Peter Anvin" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 15 Sep 2023 06:22:31 -0700 (PDT) On Fri, Sep 15, 2023 at 1:31=E2=80=AFPM Ingo Molnar wrot= e: > > > * Ingo Molnar wrote: > > > > Ard Biesheuvel (15): > > > x86/efi: Drop EFI stub .bss from .data section > > > x86/efi: Disregard setup header of loaded image > > > x86/efi: Drop alignment flags from PE section headers > > > x86/boot: Remove the 'bugger off' message > > > x86/boot: Omit compression buffer from PE/COFF image memory footpri= nt > > > x86/boot: Drop redundant code setting the root device > > > x86/boot: Grab kernel_info offset from zoffset header directly > > > x86/boot: Drop references to startup_64 > > > > I've applied these first 8 patches to tip:x86/boot with minor edits. Thanks. > > (Please preserve existing comment capitalization conventions ...) > > Ack > > > x86/boot: Set EFI handover offset directly in header asm > > > x86/boot: Define setup size in linker script > > > x86/boot: Derive file size from _edata symbol > > > x86/boot: Construct PE/COFF .text section from assembler > > > x86/boot: Drop PE/COFF .reloc section > > > x86/boot: Split off PE/COFF .data section > > > x86/boot: Increase section and file alignment to 4k/512 > > > > The rest conflicted with recent upstream changes, and I suppose it's > > prudent to test these changes bit by bit anyway. > Agreed. So you mean this conflicts with other stuff queued up in -tip already, right? > So, the first 8 patches broke the x86-64-defconfig-ish Qemu bzImage bootu= p, > 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.