[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180516100532.14083-1-bhe@redhat.com>
Date: Wed, 16 May 2018 18:05:30 +0800
From: Baoquan He <bhe@...hat.com>
To: linux-kernel@...r.kernel.org, mingo@...nel.org,
lcapitulino@...hat.com, keescook@...omium.org, tglx@...utronix.de
Cc: x86@...nel.org, hpa@...or.com, fanc.fnst@...fujitsu.com,
yasu.isimatu@...il.com, indou.takao@...fujitsu.com,
douly.fnst@...fujitsu.com, Baoquan He <bhe@...hat.com>
Subject: [PATCH 0/2] x86/boot/KASLR: Skip specified number of 1GB huge pages when do physical randomization
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.
I ever thought to solve this by specifying available memory regions
which kernel KASLR can be randomized into to avoid those good 1GB huge
pages. Chao's patches can be used to fix it:
https://lkml.org/lkml/2018/2/28/217
Later, Ingo suggested avoiding them in boot KASLR code.
https://lkml.org/lkml/2018/3/12/312
So I made this patchset to handle the conflict between 1GB huge pages
allocation and KASLR. Any idea or suggestion about the handling,
function naming is appreciated.
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 | 84 +++++++++++++++++++++++++++++++++++++---
1 file changed, 79 insertions(+), 5 deletions(-)
--
2.13.6
Powered by blists - more mailing lists