Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1994445imm; Tue, 2 Oct 2018 18:33:59 -0700 (PDT) X-Google-Smtp-Source: ACcGV62MOxTtdK59m7Drl5aqh57j0ZXaH5jcDfNrh7+ecFhTe01JRTcHKjL3zU56rt9t/K5U8mNn X-Received: by 2002:a65:6295:: with SMTP id f21-v6mr16978008pgv.167.1538530439365; Tue, 02 Oct 2018 18:33:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538530439; cv=none; d=google.com; s=arc-20160816; b=aDzyy6G1SJ75MdS3z7j/b2C0fr2SNCwszY/eGKcIzJQKMWwRciHiWltMQRUn0nAozJ WXS5odq8+YQRpctbav8n0yeTg5m5p9W1EpmT2+f4LMZ1KrEFqi1u/W4zcb7adTiLHaH9 12Eardg15wqGNj2WMPUYSFBvBSfrDs6e8oDnh29eSxP63v/ioow4SUOv0S2AlC3XpioM M82c/ycz0zIzl8qCAmborzI5jmA1mlrXMlwNMUeR5hyh9yEzIyzLPzLmm7sDRso6K/BY oaKv8Vut666uwA46+/rNhzfF0NhjFNje95Ct805Rys/AJScAZJStlW30/gWlw7rqSw26 oEVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=auKnNveIqCKea9JYkkeiwWpZ9jHUjxLcbeslIxDgt6k=; b=pn1T01qgV2Z4YtguPY66PWFShls5maKww1mWAwgnKN5TFA91S0dSa47J6HSl+Y3FET WPpHB86WZEkiPgdWj3sojui20+yB87ig19mfPlokYaSOxWSi8TVYOuZsREhxxgmFlw8p cdyQi2GW79K6t74EuwLfttL2kFZmbbvBxRMQsxlpjJxD2JgnVJj8i84I2XJynrhu8R06 uD2ECDjl0V8scXXkKKRRAY8/MGxUwyqu4lpuwm5RNPnzWoYXOoMZ/qcBpTAMvjLrcI+N XhO2tkH8THdf/u3P7lM+hlxtd2RlLVGSai1OUZZ3HhKwecoYdUOw7cK6aEs1B1+9YX+3 Qn7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VRXGEtuM; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id az6-v6si17712361plb.3.2018.10.02.18.33.42; Tue, 02 Oct 2018 18:33:59 -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=@gmail.com header.s=20161025 header.b=VRXGEtuM; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726341AbeJCITq (ORCPT + 99 others); Wed, 3 Oct 2018 04:19:46 -0400 Received: from mail-yw1-f68.google.com ([209.85.161.68]:43947 "EHLO mail-yw1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725767AbeJCITq (ORCPT ); Wed, 3 Oct 2018 04:19:46 -0400 Received: by mail-yw1-f68.google.com with SMTP id j75-v6so1634934ywj.10 for ; Tue, 02 Oct 2018 18:33:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=auKnNveIqCKea9JYkkeiwWpZ9jHUjxLcbeslIxDgt6k=; b=VRXGEtuMhPe8rUXMlHuLOK3lJ2hTYx8q1G43K1qJpILYXuoseM+Y5ewjMLKmMSnirT SH1pQOXRSCO5B4Jan6/sxOi30E111vRCYYXMw7UqDIseKeOWJaWSvnY4bovq6uXBrD8X Ijt0VUZlAZBnhslRJm5Yw/79LbDxFOsuT71i1YWecy8fr/1KeMJX/DYJ37KhbbL0zl6r RaTTIh4hLWgt+BqQDGpUZsd5daWjtfwaaZSlkLd9s5Dgn575944+GdE6unq2xdCVbe5l 3UqRafEImwyHAwCerWRnXw6iw7Nirw2OapIAsbzGdutdn+TsRd3rpRCOemfA4QPqBATn HwHQ== 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; bh=auKnNveIqCKea9JYkkeiwWpZ9jHUjxLcbeslIxDgt6k=; b=dWyZS93xIFaGqwuL1FaQZU5SG3dtthT4/VARAQpqV6I+Pl6W2jB2GNXrDIH/EMFBRO haYBOUU/Jqes+EJd1bGLIFxDmxdsgBontFHWXDGVAHyXeIk/0CDuumnCoLI4TtACKRqG cycvu3ZC0xLdDGYDLYlcpSfWRh0PNhcqOxrJVo1wUjUxdn9/1XJr9JpcCcJCu3tt5SP3 uEfDgDtHxuK56ZZFtxsFpezenMEQ/Bx2PM9qwX2uk761szEzbXrJTV798AAU5nyGLd/n LmNU2fptwoOCbjb0JqjeAU3jarpcjHFjg40UqWPtNdWABZOZkjHfeaR8IqHq1bXIGPOA DL/w== X-Gm-Message-State: ABuFfoh7Cs2otgL3qA1ZdG/U2BZoND3ggpT6T52D4qK/NL9bNEmGZaUN LeLB+pguhbdZvI4i8FPSTA== X-Received: by 2002:a81:9d14:: with SMTP id u20-v6mr10383411ywg.14.1538530416024; Tue, 02 Oct 2018 18:33:36 -0700 (PDT) Received: from gabell.hsd1.ma.comcast.net (c-98-229-178-29.hsd1.ma.comcast.net. [98.229.178.29]) by smtp.gmail.com with ESMTPSA id x64-v6sm5908556ywx.103.2018.10.02.18.33.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Oct 2018 18:33:35 -0700 (PDT) From: Masayoshi Mizuma To: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Baoquan He , Borislav Petkov Cc: Masayoshi Mizuma , linux-kernel@vger.kernel.org Subject: [PATCH v6 0/3] Add a kernel parameter to change the padding size for KASLR Date: Tue, 2 Oct 2018 21:33:20 -0400 Message-Id: <20181003013323.4162-1-msys.mizuma@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series are adding an kernel parameter to change the padding size used for KASLR. It is useful for memory hotplug capable system. User can adjust the padding size to use it. It is better if the padding size is calculated automatically, however, ACPI SRAT is not available at the KASLR initialization time. So, I add a message for user to tell the suitable padding size. User can set it on next reboot. This patch series don't change the current default padding size. Change log from v5: - Fix build error if CONFIG_RANDOMIZE_MEMORY is not defined. Change log from v4: - Fix the padding size check (2nd patch) - Add explanation for the parameter in the document. (3rd patch) Change log from v3: - Add a warning message if the padding size for KASLR is not enough. And it says the suitable padding size to user. Change log from v2: - Simplify the description. As Baoquan said, this is similar SGI UV issue, but a little different. Remove SGI UV description. Masayoshi Mizuma (3): x86/mm: Add a kernel parameter to change the padding used for the physical memory mapping ACPI/NUMA: Add warning message if the padding size for KASLR is not enough Documentation/kernel-parameters.txt: Document rand_mem_physical_padding= .../admin-guide/kernel-parameters.txt | 19 ++++++++++++++++ arch/x86/include/asm/setup.h | 9 ++++++++ arch/x86/mm/kaslr.c | 22 ++++++++++++++++++- drivers/acpi/numa.c | 16 ++++++++++++++ 4 files changed, 65 insertions(+), 1 deletion(-) -- 2.18.0