Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1238565ybi; Fri, 21 Jun 2019 17:06:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqz6MDvHo3bBV9UfV/GVwalsMQiQctmbmqvjpKFRumWehWN+pE51NMTDI2z5a04suzJnNgKz X-Received: by 2002:a17:902:c83:: with SMTP id 3mr76172947plt.326.1561162006462; Fri, 21 Jun 2019 17:06:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561162006; cv=none; d=google.com; s=arc-20160816; b=bvhwPuuX7Ze5xX8W1O54K+HnY1/k3nUwPiPxZN5Ked3qVi1YJ13c0/SeMAbuqQvbor BXScaKlKwJj7kWZvIaD/VUbOdlY8ayc4Lh8W0Ixumg8S8LLS/Q2IHpULewEVl62B72CI YXKafwpnDyTQGl1HYRNmH+uUCrFggyOkwT3LwKrj4JlYTrAhA3v0BMljD3wbJGGogtQU feu2jnCp8n/k1KZaWQtI3KFzVMXFyLCQONTaUgnc6axipyWH+Ist6E304dY+397Hzk03 BBqK9jUixLAXNjl5KJYQFJkQOUX7X5hUIEE5Yd7r53+arqFKQb4HBMFmmd3iHCGng+l4 r8xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature; bh=kMkOq/TdZP2DxC+0jYMlNvaXt/K0jRyWoQ2RXLMuYi0=; b=CckOXeKCCkPtKaaEO9Ae2yh7N5B6fVW7KGHqq+5X5aDZTQgYn9IjJwf7jmfbY0mPJz NiV5fShkhb/MR9+u3E/f8apus3sfu1oe1o39NkTTq3toAe0B2Fi2OO969HI0kKuYUmI6 loZPpTBSdloIuyLR2HxMfA9VE24WgwX59m7uuV84xNoigcSs+QQnj6oyZLhVuLbYzvf2 8LZ+lFSpxcKas89JBPiprusiPLydymXlmrcN2wOzCpvwnArUjIuwPQdpp1I6zfUSXy11 v/xKcnOwELZx62nnqLavsWgrL28iO9PCEo1Ez4BqU/JmLtbCjRByDW9MmOC69yQBwphh USRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=QRjJLKdN; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 70si3873282plc.253.2019.06.21.17.06.31; Fri, 21 Jun 2019 17:06:46 -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=@google.com header.s=20161025 header.b=QRjJLKdN; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726833AbfFVAEo (ORCPT + 99 others); Fri, 21 Jun 2019 20:04:44 -0400 Received: from mail-qk1-f201.google.com ([209.85.222.201]:44867 "EHLO mail-qk1-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726799AbfFVAEl (ORCPT ); Fri, 21 Jun 2019 20:04:41 -0400 Received: by mail-qk1-f201.google.com with SMTP id c207so9370537qkb.11 for ; Fri, 21 Jun 2019 17:04:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=kMkOq/TdZP2DxC+0jYMlNvaXt/K0jRyWoQ2RXLMuYi0=; b=QRjJLKdNtZo8CP4nTH7hluG2qV1AXyHaeNhLgJ9dx1fDUKb4PKvKgsxZC9qD/JpyOc nDlpqLlNjPK2Fr6/XPB9DFGktNMicEjN1U3rsUDXfXc0qt6uDJ4LiVqBRuB0IEYVTdqC g9pw8gFOb/hrRGu3KsVlrmVHnvI6Fg2+fFpvLxGvsYk9kHFo5degfWEqDha7Y8eH/AMU owop8HB8frx+BdG4M4kFYi15V93p/L6y8OBHHLti5WrGcp5xyaJuzKxcJQQIy7uVl5RI bM63+qZ8cl4gZwKMeJroO8r+Eqm/Y9IaQqorCVln/XP6Sft3X+wUDeJFpOaUTuF1wRyz uPNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=kMkOq/TdZP2DxC+0jYMlNvaXt/K0jRyWoQ2RXLMuYi0=; b=CLyoXZ06iYOcUE6aOH+1LsKB/zSVE8c+R7ylRt2fPjIv3SdrtiprLOm6ZudTq/VXrJ Pjke9dbP9TMMtaOAxPh+i+NKYaUFAh4ouUOttgWMB14+P/QZCerLlfIuiR2+rs4wTiyl 4GlEyc3IjZZ9G2nC7CgHpOjEmtX8SBmTQXH26aojxKe05DBw3Z6QbhUFtsb60F1SWyCW h5R4/6vXHVcMNw6HC6n2WQFl1aQC7WTzUPmJTIxfY4FaaFjO0epxPWUMmjGN1VwzLybN oa4V6p5a3ryPgUU0LRBmrrQAHX92+38Pr/md+zllpqZ+7+1IcCn2w3asWwhV1hhJMlhu phSg== X-Gm-Message-State: APjAAAWRW/tkQbSIwGuhoILKAzSog9rbkcpghiKwA0jBwfWuREza5BrJ AmagMVZlreGVo6pWMUYxPIePwaUgzhxIzxecVbZYHQ== X-Received: by 2002:a37:a9c9:: with SMTP id s192mr111878928qke.335.1561161880192; Fri, 21 Jun 2019 17:04:40 -0700 (PDT) Date: Fri, 21 Jun 2019 17:03:44 -0700 In-Reply-To: <20190622000358.19895-1-matthewgarrett@google.com> Message-Id: <20190622000358.19895-16-matthewgarrett@google.com> Mime-Version: 1.0 References: <20190622000358.19895-1-matthewgarrett@google.com> X-Mailer: git-send-email 2.22.0.410.gd8fdbe21b5-goog Subject: [PATCH V34 15/29] acpi: Ignore acpi_rsdp kernel param when the kernel has been locked down From: Matthew Garrett To: jmorris@namei.org Cc: 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 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 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 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