From patchwork Tue Jan 29 09:21:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 156949 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp4428632jaa; Tue, 29 Jan 2019 01:22:02 -0800 (PST) X-Google-Smtp-Source: ALg8bN5kxBw/8nRGb8l3hMz9PNwmwHSR85ygQIsBqpm4BoJOsEDYrgi2mQCUd0Ag0zJ/QXp+jTJp X-Received: by 2002:a17:902:f24:: with SMTP id 33mr25501628ply.65.1548753722905; Tue, 29 Jan 2019 01:22:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548753722; cv=none; d=google.com; s=arc-20160816; b=DNn6vmlHNmSrGHQvThQHvUo8HKm8da5X4dFVNOgj8at0NtoNc8izGgP923T/1QmREN PIbyw7sOg2MFam5SYLdTerdP+nbm1mPajhVUyN8BqUwye4KGX+ZgxmCnfgV447wn83MI xxvfVhMXCm+uSg8xFx4uayyJUlQcgweod54BB3lUPGxTiLhOgZgtnQBQFNlsT9qo0iIz tMe/pLLuShAkN8iNHakaPSnNjSeIX4UBweQesSBZepPy6SrEAYzLHZIMqBwoYmkz0Ch1 gq4jwdb4P/sZtUdNz2nihsLCs54wfswEQZxqq0YQrd71lPlUyVgr/WvmMa+j0SECrTZR i+EA== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=AT1pMHI7CS7L1GDQ1CdeCVHhSeyLceYxSMxlS/ZwinY=; b=wYOM2FBCR/l8DJwPJdmC1u87fykj/mE16oj5DYCoZXrYMd5rPjvUSDhvh7HA8yA/76 iWzcqZVIuat4Vzf7m+svnCqHO4SVMk5EipABIsMNq+YXeOqWsghU3i0R+7sB//KA/dxI qE3F9Dyh9SJQJzixv1SNboJdS0WaWRcdH69ykJ/Jc3MlwEIxz0lwPf0rBKH4Nlz6WKL3 CautxSlETKM7H6b0x14trIMKlXrh3DAjlcPm3Gjj/o4Py69SvbG3hRr6MLcthJJjKd34 ibLjfDmDJ+INl0i+LLxY8lzfpFjPRo0F94FBaOV6SlRUXPKKXzHzUZ2fRw8QI3Yt7zGo TmXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d4+OnPTO; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q70si36106014pgq.526.2019.01.29.01.22.02; Tue, 29 Jan 2019 01:22:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-efi-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=@linaro.org header.s=google header.b=d4+OnPTO; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726383AbfA2JWC (ORCPT + 3 others); Tue, 29 Jan 2019 04:22:02 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:36445 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725810AbfA2JWC (ORCPT ); Tue, 29 Jan 2019 04:22:02 -0500 Received: by mail-wr1-f68.google.com with SMTP id u4so21166339wrp.3 for ; Tue, 29 Jan 2019 01:22:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AT1pMHI7CS7L1GDQ1CdeCVHhSeyLceYxSMxlS/ZwinY=; b=d4+OnPTOogcl0JqiSYwkTiQW+Q40cvQ2srmn39Gx0B+TBOTs5Z777ZKTrx0HDVVAfF gScRakUelxGfuFWq7TPypx2i07wN/6UoJNd7QMWW2pvrJ8biFwKLVLxLvbC4w2cutex1 tLX1o2t26k2/k2zdRWVmxyogNrjpvdlguJhCg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AT1pMHI7CS7L1GDQ1CdeCVHhSeyLceYxSMxlS/ZwinY=; b=s2mBMOIn5tMrF2fUyuHS5VrV21UdgyIQDiVyHC6QtFb6vcn/gTMjwGgXMvnXIWmmqU GCbyikLB1Ml5uYfq2IPPSli2pbzmm/zGIJnz+OHOqp47J5ISUW9IhKKWpesdVhsoaKn7 1kBMP3KU9AUjlB6eS6ITswVL2x8UoK6j2ZX5OqkzLw54LmMnGzkQ6L9VVRcITQldbM77 kDEe38wUMk6MGsc9hYWwsX0YYuG7UpDLUptTW/S1granG5nJp5ndiYiApa4XFCRHMM71 KKYPKXlg0w2zyA9txoFxXfjbE/S3IrWtUQG+Fwgz6zPVxAzdeA8UG5sEE5J8oe64Rih4 NSgA== X-Gm-Message-State: AJcUukcPyBxEKJDqG1F3hcWOzIav+p/WViueV8svzRH6C7AVsOcfEqI0 GzupZNI34eGz/Vx+ZkiRmIoSiB23EfY= X-Received: by 2002:adf:8c09:: with SMTP id z9mr21352570wra.301.1548753720184; Tue, 29 Jan 2019 01:22:00 -0800 (PST) Received: from sudo.home ([2a01:cb1d:112:6f00:61d3:a2fc:db63:aa38]) by smtp.gmail.com with ESMTPSA id x1sm28751755wru.34.2019.01.29.01.21.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Jan 2019 01:21:59 -0800 (PST) From: Ard Biesheuvel To: linux-efi@vger.kernel.org Cc: Ard Biesheuvel , corbet@lwn.net, leif.lindholm@linaro.org, graeme.gregory@linaro.org, mingo@redhat.com, tglx@linutronix.de, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, agraf@suse.de, pjones@redhat.com Subject: [PATCH v2 1/2] x86: make ARCH_USE_MEMREMAP_PROT a generic Kconfig symbol Date: Tue, 29 Jan 2019 10:21:49 +0100 Message-Id: <20190129092150.15184-2-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190129092150.15184-1-ard.biesheuvel@linaro.org> References: <20190129092150.15184-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org Turn ARCH_USE_MEMREMAP_PROT into a generic Kconfig symbol, and fix the dependency expression to reflect that AMD_MEM_ENCRYPT depends on it, instead of the other way around. This will permit ARCH_USE_MEMREMAP_PROT to be selected by other architectures. Signed-off-by: Ard Biesheuvel --- arch/Kconfig | 3 +++ arch/x86/Kconfig | 5 +---- 2 files changed, 4 insertions(+), 4 deletions(-) -- 2.20.1 diff --git a/arch/Kconfig b/arch/Kconfig index 4cfb6de48f79..9f0213213da8 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -885,6 +885,9 @@ config HAVE_ARCH_PREL32_RELOCATIONS architectures, and don't require runtime relocation on relocatable kernels. +config ARCH_USE_MEMREMAP_PROT + bool + source "kernel/gcov/Kconfig" source "scripts/gcc-plugins/Kconfig" diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 26387c7bf305..c0e9a77dc089 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1510,6 +1510,7 @@ config AMD_MEM_ENCRYPT bool "AMD Secure Memory Encryption (SME) support" depends on X86_64 && CPU_SUP_AMD select DYNAMIC_PHYSICAL_MASK + select ARCH_USE_MEMREMAP_PROT ---help--- Say yes to enable support for the encryption of system memory. This requires an AMD processor that supports Secure Memory @@ -1529,10 +1530,6 @@ config AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT If set to N, then the encryption of system memory can be activated with the mem_encrypt=on command line option. -config ARCH_USE_MEMREMAP_PROT - def_bool y - depends on AMD_MEM_ENCRYPT - # Common NUMA Features config NUMA bool "Numa Memory Allocation and Scheduler Support"