From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot0-f198.google.com (mail-ot0-f198.google.com [74.125.82.198]) by kanga.kvack.org (Postfix) with ESMTP id 140456B0253 for ; Wed, 13 Dec 2017 13:35:02 -0500 (EST) Received: by mail-ot0-f198.google.com with SMTP id f62so1678026otf.6 for ; Wed, 13 Dec 2017 10:35: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 n3sor898133ota.67.2017.12.13.10.35.01 for (Google Transport Security); Wed, 13 Dec 2017 10:35:01 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20171213183209.GZ3165@worktop.lehotels.local> 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> <20171213183209.GZ3165@worktop.lehotels.local> From: Linus Torvalds Date: Wed, 13 Dec 2017 10:35:00 -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: 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" On Wed, Dec 13, 2017 at 10:32 AM, Peter Zijlstra wrote: > > Now, if VM_NOUSER were to live, the above change would ensure write(2) > cannot read from such VMAs, where the existing test for FOLL_WRITE > already disallows read(2) from writing to them. So I don't mind at all the notion of disallowing access to some special mappings at the vma level. So a VM_NOUSER flag that just disallows get_user_pages entirely I'm ok with. It's the protection keys in particular that I don't like having to worry about. They are subtle and have odd architecture-specific meaning, and needs to be checked at all levels in the page table tree. 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