Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752453AbdLLS0K (ORCPT ); Tue, 12 Dec 2017 13:26:10 -0500 Received: from merlin.infradead.org ([205.233.59.134]:34984 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752134AbdLLS0I (ORCPT ); Tue, 12 Dec 2017 13:26:08 -0500 Date: Tue, 12 Dec 2017 19:25:37 +0100 From: Peter Zijlstra To: Andy Lutomirski Cc: Thomas Gleixner , LKML , X86 ML , Linus Torvalds , 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" Subject: Re: [patch 05/16] mm: Allow special mappings with user access cleared Message-ID: <20171212182537.jfyoch3t2pe2sds4@hirez.programming.kicks-ass.net> References: <20171212173221.496222173@linutronix.de> <20171212173333.669577588@linutronix.de> <20171212180509.iewpmzdhvsusk2nk@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 702 Lines: 21 On Tue, Dec 12, 2017 at 10:06:51AM -0800, Andy Lutomirski wrote: > On Tue, Dec 12, 2017 at 10:05 AM, Peter Zijlstra wrote: > > gup would find the page. These patches do in fact rely on that through > > the populate things. > > > > Blech. So you can write(2) from the LDT to a file and you can even > sendfile it, perhaps. Hmm, indeed.. I suppose I could go fix that. But how bad is it to leak the LDT contents? What would be far worse of course is if we could read(2) data into the ldt, I'll look into that. > What happens if it's get_user_page()'d when > modify_ldt() wants to free it? modify_ldt should never free pages, we only ever free pages when we destroy the mm.