[tip:x86/boot] x86/boot: Comment what finalize_identity_maps() does
From: tip-bot for Borislav Petkov
Date: Tue May 10 2016 - 04:41:42 EST
Commit-ID: 36a39ac967a548154a0fe44d71cb0063fa05010f
Gitweb: http://git.kernel.org/tip/36a39ac967a548154a0fe44d71cb0063fa05010f
Author: Borislav Petkov <bp@xxxxxxx>
AuthorDate: Sat, 7 May 2016 11:59:40 +0200
Committer: Ingo Molnar <mingo@xxxxxxxxxx>
CommitDate: Tue, 10 May 2016 10:12:02 +0200
x86/boot: Comment what finalize_identity_maps() does
So it is not really obvious that finalize_identity_maps() doesn't do any
finalization but it *actually* writes CR3 with the ident PGD. Comment
that at the call site.
Signed-off-by: Borislav Petkov <bp@xxxxxxx>
Cc: Andy Lutomirski <luto@xxxxxxxxxxxxxx>
Cc: Borislav Petkov <bp@xxxxxxxxx>
Cc: Brian Gerst <brgerst@xxxxxxxxx>
Cc: Denys Vlasenko <dvlasenk@xxxxxxxxxx>
Cc: H. Peter Anvin <hpa@xxxxxxxxx>
Cc: Kees Cook <keescook@xxxxxxxxxxxx>
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: akpm@xxxxxxxxxxxxxxxxxxxx
Cc: bhe@xxxxxxxxxx
Cc: dyoung@xxxxxxxxxx
Cc: jkosina@xxxxxxx
Cc: linux-tip-commits@xxxxxxxxxxxxxxx
Cc: luto@xxxxxxxxxx
Cc: vgoyal@xxxxxxxxxx
Cc: yinghai@xxxxxxxxxx
Link: http://lkml.kernel.org/r/20160507100541.GA24613@xxxxxxx
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
---
arch/x86/boot/compressed/kaslr.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c
index f82975b..f5a138c 100644
--- a/arch/x86/boot/compressed/kaslr.c
+++ b/arch/x86/boot/compressed/kaslr.c
@@ -437,6 +437,8 @@ unsigned char *choose_random_location(unsigned long input,
choice = random_addr;
add_identity_map(choice, output_size);
+
+ /* This actually loads the identity pagetable on x86_64. */
finalize_identity_maps();
out:
return (unsigned char *)choice;