Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753395AbdLMSId (ORCPT ); Wed, 13 Dec 2017 13:08:33 -0500 Received: from mail-it0-f43.google.com ([209.85.214.43]:44326 "EHLO mail-it0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752175AbdLMSIb (ORCPT ); Wed, 13 Dec 2017 13:08:31 -0500 X-Google-Smtp-Source: ACJfBotCpPAKUXqe2dj7VLCEAVjztY9+ceQO3gtHaOb1PjNNM2jpjUNrHrz+c7w01OUvojc5EDJrzw8gX/+VXkYAkz8= MIME-Version: 1.0 In-Reply-To: <20171213155427.p24i2xdh2s65e4d2@hirez.programming.kicks-ass.net> 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:08:30 -0800 X-Google-Sender-Auth: bBxU7kHbR3QizMaLcpYl4EApN9Q Message-ID: Subject: Re: [patch 05/16] mm: Allow special mappings with user access cleared To: Peter Zijlstra Cc: Dave Hansen , "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" 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: 732 Lines: 19 On Wed, Dec 13, 2017 at 7:54 AM, Peter Zijlstra 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(). They are not "security". They are a debug aid and safety against random mis-use. In particular, they are very much *NOT* about "trivially circumvent them". The user could just change their mapping thing, for chrissake! We already allow access to PROT_NONE for gdb and friends, very much on purpose. We're not going to make the VM more complex for something that absolutely nobody cares about, and has zero security issues. Linus