summaryrefslogtreecommitdiff
path: root/arch/x86/boot/compressed/kaslr.c
diff options
context:
space:
mode:
authorChao Fan <fanc.fnst@cn.fujitsu.com>2019-01-23 14:08:49 +0300
committerBorislav Petkov <bp@suse.de>2019-02-01 13:52:55 +0300
commit02a3e3cdb7f12fb8589e4a2e85d23c9e6544b54a (patch)
treed8b87c8b482ccb279accb74e82bc8f2d7ef3e346 /arch/x86/boot/compressed/kaslr.c
parent3a63f70bf4c3a17f5d9c9bf3bc3288a23bdfefce (diff)
downloadlinux-02a3e3cdb7f12fb8589e4a2e85d23c9e6544b54a.tar.xz
x86/boot: Parse SRAT table and count immovable memory regions
Parse SRAT for the immovable memory regions and use that information to control which offset KASLR selects so that it doesn't overlap with any movable region. [ bp: - Move struct mem_vector where it is visible so that it builds. - Correct comments. - Rewrite commit message. ] Signed-off-by: Chao Fan <fanc.fnst@cn.fujitsu.com> Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Baoquan He <bhe@redhat.com> Cc: <caoj.fnst@cn.fujitsu.com> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: <indou.takao@jp.fujitsu.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Juergen Gross <jgross@suse.com> Cc: <kasong@redhat.com> Cc: <keescook@chromium.org> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Cc: <msys.mizuma@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: x86-ml <x86@kernel.org> Link: https://lkml.kernel.org/r/20190123110850.12433-7-fanc.fnst@cn.fujitsu.com
Diffstat (limited to 'arch/x86/boot/compressed/kaslr.c')
-rw-r--r--arch/x86/boot/compressed/kaslr.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c
index 9ed9709d9947..b251572e77af 100644
--- a/arch/x86/boot/compressed/kaslr.c
+++ b/arch/x86/boot/compressed/kaslr.c
@@ -87,10 +87,6 @@ static unsigned long get_boot_seed(void)
#define KASLR_COMPRESSED_BOOT
#include "../../lib/kaslr.c"
-struct mem_vector {
- unsigned long long start;
- unsigned long long size;
-};
/* Only supporting at most 4 unusable memmap regions with kaslr */
#define MAX_MEMMAP_REGIONS 4