Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp999601ybt; Fri, 19 Jun 2020 21:07:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzijMYs7Wqtn/1Be90CMG9P6LOyIRGm52qD5JOx7PMaH6gIoX6M0gahPE/yVG7WN+MAuX/z X-Received: by 2002:a50:ce45:: with SMTP id k5mr6611479edj.80.1592626063703; Fri, 19 Jun 2020 21:07:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592626063; cv=none; d=google.com; s=arc-20160816; b=iTjZwktMTrr+t5DIQdhoRXFUw4siV2mHAjZmy5R6bzZ9nSHUOYZFky4UvbxWCiyo0c W2Z7cjNKvjztX3k9dJoU1CGfNCbnYHuGFDLc/WSyotu1fzn+0ZQGAW2FlcPkHXfOigHr xTEp7+5CjRgJNEVkWVWLQwq1lg6LC8wt2s7EUiuYp087JSGFb0i9h/JAXdW4nx3Ow4O2 sKL6Jy+g8NFsrRlds++GTzllDdWGLZjZZ7xLiEoj7T4Mho6ur0pN9SAJJuStNKmSrwRf zJbtkibSXKSvLYd1Yd1aVis+dYqaBYc7B544Ol9XnARXxBEmwLE2Y3AUNubed1Ohw6j/ 8O7w== 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 :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=e2Nq5QfFJ0/qtctuPnnksBrMp9vASrqax7DBnkRF7Zw=; b=PCI5694gniCUAVebHSLXpY9JGnA5pah0kulV9UW6lILOHftcA8yzp5LQV/dOysot/d IWb1jG7cxHyYkUB/K6oK+H+PBXmWI9NF1DP5xdLnidaLrgjYzN6J0tUhrPcYKRRrRpYS tzMaGL1ihd2qbzWvfwU86zo3BtS1xEkmYtVyQsoFqZym5Y1cYbVyWmZlLTnhtwnPZ1jC +Dr11t99jDo90doGAzIT64P1Oqf5fmMj1Eh7ricbAQnRZgMqGccv9HwSh/9nF6d7FJ2j Bzmq1L8nLryYiTftqFeVhXH+2fddnK+c9dc5jeE1T8L3AaJaZz+uolSrYpuT2CpkQVjO afhw== 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 qw12si4890870ejb.492.2020.06.19.21.07.22; Fri, 19 Jun 2020 21:07:43 -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 S2405666AbgFSQqg (ORCPT + 99 others); Fri, 19 Jun 2020 12:46:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388812AbgFSQqI (ORCPT ); Fri, 19 Jun 2020 12:46:08 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 686BAC061796; Fri, 19 Jun 2020 09:46:03 -0700 (PDT) Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jmK9P-00043S-Dz; Fri, 19 Jun 2020 18:45:59 +0200 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id 14B161C0085; Fri, 19 Jun 2020 18:45:59 +0200 (CEST) Date: Fri, 19 Jun 2020 16:45:58 -0000 From: "tip-bot2 for Peter Jones" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: efi/urgent] efi: Make it possible to disable efivar_ssdt entirely Cc: , Peter Jones , Ard Biesheuvel , x86 , LKML In-Reply-To: <20200615202408.2242614-1-pjones@redhat.com> References: <20200615202408.2242614-1-pjones@redhat.com> MIME-Version: 1.0 Message-ID: <159258515877.16989.5930030344514684706.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the efi/urgent branch of tip: Commit-ID: 435d1a471598752446a72ad1201b3c980526d869 Gitweb: https://git.kernel.org/tip/435d1a471598752446a72ad1201b3c980526d869 Author: Peter Jones AuthorDate: Mon, 15 Jun 2020 16:24:08 -04:00 Committer: Ard Biesheuvel CommitterDate: Tue, 16 Jun 2020 11:01:07 +02:00 efi: Make it possible to disable efivar_ssdt entirely In most cases, such as CONFIG_ACPI_CUSTOM_DSDT and CONFIG_ACPI_TABLE_UPGRADE, boot-time modifications to firmware tables are tied to specific Kconfig options. Currently this is not the case for modifying the ACPI SSDT via the efivar_ssdt kernel command line option and associated EFI variable. This patch adds CONFIG_EFI_CUSTOM_SSDT_OVERLAYS, which defaults disabled, in order to allow enabling or disabling that feature during the build. Cc: Signed-off-by: Peter Jones Link: https://lore.kernel.org/r/20200615202408.2242614-1-pjones@redhat.com Signed-off-by: Ard Biesheuvel --- drivers/firmware/efi/Kconfig | 11 +++++++++++ drivers/firmware/efi/efi.c | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/firmware/efi/Kconfig b/drivers/firmware/efi/Kconfig index e6fc022..3939699 100644 --- a/drivers/firmware/efi/Kconfig +++ b/drivers/firmware/efi/Kconfig @@ -278,3 +278,14 @@ config EFI_EARLYCON depends on SERIAL_EARLYCON && !ARM && !IA64 select FONT_SUPPORT select ARCH_USE_MEMREMAP_PROT + +config EFI_CUSTOM_SSDT_OVERLAYS + bool "Load custom ACPI SSDT overlay from an EFI variable" + depends on EFI_VARS && ACPI + default ACPI_TABLE_UPGRADE + help + Allow loading of an ACPI SSDT overlay from an EFI variable specified + by a kernel command line option. + + See Documentation/admin-guide/acpi/ssdt-overlays.rst for more + information. diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c index edc5d36..5114cae 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c @@ -189,7 +189,7 @@ static void generic_ops_unregister(void) efivars_unregister(&generic_efivars); } -#if IS_ENABLED(CONFIG_ACPI) +#ifdef CONFIG_EFI_CUSTOM_SSDT_OVERLAYS #define EFIVAR_SSDT_NAME_MAX 16 static char efivar_ssdt[EFIVAR_SSDT_NAME_MAX] __initdata; static int __init efivar_ssdt_setup(char *str)