Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752577AbdLLSAd (ORCPT ); Tue, 12 Dec 2017 13:00:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:39462 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752288AbdLLSAa (ORCPT ); Tue, 12 Dec 2017 13:00:30 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F3829218D2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=luto@kernel.org X-Google-Smtp-Source: ACJfBovRg1Bs7AG7JdZ3e5fRzCmPPFMp0rj7rXnHlCZRVHylbq86Z/PXqbpWzfjbt7xhSZIhX2zPi8aiKmFgpkeZ78Q= MIME-Version: 1.0 In-Reply-To: <20171212173333.669577588@linutronix.de> References: <20171212173221.496222173@linutronix.de> <20171212173333.669577588@linutronix.de> From: Andy Lutomirski Date: Tue, 12 Dec 2017 10:00:08 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [patch 05/16] mm: Allow special mappings with user access cleared To: Thomas Gleixner Cc: LKML , X86 ML , Linus Torvalds , Andy Lutomirsky , Peter Zijlstra , Dave Hansen , Borislav Petkov , Greg KH , Kees Cook , Hugh Dickins , Brian Gerst , Josh Poimboeuf , Denys Vlasenko , Boris Ostrovsky , Juergen Gross , David Laight , Eduardo Valentin , aliguori@amazon.com, Will Deacon , "linux-mm@kvack.org" 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: 591 Lines: 12 On Tue, Dec 12, 2017 at 9:32 AM, Thomas Gleixner wrote: > From: Peter Zijstra > > In order to create VMAs that are not accessible to userspace create a new > VM_NOUSER flag. This can be used in conjunction with > install_special_mapping() to inject 'kernel' data into the userspace map. > > Similar to how arch_vm_get_page_prot() allows adding _PAGE_flags to > pgprot_t, introduce arch_vm_get_page_prot_excl() which masks > _PAGE_flags from pgprot_t and use this to implement VM_NOUSER for x86. How does this interact with get_user_pages(), etc?