Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp846019ybd; Sat, 22 Jun 2019 17:00:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqzTLk0kab3kGnqNbnpZvsKoecj0ZOrIRM6r+T2EMzvkm2TmU3CO3o/Ce1xLyvlmmPZaRKiU X-Received: by 2002:a17:902:8b88:: with SMTP id ay8mr72338403plb.139.1561248049378; Sat, 22 Jun 2019 17:00:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561248049; cv=none; d=google.com; s=arc-20160816; b=sfK+HXd5cPSABBJnSvbDmpGdB+mwY2AeU/SLIBml2C2xOGTgp2Ph3loEiRYPbanB4a kB1OMUv7OIQfDBp2DqBjnYtWB1uYZybI5SkiJfzu1CIhXZweEheBcAsOovypHF44gXDP m2tCkQ5kwSDFuplOHqVC1c5P3Sw0wpQi7YdR2bXI0UrV8GVQDW0PZSZVK39q2Lktmn4K lz02gQaCHhsTs+chc9p3yvmNiTmYJ8CB2pNBxE8wOn4S9G4MOKzzM/o02IfwIFnTBEYP cAbJi0NJOZ8UfdpkT7tkWsgQcIt1iTM5HtJnzgYRFmWTfBxPD8G9waCCZc0ggR1rM7H2 aH8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=bgrPjW7Kb7wUUX+DYrIOPFY5PfDgfePLDwa4gYfP52s=; b=y7+bavEarsSmnCkTYm2GVflyzYzfCIFF/rgc16iRx/kmh7F3gTwKoCSlc2RblLEQ7u UCgRCcWFl8BtULdDjv61CLSfBcoAoDm8M8fhfsz6jEBxw/U35yLt5TI2OOz4BIe45KAp VftseGLx+mUlvtkjwYcWlB6AZSBaZDomZ5fiiBhtO791tUGKyvy+n4fZX+0cSqryxSwf LQFk5I5DMiqhRONFzJGeAqBSuBtcqEkSgKtkK38tR127pKpBEWHMjWu7Ju2xoKf5mtYu Cg1eOeJxvkE5wwiw1pKYubLgsJm1MYJmRQgRaZxx6f43N4a99pfkgHxZGc3kTIbVRP6u P4tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=hdw3d9Tk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u4si6734847pjv.38.2019.06.22.17.00.31; Sat, 22 Jun 2019 17:00:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=hdw3d9Tk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726566AbfFVX7r (ORCPT + 99 others); Sat, 22 Jun 2019 19:59:47 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:46885 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726410AbfFVX7q (ORCPT ); Sat, 22 Jun 2019 19:59:46 -0400 Received: by mail-pl1-f194.google.com with SMTP id e5so4782136pls.13 for ; Sat, 22 Jun 2019 16:59:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=bgrPjW7Kb7wUUX+DYrIOPFY5PfDgfePLDwa4gYfP52s=; b=hdw3d9Tkc9CTEuLiBL+v1GlT08Ye3N3vWBXfp9XuasCNI4S9OWAU6zx9TF7hFJDjU0 QIg3GIqC6FN3TzNUEOMrDsWUObccrdJCTI4md9CDw6UjxoB65gOs/KVaBYVAzTfaoGiL Rq5S5gjb5GDHuNNLba1IbMH7ohCl2ajLwIsy4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=bgrPjW7Kb7wUUX+DYrIOPFY5PfDgfePLDwa4gYfP52s=; b=W9rEzLQnxPK/tnxf6OU3emLsZMOTO22JqfQGQ5eyeJeOManeVbUDMfvr06I/IXv1QK iC1teiWjY41cB8ENZ16BHDzIjxN/4n1vC+YJ0ywENMeqmk2awZeNzwNYO9w1vJtYRxne euVYX8gadGZedajE5bI7MIMJQv4V2WXhC0qepqdhXCHpVILRG9QLmu1py833B3cfe9oA 6nVR+kuQKHPR7d/GSJGY59spuz5EDhFiRYW2mtNyCmnptkCxAmEPr+71dxMTYKItGjMY Q95/TvegHb64hF9ogxSUKJwxML+1gDQlcutSRs9lafJrLvSvRYiGvzipBPkODw3VHUNt WJeQ== X-Gm-Message-State: APjAAAVk2Um0erOcb52hsGLqlfCrEAV4kLZCouhWHWBsjA2HhntNZvkf I7cn6FTf5bZmRntZ92EKu5r9rL1vkBw= X-Received: by 2002:a17:902:e65:: with SMTP id 92mr133083051plw.13.1561247985604; Sat, 22 Jun 2019 16:59:45 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id y14sm6218653pjr.13.2019.06.22.16.59.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 22 Jun 2019 16:59:44 -0700 (PDT) Date: Sat, 22 Jun 2019 16:59:44 -0700 From: Kees Cook To: Matthew Garrett Cc: jmorris@namei.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Josh Boyer , David Howells , Matthew Garrett , Dave Young , linux-acpi@vger.kernel.org Subject: Re: [PATCH V34 15/29] acpi: Ignore acpi_rsdp kernel param when the kernel has been locked down Message-ID: <201906221659.A04260B5@keescook> References: <20190622000358.19895-1-matthewgarrett@google.com> <20190622000358.19895-16-matthewgarrett@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190622000358.19895-16-matthewgarrett@google.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 21, 2019 at 05:03:44PM -0700, Matthew Garrett wrote: > From: Josh Boyer > > This option allows userspace to pass the RSDP address to the kernel, which > makes it possible for a user to modify the workings of hardware . Reject > the option when the kernel is locked down. > > Signed-off-by: Josh Boyer Reviewed-by: Kees Cook -Kees > Signed-off-by: David Howells > Signed-off-by: Matthew Garrett > cc: Dave Young > cc: linux-acpi@vger.kernel.org > --- > drivers/acpi/osl.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c > index f29e427d0d1d..60cda8a0f36b 100644 > --- a/drivers/acpi/osl.c > +++ b/drivers/acpi/osl.c > @@ -40,6 +40,7 @@ > #include > #include > #include > +#include > > #include > #include > @@ -194,7 +195,7 @@ acpi_physical_address __init acpi_os_get_root_pointer(void) > acpi_physical_address pa; > > #ifdef CONFIG_KEXEC > - if (acpi_rsdp) > + if (acpi_rsdp && !security_locked_down(LOCKDOWN_ACPI_TABLES)) > return acpi_rsdp; > #endif > pa = acpi_arch_get_root_pointer(); > -- > 2.22.0.410.gd8fdbe21b5-goog > -- Kees Cook