From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758548AbdLROVX (ORCPT ); Mon, 18 Dec 2017 09:21:23 -0500 Received: from mx2.suse.de ([195.135.220.15]:53866 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752858AbdLROVW (ORCPT ); Mon, 18 Dec 2017 09:21:22 -0500 Date: Mon, 18 Dec 2017 15:21:13 +0100 From: Borislav Petkov To: Thomas Gleixner Cc: LKML , x86@kernel.org, Linus Torvalds , Andy Lutomirsky , Peter Zijlstra , Dave Hansen , Greg KH , keescook@google.com, hughd@google.com, Brian Gerst , Josh Poimboeuf , Denys Vlasenko , Rik van Riel , Boris Ostrovsky , Juergen Gross , David Laight , Eduardo Valentin , aliguori@amazon.com, Will Deacon , daniel.gruss@iaik.tugraz.at, Ingo Molnar , Kees Cook Subject: Re: [patch V163 02/51] x86/vsyscall/64: Explicitly set _PAGE_USER in the pagetable hierarchy Message-ID: <20171218142113.ipmm37pwueksnwdo@pd.tnic> References: <20171218114215.239543034@linutronix.de> <20171218115253.751799454@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20171218115253.751799454@linutronix.de> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 18, 2017 at 12:42:17PM +0100, Thomas Gleixner wrote: > From: Andy Lutomirski > > The kernel is very erratic as to which pagetables have _PAGE_USER set. The > vsyscall page gets lucky: it seems that all of the relevant pagetables are > among the apparently arbitrary ones that set _PAGE_USER. Rather than > relying on chance, just explicitly set _PAGE_USER. > > This will let us clean up pagetable setup to stop setting _PAGE_USER. The > added code can also be reused by pagetable isolation to manage the > _PAGE_USER bit in the usermode tables. > > Signed-off-by: Andy Lutomirski > Signed-off-by: Ingo Molnar > Signed-off-by: Thomas Gleixner > Cc: Borislav Petkov > Cc: Brian Gerst > Cc: David Laight > Cc: Kees Cook > Cc: Linus Torvalds > Cc: Peter Zijlstra > Cc: Thomas Gleixner > --- > arch/x86/entry/vsyscall/vsyscall_64.c | 33 ++++++++++++++++++++++++++++++++- > 1 file changed, 32 insertions(+), 1 deletion(-) Nice. Reviewed-by: Borislav Petkov -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --