Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753931AbdLNWOD (ORCPT ); Thu, 14 Dec 2017 17:14:03 -0500 Received: from mail-it0-f47.google.com ([209.85.214.47]:40106 "EHLO mail-it0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753674AbdLNWOC (ORCPT ); Thu, 14 Dec 2017 17:14:02 -0500 X-Google-Smtp-Source: ACJfBosrMo5LT7TlNjlQmHTlL40VslpVJewWCvAN1Bw3dYNvO5KRdCpP5PmKzn3GaWtf6kfn2hFkMv7K1za0kMVFsHQ= 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 X-Google-Sender-Auth: Q0pmdjCR-irvrrLWyfIv9J1SxCw Message-ID: Subject: Re: [PATCH v2 11/17] selftests/x86/ldt_gdt: Prepare for access bit forced 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 629 Lines: 18 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