Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1014955ybz; Thu, 16 Apr 2020 00:54:04 -0700 (PDT) X-Google-Smtp-Source: APiQypItjfC5m6SPnJwu0CujA3uTX7Sg2K/FWMGfxus5nlp4gmVT21YxhpqNke7BD7/9ORTFxSwv X-Received: by 2002:aa7:c401:: with SMTP id j1mr923331edq.31.1587023644189; Thu, 16 Apr 2020 00:54:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587023644; cv=none; d=google.com; s=arc-20160816; b=wLcgTvMo0brfwGYYs2EQ1xk29B7g5HmCe5MPekD2nFFXk2Z5hi1SKI0/E1Tq+MmExo SyLEx3/hnbzsgpPKgIsold5AlS/Uivdscpg1iWOCgpHzeKam0cqGGwikht3kWF/6RGIl 6aCbBJtbIhTiBky45Za94F3CoYG4Juk/FUOhdVkY2yZILuSDGHwcX5iT31Vvj0f30w7z 8XH5I2rcy0MgMNIcmzM0irZrBbyvpylFZMYteM3b3jHNKXRN+r+8tZRLJhiMFX6qJV/+ 7rPYToBwoPyMBCXaJt0FjmzOzsWhoso+agLc9aMiec2NCM9ApsLhz5oJ9pw7gyLW6ht4 FPEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=l8f/D2a9tjFL958BO5X2iaeUmkc9cDP/sOaXPyyNRS8=; b=GGTjdk6AnE64wFC0u9ZvkGhU7pZ0vjAIkdO4+OvlfOuC2vivPcWCA8H2p7ZqLaW9Ze KlFl6y6yFvTwLv4obuotE+hQole2Go81C3sapxPfsBoj2m0w/N6LShj8SfRhW+eqwngs G6DWp0f/IQw1b3aEhziggH8TA0aLaC27qqrCwesBP7NXzS0TnAzaL27uDruT3TqsEQYJ s/jrK1GQhrOYO7854BLxIEBOpCTMGLosDhdlEPvWN0bZo+uTpQ3vM2XGp8iWcsUOc77X /CK/s7U4BIsSbN037R0B1Ca0NjyWEtL3mZlb9bgyWdFEEOy1vYwiebkD1+NeTKFhbjID AAPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oRSdIqNW; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lw9si2248618ejb.175.2020.04.16.00.53.40; Thu, 16 Apr 2020 00:54:04 -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; dkim=pass header.i=@kernel.org header.s=default header.b=oRSdIqNW; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439804AbgDPHwG (ORCPT + 99 others); Thu, 16 Apr 2020 03:52:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:59040 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2439799AbgDPHwD (ORCPT ); Thu, 16 Apr 2020 03:52:03 -0400 Received: from mail-il1-f172.google.com (mail-il1-f172.google.com [209.85.166.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0199E2076A; Thu, 16 Apr 2020 07:52:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587023521; bh=NzufprrHci2GBeQE1qpA00pu7UAi24+J7DgAw5oPGZ0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=oRSdIqNWm9ATCg8yqzgmrw8l8CYbf65jBu9uZKgq+iwZxJIcwTSulmjsHzpf8OUHL nyhyNAGv/MNGwIn5osMdBAXk5EkSuESUkiCS0DihTRypaMsvMSEBXbMB5q6R0voiaT jbRchVAXmycHMWvCrDmXbbZhmfXFzORo9QrvaRis= Received: by mail-il1-f172.google.com with SMTP id f82so6003563ilh.8; Thu, 16 Apr 2020 00:52:00 -0700 (PDT) X-Gm-Message-State: AGi0PubrifpXlDPtWhBHuCj/Cny1Iktc6Vr7SDFXYUQ0PxPwibsMdWVF 1D4Jy4RTnrl5e9dg4khCt1JTBNMCme08fW5/n5s= X-Received: by 2002:a92:991c:: with SMTP id p28mr4998325ili.258.1587023520423; Thu, 16 Apr 2020 00:52:00 -0700 (PDT) MIME-Version: 1.0 References: <20200415221520.2692512-1-nivedita@alum.mit.edu> <20200415221520.2692512-5-nivedita@alum.mit.edu> In-Reply-To: <20200415221520.2692512-5-nivedita@alum.mit.edu> From: Ard Biesheuvel Date: Thu, 16 Apr 2020 09:51:49 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 4/5] efi: Kill __efistub_global To: Arvind Sankar Cc: linux-efi , Linux ARM , X86 ML , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 16 Apr 2020 at 00:15, Arvind Sankar wrote: > > Now that both arm and x86 are using the linker script to place the EFI > stub's global variables in the correct section, remove __efistub_global. > > Signed-off-by: Arvind Sankar Reviewed-by: Ard Biesheuvel > --- > drivers/firmware/efi/libstub/arm-stub.c | 4 ++-- > drivers/firmware/efi/libstub/efi-stub-helper.c | 15 +++++++-------- > drivers/firmware/efi/libstub/efistub.h | 2 -- > drivers/firmware/efi/libstub/gop.c | 2 +- > drivers/firmware/efi/libstub/x86-stub.c | 2 +- > 5 files changed, 11 insertions(+), 14 deletions(-) > > diff --git a/drivers/firmware/efi/libstub/arm-stub.c b/drivers/firmware/efi/libstub/arm-stub.c > index 99a5cde7c2d8..bf42d6c742a8 100644 > --- a/drivers/firmware/efi/libstub/arm-stub.c > +++ b/drivers/firmware/efi/libstub/arm-stub.c > @@ -36,9 +36,9 @@ > #endif > > static u64 virtmap_base = EFI_RT_VIRTUAL_BASE; > -static bool __efistub_global flat_va_mapping; > +static bool flat_va_mapping; > > -static efi_system_table_t *__efistub_global sys_table; > +static efi_system_table_t *sys_table; > > __pure efi_system_table_t *efi_system_table(void) > { > diff --git a/drivers/firmware/efi/libstub/efi-stub-helper.c b/drivers/firmware/efi/libstub/efi-stub-helper.c > index c6092b6038cf..14e56a64f208 100644 > --- a/drivers/firmware/efi/libstub/efi-stub-helper.c > +++ b/drivers/firmware/efi/libstub/efi-stub-helper.c > @@ -12,14 +12,13 @@ > > #include "efistub.h" > > -static bool __efistub_global efi_nochunk; > -static bool __efistub_global efi_nokaslr; > -static bool __efistub_global efi_noinitrd; > -static bool __efistub_global efi_quiet; > -static bool __efistub_global efi_novamap; > -static bool __efistub_global efi_nosoftreserve; > -static bool __efistub_global efi_disable_pci_dma = > - IS_ENABLED(CONFIG_EFI_DISABLE_PCI_DMA); > +static bool efi_nochunk; > +static bool efi_nokaslr; > +static bool efi_noinitrd; > +static bool efi_quiet; > +static bool efi_novamap; > +static bool efi_nosoftreserve; > +static bool efi_disable_pci_dma = IS_ENABLED(CONFIG_EFI_DISABLE_PCI_DMA); > > bool __pure nochunk(void) > { > diff --git a/drivers/firmware/efi/libstub/efistub.h b/drivers/firmware/efi/libstub/efistub.h > index 49651e20bb9f..f96c56596034 100644 > --- a/drivers/firmware/efi/libstub/efistub.h > +++ b/drivers/firmware/efi/libstub/efistub.h > @@ -25,8 +25,6 @@ > #define EFI_ALLOC_ALIGN EFI_PAGE_SIZE > #endif > > -#define __efistub_global > - > extern bool __pure nochunk(void); > extern bool __pure nokaslr(void); > extern bool __pure noinitrd(void); > diff --git a/drivers/firmware/efi/libstub/gop.c b/drivers/firmware/efi/libstub/gop.c > index fa05a0b0adfd..216327d0b034 100644 > --- a/drivers/firmware/efi/libstub/gop.c > +++ b/drivers/firmware/efi/libstub/gop.c > @@ -32,7 +32,7 @@ static struct { > u8 depth; > } res; > }; > -} cmdline __efistub_global = { .option = EFI_CMDLINE_NONE }; > +} cmdline = { .option = EFI_CMDLINE_NONE }; > > static bool parse_modenum(char *option, char **next) > { > diff --git a/drivers/firmware/efi/libstub/x86-stub.c b/drivers/firmware/efi/libstub/x86-stub.c > index 7583e908852f..aedac3af4b5c 100644 > --- a/drivers/firmware/efi/libstub/x86-stub.c > +++ b/drivers/firmware/efi/libstub/x86-stub.c > @@ -20,7 +20,7 @@ > /* Maximum physical address for 64-bit kernel with 4-level paging */ > #define MAXMEM_X86_64_4LEVEL (1ull << 46) > > -static efi_system_table_t *sys_table __efistub_global; > +static efi_system_table_t *sys_table; > extern const bool efi_is64; > extern u32 image_offset; > > -- > 2.24.1 >