Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6230899ybi; Wed, 31 Jul 2019 10:31:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqwh3PXIbnDNRew83atQrQ2YZtH12qnwIcOp8uJ1Xm+c/7R9FGseH0EjMEVXnble/svNKy8S X-Received: by 2002:a65:584f:: with SMTP id s15mr98005632pgr.175.1564594311131; Wed, 31 Jul 2019 10:31:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564594311; cv=none; d=google.com; s=arc-20160816; b=WFD9IhVqquDErICXXU4iC1KLKrNn4RJwAgO+/+e4ASU+g0ohHyo4Zdl//dqIMJkPYD HV8oNqbbCFIV2p7YlSoPt7BgZ8cOtiNYZPIR92aAyNBTnjLvlVuZ8rnvbHI9MPBu7rAk Qki5doLj89pGQdAfKdedeW1sUtVs3jg+7SfsLBvrTWM8e/IQzUf6VXHIJZBqKABEQFyc i+DHN4BhfTnYlErA4YEoxpc7Ue3gMBFl5EcrNqAhFlnq0zpP3GKEfkYG+ubyBFqE00o2 ys5E1Gs62D2A/IlxHPiWMaWAo9DymV+9YpTtRm51fp/5l75V76eTrZIrb/b9CiQR1Wv9 74Kw== 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=h0//8b8JhmDYiWR+Ncdp81M8YpF3RR/HYJneA6rLbBE=; b=NRyS4wZSHQ+GEJXav8ypFeLadkD/y85CExdkK5P9y79gba68faPBamJpqpvU9jhLi9 ZCdLSFU8uj5M1bIc3YwCjOA8OR9KfoSYnR4PAfdwzu9Z/LsAEQb/3NRHOcg3ssxVk+dE U0kRL/GiMESTvFu5h3pJBM9hx65IqifYV3hLCiKN8RT1l4BwYSDfc4QNnyf11+tdvruC fD/BhNGBQSULBPFIGu7dJpmCXaYQ+9GcmNaK24hExnnOnMbsFnTbXuzwPgX3EFurCuvv b9PFe2+ZEFruxZB3q2dUc3XkPHvHr1aYKX1k/f389fWfZk2+XcWwHs2XeTpfzI/djQ9m 7QGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b="kpoM7/cz"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 36si32969998pla.80.2019.07.31.10.31.35; Wed, 31 Jul 2019 10:31:51 -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; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b="kpoM7/cz"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388670AbfGaPIf (ORCPT + 99 others); Wed, 31 Jul 2019 11:08:35 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:38800 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388589AbfGaPI3 (ORCPT ); Wed, 31 Jul 2019 11:08:29 -0400 Received: by mail-ed1-f65.google.com with SMTP id r12so31220669edo.5 for ; Wed, 31 Jul 2019 08:08:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=h0//8b8JhmDYiWR+Ncdp81M8YpF3RR/HYJneA6rLbBE=; b=kpoM7/czG2vuCwsXq98nirdJYBOwr8KtzxM9+afNHenqhKIfVEFjDG3vbbM89v9hU6 YMAzAAX30FdCqCWqUZzuyEQfYHEZ5SGXYXGaTc/RfM7vFtD/yULcwWNLageDoX/8krFH n4QKoyHVqCbs14roQ7VJaujfaJiV2Mk09sz0OeErJzlvISCfVQW2kNTXy8w9Gxm3/IwU dcejxnmJWBrLcdeNajBBaL1AUmO1liY5yMiINB1/ytr9VKZzK36rf3vWWCycIhQ15tIE DSLnTwriWXZKdOs1A4sQUyGiM4P5PvUWt23VhEqgSeYDF0Ha/yNAfcCo2u0r6R6Yiip8 wAXQ== 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=h0//8b8JhmDYiWR+Ncdp81M8YpF3RR/HYJneA6rLbBE=; b=gQg0wwi7M3JLUkFE1slQqbM97bpKM+B2sCynQoojsyX6XlRALvHYh26OCFGDYyTpGI 3WSLHZN2YE1MDxHKENLyIZvjbAWZ6EKemueE6Ldagtvt4s9r5iYvo3/BGvEZzfnNJzP+ gkDuBB6zw5P4Hm++4mDArYFbgn5fagT55If8iVT34zUk6v7ui0m//SoJX4x+8brLgSvE zfyTyPAIZYfj2mkO7MEZp0JVjxchBkpq18LiNkJ7D6eqsdHeILR6vXatGPQ/CpAI+R+W ipGzbPRYueHCSxgZZextjq/yOjnyiQLlgqLdfh5Ku5KHCucsLfjYHCnjt1BGN2pdEM+k VuGA== X-Gm-Message-State: APjAAAXWwIwAnux6dzBld9ECRM5Gn2F0MKTqtGLsBmZzO5+nC7euHcKm 60VpXFqhkFmlyn+xh0xwMqY= X-Received: by 2002:a17:906:c315:: with SMTP id s21mr93121050ejz.238.1564585708018; Wed, 31 Jul 2019 08:08:28 -0700 (PDT) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id q56sm17019541eda.28.2019.07.31.08.08.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Jul 2019 08:08:22 -0700 (PDT) From: "Kirill A. Shutemov" X-Google-Original-From: "Kirill A. Shutemov" Received: by box.localdomain (Postfix, from userid 1000) id 5DF9E102772; Wed, 31 Jul 2019 18:08:16 +0300 (+03) To: Andrew Morton , x86@kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Borislav Petkov , Peter Zijlstra , Andy Lutomirski , David Howells Cc: Kees Cook , Dave Hansen , Kai Huang , Jacob Pan , Alison Schofield , linux-mm@kvack.org, kvm@vger.kernel.org, keyrings@vger.kernel.org, linux-kernel@vger.kernel.org, "Kirill A. Shutemov" Subject: [PATCHv2 16/59] x86/mm: Rename CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING Date: Wed, 31 Jul 2019 18:07:30 +0300 Message-Id: <20190731150813.26289-17-kirill.shutemov@linux.intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190731150813.26289-1-kirill.shutemov@linux.intel.com> References: <20190731150813.26289-1-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 222855cc0158..2eb2867db5fa 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -2214,7 +2214,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 dc6182eecefa..580b82c2621b 100644 --- a/arch/x86/mm/kaslr.c +++ b/arch/x86/mm/kaslr.c @@ -104,7 +104,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.21.0