From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f200.google.com (mail-wr0-f200.google.com [209.85.128.200]) by kanga.kvack.org (Postfix) with ESMTP id ECCF96B000D for ; Mon, 23 Apr 2018 13:45:16 -0400 (EDT) Received: by mail-wr0-f200.google.com with SMTP id g7-v6so10254777wrb.19 for ; Mon, 23 Apr 2018 10:45:16 -0700 (PDT) Received: from mx2.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id x40si4922425edx.299.2018.04.23.10.45.14 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 23 Apr 2018 10:45:14 -0700 (PDT) Date: Mon, 23 Apr 2018 19:45:06 +0200 From: Joerg Roedel Subject: Re: [PATCH 00/37 v6] PTI support for x86-32 Message-ID: <20180423174506.mpbpnvfzv6fmpbzy@suse.de> References: <1524498460-25530-1-git-send-email-joro@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Linus Torvalds Cc: Joerg Roedel , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , the arch/x86 maintainers , Linux Kernel Mailing List , linux-mm , Andy Lutomirski , Dave Hansen , Josh Poimboeuf , Juergen Gross , Peter Zijlstra , Borislav Petkov , Jiri Kosina , Boris Ostrovsky , Brian Gerst , David Laight , Denys Vlasenko , Eduardo Valentin , Greg KH , Will Deacon , "Liguori, Anthony" , Daniel Gruss , Hugh Dickins , Kees Cook , Andrea Arcangeli , Waiman Long , Pavel Machek , "David H . Gutteridge" On Mon, Apr 23, 2018 at 09:45:38AM -0700, Linus Torvalds wrote: > Just one question: have you checked the page table setup for the > basics wrt the USER bit in particular? Just checked that and there are no pages with GLB and USR set, not even a vdso page. > No global pages should be marked PAGE_USER, with the possible > exception of that nasty old vsyscall page. The vsyscall page does not exist on plain 32 bit, no? All I could find there is the vdso page, and that has no compat mapping anymore in recent upstream kernels. To my understanding the vdso page is mapped into the user-space portion of the address space. At least that is what I found while looking at this, but I might have missed something. I actually ran into a vdso issue when porting these changes to 3.0 (where there still is a compat vdso mapping in the fixmap) so I checked my upstream code too, but didn't find the code to setup a vdso in the fixmap. > And it would be nice to verify that the page tables for kernel > mappings also don't have PAGE_USER on them, although again that > vsyscall page can cause problems. Checked that too, all USR mappings are below PAGE_OFFSET. Regards, Joerg