From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f72.google.com (mail-it0-f72.google.com [209.85.214.72]) by kanga.kvack.org (Postfix) with ESMTP id B267B6B0033 for ; Thu, 14 Dec 2017 17:14:02 -0500 (EST) Received: by mail-it0-f72.google.com with SMTP id o66so10874268ita.3 for ; Thu, 14 Dec 2017 14:14:02 -0800 (PST) Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id m67sor503302ioo.96.2017.12.14.14.14.01 for (Google Transport Security); Thu, 14 Dec 2017 14:14:01 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20171214220226.GL3326@worktop> References: <20171214112726.742649793@infradead.org> <20171214113851.647809433@infradead.org> <20171214220226.GL3326@worktop> From: Linus Torvalds Date: Thu, 14 Dec 2017 14:14:00 -0800 Message-ID: Subject: Re: [PATCH v2 11/17] selftests/x86/ldt_gdt: Prepare for access bit forced Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-mm@kvack.org List-ID: To: Peter Zijlstra 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 On Thu, Dec 14, 2017 at 2:02 PM, Peter Zijlstra wrote: > > _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. At least the old get_user_pages_fast() code used to check the USER bit: unsigned long need_pte_bits = _PAGE_PRESENT|_PAGE_USER; if (write) need_pte_bits |= _PAGE_RW; but that may have been lost when we converted over to the generic code. It shouldn't actually _matter_, since we'd need to change access_ok() anyway (and gup had better check that!) Linus -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org