From: Baoquan He <bhe@redhat.com>
To: linux-kernel@vger.kernel.org, mingo@kernel.org,
lcapitulino@redhat.com, keescook@chromium.org,
tglx@linutronix.de
Cc: x86@kernel.org, hpa@zytor.com, fanc.fnst@cn.fujitsu.com,
yasu.isimatu@gmail.com, indou.takao@jp.fujitsu.com,
douly.fnst@cn.fujitsu.com, Baoquan He <bhe@redhat.com>
Subject: [PATCH v2 0/2] x86/boot/KASLR: Skip specified number of 1GB huge pages when do physical randomization
Date: Mon, 25 Jun 2018 11:16:54 +0800 [thread overview]
Message-ID: <20180625031656.12443-1-bhe@redhat.com> (raw)
This is a regression bug fix. Luiz's team reported that 1GB huge page
allocation will get one less 1GB page randomly when KASLR is enabled. On
their KVM guest with 4GB RAM, which only has one good 1GB huge page,
they found the 1GB huge page allocation sometime failed with below
kernel option adding.
default_hugepagesz=1G hugepagesz=1G hugepages=1
This is because kernel may be randomized into those good 1GB huge pages.
And also on those bare-metal machines with larger memory, one less 1GB huge
page might be seen with KASLR enabled than 'nokaslr' specified case. It's
also because that kernel might be randomized into one of those good 1GB huge
pages.
The solution in this patchset is to skip specified number of GB huge
pages when do kernel physical randomization. If the specified number of GB
huge pages is bigger than amount of good GB huge pages which system can
provide, it's consistent with the current huge page implementation.
v1->v2:
There are several code style problems and typos which were pointed out
by Ingo, fix them in this patchset.
Baoquan He (2):
x86/boot/KASLR: Add two functions for 1GB huge pages handling
x86/boot/KASLR: Skip specified number of 1GB huge pages when do
physical randomization
arch/x86/boot/compressed/kaslr.c | 96 +++++++++++++++++++++++++++++++++++++---
1 file changed, 91 insertions(+), 5 deletions(-)
--
2.13.6
next reply other threads:[~2018-06-25 3:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-25 3:16 Baoquan He [this message]
2018-06-25 3:16 ` [PATCH v2 1/2] x86/boot/KASLR: Add two functions for 1GB huge pages handling Baoquan He
2018-07-03 15:58 ` [tip:x86/boot] x86/boot/KASLR: Add two new " tip-bot for Baoquan He
2018-06-25 3:16 ` [PATCH v2 2/2] x86/boot/KASLR: Skip specified number of 1GB huge pages when do physical randomization Baoquan He
2018-07-03 15:58 ` [tip:x86/boot] x86/boot/KASLR: Skip specified number of 1GB huge pages when doing physical randomization (KASLR) tip-bot for Baoquan He
2018-06-26 15:06 ` [PATCH v2 0/2] x86/boot/KASLR: Skip specified number of 1GB huge pages when do physical randomization Luiz Capitulino
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180625031656.12443-1-bhe@redhat.com \
--to=bhe@redhat.com \
--cc=douly.fnst@cn.fujitsu.com \
--cc=fanc.fnst@cn.fujitsu.com \
--cc=hpa@zytor.com \
--cc=indou.takao@jp.fujitsu.com \
--cc=keescook@chromium.org \
--cc=lcapitulino@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=yasu.isimatu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®