All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Borislav Petkov <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: hpa@zytor.com, keescook@chromium.org, brgerst@gmail.com,
	luto@amacapital.net, tglx@linutronix.de, bp@alien8.de,
	mingo@kernel.org, dvlasenk@redhat.com,
	linux-kernel@vger.kernel.org, bp@suse.de,
	torvalds@linux-foundation.org, peterz@infradead.org
Subject: [tip:x86/boot] x86/boot: Comment what finalize_identity_maps() does
Date: Tue, 10 May 2016 01:40:28 -0700	[thread overview]
Message-ID: <tip-36a39ac967a548154a0fe44d71cb0063fa05010f@git.kernel.org> (raw)
In-Reply-To: <20160507100541.GA24613@pd.tnic>

Commit-ID:  36a39ac967a548154a0fe44d71cb0063fa05010f
Gitweb:     http://git.kernel.org/tip/36a39ac967a548154a0fe44d71cb0063fa05010f
Author:     Borislav Petkov <bp@suse.de>
AuthorDate: Sat, 7 May 2016 11:59:40 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
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@suse.de>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: akpm@linux-foundation.org
Cc: bhe@redhat.com
Cc: dyoung@redhat.com
Cc: jkosina@suse.cz
Cc: linux-tip-commits@vger.kernel.org
Cc: luto@kernel.org
Cc: vgoyal@redhat.com
Cc: yinghai@kernel.org
Link: http://lkml.kernel.org/r/20160507100541.GA24613@pd.tnic
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 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;

  reply	other threads:[~2016-05-10  8:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-06 22:01 [PATCH 0/3] x86/KASLR: Build identity mappings on demand Kees Cook
2016-05-06 22:01 ` [kernel-hardening] " Kees Cook
2016-05-06 22:01 ` [PATCH 1/3] x86/boot: Clean up indenting for asm/boot.h Kees Cook
2016-05-06 22:01   ` [kernel-hardening] " Kees Cook
2016-05-07  6:36   ` [tip:x86/boot] " tip-bot for Kees Cook
2016-05-06 22:01 ` [PATCH 2/3] x86/boot: Split out kernel_ident_mapping_init Kees Cook
2016-05-06 22:01   ` [kernel-hardening] " Kees Cook
2016-05-07  6:36   ` [tip:x86/boot] x86/boot: Split out kernel_ident_mapping_init() tip-bot for Yinghai Lu
2016-05-06 22:01 ` [PATCH 3/3] x86/KASLR: Build identity mappings on demand Kees Cook
2016-05-06 22:01   ` [kernel-hardening] " Kees Cook
2016-05-07  6:37   ` [tip:x86/boot] " tip-bot for Kees Cook
2016-05-07 10:05     ` Borislav Petkov
2016-05-10  8:40       ` tip-bot for Borislav Petkov [this message]
2016-05-07  5:40 ` [PATCH 0/3] " Ingo Molnar
2016-05-07  5:40   ` [kernel-hardening] " Ingo Molnar

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=tip-36a39ac967a548154a0fe44d71cb0063fa05010f@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=bp@alien8.de \
    --cc=bp@suse.de \
    --cc=brgerst@gmail.com \
    --cc=dvlasenk@redhat.com \
    --cc=hpa@zytor.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.