From patchwork Fri Sep 15 09:37:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 140442 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp1064789vqi; Fri, 15 Sep 2023 06:58:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHNv2Q0YOjXbHf/rDTQ7Qb9egPtlbt+sJO/2kGcq3bhFT2QHbOujMucPzaFUq7R677moMdG X-Received: by 2002:a17:902:e84c:b0:1c3:eb95:2d27 with SMTP id t12-20020a170902e84c00b001c3eb952d27mr1979178plg.48.1694786323082; Fri, 15 Sep 2023 06:58:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694786323; cv=none; d=google.com; s=arc-20160816; b=u/sFTdd5ftyDScrxIOOXFCpTlEh0MNPjUtiyKS2oXvvttFPnQ+Ho6ZMJY3LkR4nl0M cWuo2W/IVIShHyHQlg7dQEPsv/kyDmt2lhjUU/r5++MzGJFT3H/ShF/ZlpUq8OTSHsVN g8epjQwWTFpSbE1oBAY9C3PwHBPLfXxxUx22210QuwPV4/IwJBANSYB3hlL1ACdHgbq4 NFpfZdykMZhTU/YKytgkoy+L+oigCJ+1HPYRc0UW/a41wWHG1aoI7im0joO4okHzD9KB yzSNKXp4FLJV7hrZr+8R11pCgbsJ/Tqm2jB9TZFuUDdh5ZkiHL6gDfRU1jV/QCOQ5dp0 tPAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=TVOhxRZeJJtvQIAxY2YKH1Zs/anzgkDL1NSdGh/qvWw=; fh=mh/EFXDyWz6SYA4qEbcbMgOZ07AT4DlRJonTEXgTb50=; b=Fak1dYIB3n6WanCYJmcyMKcKO/k/s3PJFDoBm3c5JPye516Rsw3E0HOLHx5zBNCR0s 4Xxbb9sNFBgcjSo63DtFBzhlaCzOPBnof1Lb6V4E6vZpxhWXS9Lq38u3R8rrSbKYWEsi CqzDmj4gS8kZh7ZlS9yYmeewZs3rKjM2hSBZrmDlOfl3cclPcyJF3EvbLJTFqlkK64mJ CxpoZSmKrdycorKzeetUwsB7sKGa7Uy1reMDHctxotnJNn72KG8gXvT5RVf8EhDiG/Sl W0XiIT+vYYXjkKlhWUNaXbFyk1XOOxfDX+ENpds52uRISI+OTdKOySRTTib89duK3k1n 94gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Godk32Ny; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=JS25vSeF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id ki8-20020a170903068800b001b23d721059si3175023plb.317.2023.09.15.06.58.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 06:58:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Godk32Ny; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=JS25vSeF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 5BD2A83C6340; Fri, 15 Sep 2023 02:39:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233872AbjIOJim (ORCPT + 32 others); Fri, 15 Sep 2023 05:38:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233811AbjIOJia (ORCPT ); Fri, 15 Sep 2023 05:38:30 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A06562113; Fri, 15 Sep 2023 02:38:10 -0700 (PDT) Date: Fri, 15 Sep 2023 09:37:49 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1694770670; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TVOhxRZeJJtvQIAxY2YKH1Zs/anzgkDL1NSdGh/qvWw=; b=Godk32NyepHPXcAD9n2qmbqfKXotH+mygtg5cErkmhEjvwus3JRbqQGBJLtex6WQRph/Eb 93pEu+OQNZgV3M3Syr/6XY77GZtlgi50HarUwOwnmjEDMsBhUj0kzQ9vptQLLA2uVZK4YZ myS6wlwGZCKIzKkG4Y/5S3IZcmCE62smFKP0ogQi+9hmZ9tzaUHf42T/BSYlVn34RRrwgA vEA/vAbYIQRgoj9L1ayvRkJdM9fHu/PEhKxGQUqZdPJcMSv+NKm36CnO9jXrZj8Xj3LF2v KqCF1DKzxKeDD3O/4A5bNmhGHXmIsq3thMTKVeafIWz1q5zg+5Lx4pxvJgY6GA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1694770670; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TVOhxRZeJJtvQIAxY2YKH1Zs/anzgkDL1NSdGh/qvWw=; b=JS25vSeFslcgTvbiqCmmvXuF9JgbC6kwLEiXu73y3CLZh/+n/nRQ2hT7AsxVxN0HVerDr+ DEf180n+YIjLl6Dw== From: "tip-bot2 for Ard Biesheuvel" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/boot] x86/efi: Drop EFI stub .bss from .data section Cc: Ard Biesheuvel , Ingo Molnar , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230912090051.4014114-18-ardb@google.com> References: <20230912090051.4014114-18-ardb@google.com> MIME-Version: 1.0 Message-ID: <169477066995.27769.17984655854633044024.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email 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 (morse.vger.email [0.0.0.0]); Fri, 15 Sep 2023 02:39:05 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776885825545976231 X-GMAIL-MSGID: 1777112263828097435 The following commit has been merged into the x86/boot branch of tip: Commit-ID: 5f51c5d0e905608ba7be126737f7c84a793ae1aa Gitweb: https://git.kernel.org/tip/5f51c5d0e905608ba7be126737f7c84a793ae1aa Author: Ard Biesheuvel AuthorDate: Tue, 12 Sep 2023 09:00:52 Committer: Ingo Molnar CommitterDate: Fri, 15 Sep 2023 11:18:40 +02:00 x86/efi: Drop EFI stub .bss from .data section Now that the EFI stub always zero inits its BSS section upon entry, there is no longer a need to place the BSS symbols carried by the stub into the .data section. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230912090051.4014114-18-ardb@google.com --- arch/x86/boot/compressed/vmlinux.lds.S | 1 - drivers/firmware/efi/libstub/Makefile | 7 ------- 2 files changed, 8 deletions(-) diff --git a/arch/x86/boot/compressed/vmlinux.lds.S b/arch/x86/boot/compressed/vmlinux.lds.S index b22f34b..4ff6ab1 100644 --- a/arch/x86/boot/compressed/vmlinux.lds.S +++ b/arch/x86/boot/compressed/vmlinux.lds.S @@ -47,7 +47,6 @@ SECTIONS _data = . ; *(.data) *(.data.*) - *(.bss.efistub) _edata = . ; } . = ALIGN(L1_CACHE_BYTES); diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile index a1157c2..ef4c12f 100644 --- a/drivers/firmware/efi/libstub/Makefile +++ b/drivers/firmware/efi/libstub/Makefile @@ -108,13 +108,6 @@ lib-y := $(patsubst %.o,%.stub.o,$(lib-y)) # https://bugs.llvm.org/show_bug.cgi?id=46480 STUBCOPY_FLAGS-y += --remove-section=.note.gnu.property -# -# For x86, bootloaders like systemd-boot or grub-efi do not zero-initialize the -# .bss section, so the .bss section of the EFI stub needs to be included in the -# .data section of the compressed kernel to ensure initialization. Rename the -# .bss section here so it's easy to pick out in the linker script. -# -STUBCOPY_FLAGS-$(CONFIG_X86) += --rename-section .bss=.bss.efistub,load,alloc STUBCOPY_RELOC-$(CONFIG_X86_32) := R_386_32 STUBCOPY_RELOC-$(CONFIG_X86_64) := R_X86_64_64