From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751720AbcEJIli (ORCPT ); Tue, 10 May 2016 04:41:38 -0400 Received: from terminus.zytor.com ([198.137.202.10]:46768 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751274AbcEJIlg (ORCPT ); Tue, 10 May 2016 04:41:36 -0400 Date: Tue, 10 May 2016 01:40:28 -0700 From: tip-bot for Borislav Petkov Message-ID: 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 Reply-To: hpa@zytor.com, keescook@chromium.org, tglx@linutronix.de, luto@amacapital.net, brgerst@gmail.com, bp@suse.de, linux-kernel@vger.kernel.org, dvlasenk@redhat.com, mingo@kernel.org, bp@alien8.de, peterz@infradead.org, torvalds@linux-foundation.org In-Reply-To: <20160507100541.GA24613@pd.tnic> References: <20160507100541.GA24613@pd.tnic> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/boot] x86/boot: Comment what finalize_identity_maps() does Git-Commit-ID: 36a39ac967a548154a0fe44d71cb0063fa05010f X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 36a39ac967a548154a0fe44d71cb0063fa05010f Gitweb: http://git.kernel.org/tip/36a39ac967a548154a0fe44d71cb0063fa05010f Author: Borislav Petkov AuthorDate: Sat, 7 May 2016 11:59:40 +0200 Committer: Ingo Molnar 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 Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner 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 --- 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;