From patchwork Fri Jun 26 15:58:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 11627925 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4C18E912 for ; Fri, 26 Jun 2020 16:01:19 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 252B22053B for ; Fri, 26 Jun 2020 16:01:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="m9xgZmJd"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="jIT0I4Sv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 252B22053B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=n2g4vWpXfo8/g7RyzPgFUovWDKTSm6AKnfz/cJsHvAM=; b=m9xgZmJdKwZmXkzYy3/JDdL1mV aH2hs/B10P7idxkL3MzO2mflQ658joSe8Uw7GW+Mf7d7EASBOx96tfpmwABK5AtWeozz+GEZsv+H3 R3trbKpudJZ/LkIAL1hIaqwGIojo7wrJ6GWW4XpPNPHZOKwH1Nm9V3Spdtpiw8xeEOZmhHJEEhxxd I/KZkvB/Ff1hwWDri+0WzGheVlEpuU9ig+l7GFGklKwKXq+ooNbzCZbEeNHEaSqtr2cL/N3OWkbmv YwxIlqF16c/N5sPpejdMHHCnDcMK2ICPNjhL2KN4kA1rT5TPEsUOA9gMQQA8OjCikboyp0yPq2SMY rqCfk3Fg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1joqka-0006PU-W9; Fri, 26 Jun 2020 15:58:49 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1joqkU-0006OJ-84 for linux-arm-kernel@lists.infradead.org; Fri, 26 Jun 2020 15:58:43 +0000 Received: from dogfood.home (lfbn-nic-1-188-42.w2-15.abo.wanadoo.fr [2.15.37.42]) (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 33705204EC; Fri, 26 Jun 2020 15:58:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593187120; bh=FC+oTGAs23eBdDUGAh1t176WlXiIhxPuC7xFP7W52W0=; h=From:To:Cc:Subject:Date:From; b=jIT0I4Svp9S8w+HXR16FZk9s/faTxhTaNm36i51GkF7fn74oRQWEFERHLG8yNepyz FWwlJ7coS8W53XEtJadpUIiZJe8VYj+HKj8HEO68/ckE+ZhblwIiopUXdgKe+nT4+a Wal3iWhQeOKuIKWmkGDt0k71LhruutLjQpvn2CMI= From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 0/2] arm64/acpi: restrict AML opregion memory access Date: Fri, 26 Jun 2020 17:58:30 +0200 Message-Id: <20200626155832.2323789-1-ardb@kernel.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -5.2 (-----) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-5.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [198.145.29.99 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lorenzo.pieralisi@arm.com, kernel-hardening@lists.openwall.com, catalin.marinas@arm.com, linux-acpi@vger.kernel.org, sudeep.holla@arm.com, will@kernel.org, Ard Biesheuvel Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org v2: - do a more elaborate check on the region, against the EFI memory map v3: - split into two patches - fallback to __ioremap() for ACPI reclaim memory, in case it is not covered by the linear mapping (e.g., when booting a kdump kernel) Ard Biesheuvel (2): arm64/acpi: disallow AML memory opregions to access kernel memory arm64/acpi: disallow writeable AML opregion mapping for EFI code regions arch/arm64/include/asm/acpi.h | 15 +--- arch/arm64/kernel/acpi.c | 75 ++++++++++++++++++++ 2 files changed, 76 insertions(+), 14 deletions(-) Acked-by: Lorenzo Pieralisi