Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3404414imm; Tue, 17 Jul 2018 04:24:46 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeYUIE2U/CXpOFMJPYMo5C1gXUTlaOr5xcMJnbUDJ0OUmUvJQ3Fzsu+lOaD4ltUW5W1hLlO X-Received: by 2002:a17:902:b587:: with SMTP id a7-v6mr1252546pls.225.1531826686032; Tue, 17 Jul 2018 04:24:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531826686; cv=none; d=google.com; s=arc-20160816; b=sP4uYX1AShHJ+Li50mQJsbo+B+5id8/k9CWTALc5GvlbZmG0l/hocsucdiktF5VpXk 2TwjhZOrwePJUgPnxtNvPf26raKfary+s3kt8g+aKE4KzDEzCG7hjUxFgldgQjfv0TBD oaaw2H9aPOcxeQNRVExTL4aDXwY7Ag/yF65Yyqt9ueJcc0JEQkhYb0rwUi9BfvE5gesM kobHJNv/92GNbMhnVSYJUHNjKcNC+5AFMbk7adpqMki79bwziATb79+mFOYkSsaQM5F8 DnaVTaTciXUXbbVBKhcTyKbIOnJi6YHqpx75yZdavBWhDr9+JfKKQAnWTHBqH6nHTcbK bpDg== 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=BcArfYur4mOGyms2+2Xbm7aeUYElC/KY0I/Puzg4HEg=; b=oBlr1OLQdyyopHRL0g1vhytuwO+I4hDInGWYJSNb170N5h7oopSF278QQ71QGjPI1b sYxL6HOODOYjX8Yqod+9EwHpDW5FdiU/uZorw3ohtau6C9zizR3ZuWuhgwQ8WDcIBMqF aAOrwgLRbPCk9Pj3dM6TjxTNNvPllGN7BP24+cq9zAs1hnvpShdd0NykCHGUrvmcqgQj IJ5Q2N1YB3NQJTdrpAtE/L9MT8cM8/VI6LnZwC6NC5aeAdel3rI1DQNY/KqyWlvyz3gi HKFGHJY5G/QxZC97nO7USGNW2T3XXgzv3Mtx33eJzmBZetpTh+cHfJJeAnSVB9Z5hnE5 fkBQ== 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 c17-v6si667238pge.273.2018.07.17.04.24.31; Tue, 17 Jul 2018 04:24: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; 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 S1731445AbeGQLx6 (ORCPT + 99 others); Tue, 17 Jul 2018 07:53:58 -0400 Received: from mga02.intel.com ([134.134.136.20]:45425 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730839AbeGQLx5 (ORCPT ); Tue, 17 Jul 2018 07:53:57 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jul 2018 04:21:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,365,1526367600"; d="scan'208";a="57138277" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga007.jf.intel.com with ESMTP; 17 Jul 2018 04:21:46 -0700 Received: by black.fi.intel.com (Postfix, from userid 1000) id 3C3A378E; Tue, 17 Jul 2018 14:21:49 +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: [PATCHv5 13/19] x86/mm: Rename CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING Date: Tue, 17 Jul 2018 14:20:23 +0300 Message-Id: <20180717112029.42378-14-kirill.shutemov@linux.intel.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180717112029.42378-1-kirill.shutemov@linux.intel.com> References: <20180717112029.42378-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 6d4774f203d0..b6f1785c2176 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -2197,7 +2197,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.18.0