From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot0-f197.google.com (mail-ot0-f197.google.com [74.125.82.197]) by kanga.kvack.org (Postfix) with ESMTP id 896636B0033 for ; Wed, 13 Dec 2017 13:24:01 -0500 (EST) Received: by mail-ot0-f197.google.com with SMTP id z30so1675133otd.9 for ; Wed, 13 Dec 2017 10:24:01 -0800 (PST) Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id z6sor886214ota.202.2017.12.13.10.24.00 for (Google Transport Security); Wed, 13 Dec 2017 10:24:00 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <20171212173221.496222173@linutronix.de> <20171212173333.669577588@linutronix.de> <20171213122211.bxcb7xjdwla2bqol@hirez.programming.kicks-ass.net> <20171213125739.fllckbl3o4nonmpx@node.shutemov.name> <20171213153202.qtxnloxoc66lhsbf@hirez.programming.kicks-ass.net> <20171213155427.p24i2xdh2s65e4d2@hirez.programming.kicks-ass.net> From: Linus Torvalds Date: Wed, 13 Dec 2017 10:23:59 -0800 Message-ID: Subject: Re: [patch 05/16] mm: Allow special mappings with user access cleared Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-mm@kvack.org List-ID: To: Dave Hansen Cc: Peter Zijlstra , "Kirill A. Shutemov" , Andy Lutomirski , Thomas Gleixner , LKML , X86 ML , 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" , "Aneesh Kumar K. V" On Wed, Dec 13, 2017 at 10:21 AM, Dave Hansen wrote: > On 12/13/2017 10:08 AM, Linus Torvalds wrote: >> On Wed, Dec 13, 2017 at 7:54 AM, Peter Zijlstr wrote: >>> Which is why get_user_pages() _should_ enforce this. >>> >>> What use are protection keys if you can trivially circumvent them? >> No, we will *not* worry about protection keys in get_user_pages(). > > We did introduce some support for it here: > >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=33a709b25a760b91184bb335cf7d7c32b8123013 Ugh. I never realized. We should revert that, I feel. It's literally extra complexity for no actual real gain, and there is a real downside: the extra complexity that will cause people to get things wrong. This thread about us getting it wrong is just the proof. I vote for not trying to "fix" this case, let's just remove it. 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