Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754094AbdLNWCp (ORCPT ); Thu, 14 Dec 2017 17:02:45 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:47166 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753608AbdLNWCo (ORCPT ); Thu, 14 Dec 2017 17:02:44 -0500 Date: Thu, 14 Dec 2017 23:02:26 +0100 From: Peter Zijlstra To: Linus Torvalds Cc: Andy Lutomirski , "linux-kernel@vger.kernel.org" , Thomas Gleixner , X86 ML , Dave Hansen , Borislav Petkov , Greg KH , Kees Cook , Hugh Dickins , Brian Gerst , Josh Poimboeuf , Denys Vlasenko , Boris Ostrovsky , Juergen Gross , David Laight , Eduardo Valentin , "Liguori, Anthony" , Will Deacon , "linux-mm@kvack.org" , "Kirill A. Shutemov" , Dan Williams Subject: Re: [PATCH v2 11/17] selftests/x86/ldt_gdt: Prepare for access bit forced Message-ID: <20171214220226.GL3326@worktop> References: <20171214112726.742649793@infradead.org> <20171214113851.647809433@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.22.1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 376 Lines: 8 On Thu, Dec 14, 2017 at 01:48:50PM -0800, Linus Torvalds wrote: > Actually, just clearing PAGE_USER should make gup avoid it automatically. _Should_ being the operative word, because I cannot currently see it DTRT. But maybe I'm missing the obvious -- I tend to do that at times. We don't appear to have pte_bad() and pte_access_permitted() is currently all sorts of wrong.