From patchwork Tue Mar 26 18:27:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Garrett X-Patchwork-Id: 10871969 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 536C71669 for ; Tue, 26 Mar 2019 18:29:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4692128C47 for ; Tue, 26 Mar 2019 18:29:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3AC6628C53; Tue, 26 Mar 2019 18:29:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI,USER_IN_DEF_DKIM_WL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D11B028C47 for ; Tue, 26 Mar 2019 18:29:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732754AbfCZS2c (ORCPT ); Tue, 26 Mar 2019 14:28:32 -0400 Received: from mail-ot1-f73.google.com ([209.85.210.73]:48758 "EHLO mail-ot1-f73.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732750AbfCZS2a (ORCPT ); Tue, 26 Mar 2019 14:28:30 -0400 Received: by mail-ot1-f73.google.com with SMTP id 70so2669728otn.15 for ; Tue, 26 Mar 2019 11:28:30 -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=B6VKNJoBZyOp9UQCoOkYqDvTMA68uU6nV4VivW8ayKY=; b=h4V4spb546fgqSWgS1MCnVIdB5xf8zwauormzGFZ9wdZZR11ercKvrV9vGQBG2eaHy U5yAE9dWDJ8cLyFUTI6F6itG/zRVsHLE7RipWoTzwm3Euye6oips8veg3p0JE412stCi NA7uUXxXILc7TDlsvqcna7OqX/NcA45fCDGPS/y4ARKGku0QdHk5dnOgh3o+dQEsVIa4 70hb3FA8v3id5jV97bWtqjs/I7rVHqEdOkqe/GO66TDQ+GugNPfTcMdJKuvBVptU8XAN pXCcH/lTNqrDznbqQwAn+vWVf2zZb+yYoZ6C8xcYDV/S4TC8M3X2z2kIVCyt6ShkjatS 1KOQ== 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=B6VKNJoBZyOp9UQCoOkYqDvTMA68uU6nV4VivW8ayKY=; b=pYL/p3YRrZEYa78F3sZIxXlb/DqcQfmj/0eJEwp/RKmMIi9FVRy2ddA751UkW6Hcqp 0j6WlCB1NZiCjdPp3yXuVe8QkuScdOLHkr7tlI6uzmuK4DlDq8lS6MzVK2YnufNeBdER skLhuNhQIxAj7MZUa2aJ2dqlBJXdnJws6Ngu7LA4gnoB4Fdiiuerw/OiNOYixiZ4cj2f riiSGlWH4qMcB7jafkKEzwyfrJqcbCgu2NCl2XRniFCA/aNGnsql1wxymDfaRi9k8EQ2 r4Ck73Y47WENq8gQPqrGBQYkfrsGHe1vM6b5nPALwdTbo7z3cRW3RkPw9Oa/HATwkTba JgQw== X-Gm-Message-State: APjAAAWXPl3oglGhgUJrblWcBKhWvZE8QeU50bXMQW3BegCMGbynBFNO gc25kVELkvclHiQZptc/dB0kuUzUNrkPl9RsbccSLQ== X-Google-Smtp-Source: APXvYqyQy3Ly/I0+luq4SXBdXDDkmt0+oEhQUaMxXkgB8GNCQOuYQkqhB2oSrkQXziMzg96uVFB1sRh7FJkFmnGB+uM52Q== X-Received: by 2002:aca:54d2:: with SMTP id i201mr8572038oib.29.1553624910134; Tue, 26 Mar 2019 11:28:30 -0700 (PDT) Date: Tue, 26 Mar 2019 11:27:30 -0700 In-Reply-To: <20190326182742.16950-1-matthewgarrett@google.com> Message-Id: <20190326182742.16950-15-matthewgarrett@google.com> Mime-Version: 1.0 References: <20190326182742.16950-1-matthewgarrett@google.com> X-Mailer: git-send-email 2.21.0.392.gf8f6787159e-goog Subject: [PATCH V31 14/25] 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, dhowells@redhat.com, linux-api@vger.kernel.org, luto@kernel.org, Josh Boyer , Matthew Garrett , Dave Young , linux-acpi@vger.kernel.org Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: X-Virus-Scanned: ClamAV using ClamSMTP 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..cd5bba7b8eb3 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -194,7 +194,8 @@ acpi_physical_address __init acpi_os_get_root_pointer(void) acpi_physical_address pa; #ifdef CONFIG_KEXEC - if (acpi_rsdp) + if (acpi_rsdp && !kernel_is_locked_down("ACPI RSDP specification", + LOCKDOWN_INTEGRITY)) return acpi_rsdp; #endif pa = acpi_arch_get_root_pointer();