Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp752922ybz; Wed, 15 Apr 2020 18:12:02 -0700 (PDT) X-Google-Smtp-Source: APiQypKYXc+YfdtbeVTYyBAnFwZgBL/j+bQ+y7GLmzUUp60kDm9x6FWrRdiDZ3UlTkda5ibDWyYB X-Received: by 2002:a17:907:20f7:: with SMTP id rh23mr7325808ejb.71.1586999521908; Wed, 15 Apr 2020 18:12:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586999521; cv=none; d=google.com; s=arc-20160816; b=jkejwAR0FCaXO99E2FEauPAXwL6PDQ63TZF8oriP/W6+PkPiQWwDHzo+ge8jhKBaeI KHcf4im39yz+S3hvWsfTXN0ri6bcqaQkKqAgw5Qjp3r4cj6+zPRd3cmHB8KtGNXylWU6 NzOGdDD+JOUzD1+d2eUN4tLgF46IxHAp0DocHw81DjL9nhB+dEJA9In/S+LPWNKbBWfu uXRA5a/3/q1KFVyeFRfL+mu2xJhBC+a6ncBXNZgvG2LhgAHbAvxefR1yg5ci3ZFg6A9R 2kVZ6rLmr6igQLNW2NX7gqN68ysaC6yqmwREOjqTfNrJ0V4/3qY12zR+dLdWWPes5JHD 8vHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=LncCRWwsHSyHm2+Q1R5MkVDJxDhecE7946LHPNlHWxE=; b=YEw5qojT9RlcJN+BuNLUIifG8LNpfMgWFxTqbfEEiO2gUG4SsgPjjd/ttuK/FsK4xi T6cTBD/ClQoOe+d27LgOP6SqWmZPA+pZTbUJoWEITaJlzlzwX5Vfue2PvAY5eSZwDd61 nJO31F1k/fI1RGS1vM83Wd8zy4LUZPmUF9l5amVOVmohI/25LzIgfA9Q5FIMIZPMShgt TO8SY+/NTEg647U0QM9VaYxDCtg/qsvS33Kwi2tBQ4AIXqoPWIJ6iqS95cdEvwNnMmNs ZZsOjya/tGICf5JQsvcQoXUwFueQGctyVXwR0laA43nP+XLZfJSDlKOrx2FJD06UyaAn n15w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h16si2120268edw.215.2020.04.15.18.11.35; Wed, 15 Apr 2020 18:12:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731316AbgDOWP2 (ORCPT + 99 others); Wed, 15 Apr 2020 18:15:28 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:41306 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725796AbgDOWPW (ORCPT ); Wed, 15 Apr 2020 18:15:22 -0400 Received: by mail-qk1-f195.google.com with SMTP id y3so19286298qky.8; Wed, 15 Apr 2020 15:15:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=LncCRWwsHSyHm2+Q1R5MkVDJxDhecE7946LHPNlHWxE=; b=YiOpi0E4CyKRbRehnzXPgjrX9vshvvDZUBPufwHYeY7uR/gzNciq+szY11K4hNQ1zH dQHgNIm0CPPmVkJyC7/Zmrr6twaJ/enGMtUE8sNNIFLwzo7umJOTV+gORCI2AhhPKMT9 uqsLYyOuPI9rgl83eYeADiG2KlvVMgosjT7XVTY+V8HbmypF4XJoSC9T6CtaUAQugFqF yeejp4QreqeDakkhi+JGSklnhLtky/o+9Ai8At/Px3g5D7CrkX5GyjkkUkIt7azqrAxU ozI1WXwn4QpLKuChma6GysElkoX9s/ElG3BvNCQaw67f3lBG1CainFIp7Ewrvrl1k4HQ lkwA== X-Gm-Message-State: AGi0PuYskHn8EHLDBX2VGv8Fu0wGBxx1NiejR1p09Y3DduUXxExQq81x uQrKF/Mmvx+pRC1fCQGr1rk= X-Received: by 2002:a05:620a:4f2:: with SMTP id b18mr28120143qkh.433.1586988921329; Wed, 15 Apr 2020 15:15:21 -0700 (PDT) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id i20sm13264340qkl.135.2020.04.15.15.15.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Apr 2020 15:15:20 -0700 (PDT) From: Arvind Sankar To: Ard Biesheuvel Cc: linux-efi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, x86@kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , linux-kernel@vger.kernel.org Subject: [PATCH 0/5] efi: Remove __efistub_global annotation Date: Wed, 15 Apr 2020 18:15:15 -0400 Message-Id: <20200415221520.2692512-1-nivedita@alum.mit.edu> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series removes the need for annotating global data in the EFI stub with __efistub_global for ARM32 and X86. This is done by renaming the .data and .bss sections in the object files linked into the EFI stub to .data.efistub and .bss.efistub respectively, and including those sections into the compressed kernel's .data section using its linker script. The series is based on efi/next, rebased onto v5.7-rc1, plus two earlier fixes for x86 EFI that are queued for v5.7. Patches on top of v5.7-rc1: In efi/next: Ard Biesheuvel (2): efi: clean up config table description arrays efi: move arch_tables check to caller Arvind Sankar (19): efi/gop: Remove redundant current_fb_base efi/gop: Move check for framebuffer before con_out efi/gop: Get mode information outside the loop efi/gop: Factor out locating the gop into a function efi/gop: Slightly re-arrange logic of find_gop efi/gop: Move variable declarations into loop block efi/gop: Use helper macros for populating lfb_base efi/gop: Use helper macros for find_bits efi/gop: Remove unreachable code from setup_pixel_info efi/gop: Add prototypes for query_mode and set_mode efi/gop: Allow specifying mode number on command line efi/gop: Allow specifying mode by x efi/gop: Allow specifying depth as well as resolution efi/gop: Allow automatically choosing the best mode Additional: Arvind Sankar (2): efi/x86: Move efi stub globals from .bss to .data efi/x86: Always relocate the kernel for EFI handover entry Arvind Sankar (5): efi/arm: Remove __efistub_global annotation efi/libstub: Factor out relocation checking efi/x86: Remove __efistub_global annotation efi: Kill __efistub_global efi/x86: Check for bad relocations arch/arm/boot/compressed/vmlinux.lds.S | 2 +- arch/x86/boot/compressed/vmlinux.lds.S | 1 + drivers/firmware/efi/libstub/Makefile | 43 +++++++++++++------ drivers/firmware/efi/libstub/arm-stub.c | 4 +- .../firmware/efi/libstub/efi-stub-helper.c | 15 +++---- drivers/firmware/efi/libstub/efistub.h | 6 --- drivers/firmware/efi/libstub/gop.c | 2 +- drivers/firmware/efi/libstub/x86-stub.c | 2 +- 8 files changed, 42 insertions(+), 33 deletions(-) -- 2.24.1