Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5427089imm; Tue, 12 Jun 2018 07:42:57 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIaoERTxPcbn1lc0hmnQGXQmnQWmUnYnK45g3fYZKdR34OlYU0QM0lZ2rp0D6ryuYkxPD7V X-Received: by 2002:a17:902:6ac7:: with SMTP id i7-v6mr766297plt.288.1528814577569; Tue, 12 Jun 2018 07:42:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528814577; cv=none; d=google.com; s=arc-20160816; b=v65LtAj3aaHm6deTLq8+bwxDLUWuhQ26g8svZ4ACDQr6ZRzagsRWHS1+KxP4h68Wyw 4ZzmXpoGQUEeRhJ5kOftyAAmCgPIR2RIwWeO4MfnS0D4rnmgVMkUx48/OtTq8JB4AFS0 WbKV9gpwe/V/EbybraxO+WFbKeu8Vlk2n7DO7s8z3udr4LASk+3tdq6juBk9lH1IwKxW j2M0X2/c0nM7cKh0TXWoNZ04a8ygC3AabHCw8tvJKP+zdhmtUMcvLgq2P6VWfifdjKX8 kehWskwT/0bk5jrK+3DsSGNGGbyG27nzccK2C6yUIVdrUZMsgLF4ENCq8TIHYVjV01Qc vzJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=uadA4uhxVsVH42LUHoS0HxxO4vSZW86ZPY9PttQE7uE=; b=DO3F79EjGNYu6FvMbsINK2MCbFtlAm0cClLMcLtFon0OwK8Bc8opNS/lPz8qbAs+jJ 0Y9iw7f5UwT9Tu/8L7ayibxgRJY13/5y726n26BXjg5ShSfBVCA66VXuu5UaR/IPTcJz 66LXF5EY7i3sz9ppYP/Fn7rutEATxuO/X245kLHuYoRj7ZO7TmpW0huPU0PW/IS/w0V1 8vurn3BK2gzwopYrO2nEXYvdENr4MpYQQZHn1JN/ZYT+pWWYbuKMsDU4Q/XqGFhuFJba WeMxTDoBion9mV3yJ69WeFPmhzxQerx8rBmQs5vVU1Kz4vP2Fx/q+sis4dwWzdnu08YQ q3ag== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s24-v6si242303pgn.194.2018.06.12.07.42.43; Tue, 12 Jun 2018 07:42:57 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934330AbeFLOl2 (ORCPT + 99 others); Tue, 12 Jun 2018 10:41:28 -0400 Received: from mga18.intel.com ([134.134.136.126]:24162 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934255AbeFLOj2 (ORCPT ); Tue, 12 Jun 2018 10:39:28 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Jun 2018 07:39:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,215,1526367600"; d="scan'208";a="46538433" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga007.fm.intel.com with ESMTP; 12 Jun 2018 07:39:24 -0700 Received: by black.fi.intel.com (Postfix, from userid 1000) id 1D193493; Tue, 12 Jun 2018 17:39:21 +0300 (EEST) From: "Kirill A. Shutemov" To: Ingo Molnar , x86@kernel.org, Thomas Gleixner , "H. Peter Anvin" , Tom Lendacky Cc: Dave Hansen , Kai Huang , Jacob Pan , linux-kernel@vger.kernel.org, linux-mm@kvack.org, "Kirill A. Shutemov" Subject: [PATCHv3 11/17] x86/mm: Rename CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING Date: Tue, 12 Jun 2018 17:39:09 +0300 Message-Id: <20180612143915.68065-12-kirill.shutemov@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180612143915.68065-1-kirill.shutemov@linux.intel.com> References: <20180612143915.68065-1-kirill.shutemov@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rename the option to CONFIG_MEMORY_PHYSICAL_PADDING. It will be used not only for KASLR. Signed-off-by: Kirill A. Shutemov --- arch/x86/Kconfig | 2 +- arch/x86/mm/kaslr.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 4992598ae411..4fa2cf807321 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -2187,7 +2187,7 @@ config RANDOMIZE_MEMORY If unsure, say Y. -config RANDOMIZE_MEMORY_PHYSICAL_PADDING +config MEMORY_PHYSICAL_PADDING hex "Physical memory mapping padding" if EXPERT depends on RANDOMIZE_MEMORY default "0xa" if MEMORY_HOTPLUG diff --git a/arch/x86/mm/kaslr.c b/arch/x86/mm/kaslr.c index 61db77b0eda9..4408cd9a3bef 100644 --- a/arch/x86/mm/kaslr.c +++ b/arch/x86/mm/kaslr.c @@ -102,7 +102,7 @@ void __init kernel_randomize_memory(void) */ BUG_ON(kaslr_regions[0].base != &page_offset_base); memory_tb = DIV_ROUND_UP(max_pfn << PAGE_SHIFT, 1UL << TB_SHIFT) + - CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING; + CONFIG_MEMORY_PHYSICAL_PADDING; /* Adapt phyiscal memory region size based on available memory */ if (memory_tb < kaslr_regions[0].size_tb) -- 2.17.1