summaryrefslogtreecommitdiffstats
path: root/LICENSES
diff options
context:
space:
mode:
authorArvind Sankar <nivedita@alum.mit.edu>2020-10-10 21:11:10 +0200
committerBorislav Petkov <bp@suse.de>2020-10-19 12:47:21 +0200
commite5ceb9a02402b984feecb95a82239be151c9f4e2 (patch)
treec0ea17ca8e1d466a48abb1c37f4c67a3bf3fc7da /LICENSES
parentMerge tag 'x86_seves_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/... (diff)
downloadlinux-e5ceb9a02402b984feecb95a82239be151c9f4e2.tar.xz
linux-e5ceb9a02402b984feecb95a82239be151c9f4e2.zip
x86/boot/64: Initialize 5-level paging variables earlier
Commit ca0e22d4f011 ("x86/boot/compressed/64: Always switch to own page table") started using a new set of pagetables even without KASLR. After that commit, initialize_identity_maps() is called before the 5-level paging variables are setup in choose_random_location(), which will not work if 5-level paging is actually enabled. Fix this by moving the initialization of __pgtable_l5_enabled, pgdir_shift and ptrs_per_p4d into cleanup_trampoline(), which is called immediately after the finalization of whether the kernel is executing with 4- or 5-level paging. This will be earlier than anything that might require those variables, and keeps the 4- vs 5-level paging code all in one place. Fixes: ca0e22d4f011 ("x86/boot/compressed/64: Always switch to own page table") Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu> Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Joerg Roedel <jroedel@suse.de> Tested-by: Joerg Roedel <jroedel@suse.de> Tested-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Link: https://lkml.kernel.org/r/20201010191110.4060905-1-nivedita@alum.mit.edu
Diffstat (limited to 'LICENSES')
0 files changed, 0 insertions, 0 deletions