From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f71.google.com (mail-it0-f71.google.com [209.85.214.71]) by kanga.kvack.org (Postfix) with ESMTP id 34B856B0038 for ; Thu, 14 Dec 2017 17:53:00 -0500 (EST) Received: by mail-it0-f71.google.com with SMTP id p144so11001793itc.9 for ; Thu, 14 Dec 2017 14:53:00 -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 v190sor3939110itb.86.2017.12.14.14.52.59 for (Google Transport Security); Thu, 14 Dec 2017 14:52:59 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20171214222439.rovm3t7iaakefati@hirez.programming.kicks-ass.net> References: <20171214112726.742649793@infradead.org> <20171214113851.647809433@infradead.org> <20171214220226.GL3326@worktop> <20171214222439.rovm3t7iaakefati@hirez.programming.kicks-ass.net> From: Linus Torvalds Date: Thu, 14 Dec 2017 14:52:58 -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:24 PM, Peter Zijlstra wrote: > > get_user_pages_fast() (both of them) do indeed test access_ok(), but the > regular get_user_pages() does not, I suspect because it can operate on a > foreign mm. That sounds wrong. We actually had some very serious reasons why get_user_pages_fast() needed to check access_ok(). I happen to forget what those reasons were, though. My mind may be going. But I think it was something like "you could walk off the page tables because the undefined address range generates nonsensical values for the pgd_offset() functions" etc. But maybe the regular get_user_pages() has some other way to protect against 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