From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [RFC][PATCHSET] mremap/mmap mess Date: Wed, 09 Dec 2009 14:39:18 +0100 Message-ID: <1260365958.5489.546.camel@laptop> References: <20091208060701.GM14381@ZenIV.linux.org.uk> <20091208.130802.25121122.davem@davemloft.net> <20091208220638.GN14381@ZenIV.linux.org.uk> <1260361302.5489.372.camel@laptop> <20091209132436.GQ14381@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: Received: from bombadil.infradead.org ([18.85.46.34]:44912 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755800AbZLINjd (ORCPT ); Wed, 9 Dec 2009 08:39:33 -0500 In-Reply-To: <20091209132436.GQ14381@ZenIV.linux.org.uk> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Al Viro Cc: Hugh Dickins , David Miller , Ollie Wild , Rik van Riel , viro@ftp.linux.org.uk, linux-arch@vger.kernel.org, torvalds@linux-foundation.org, akpm@linux-foundation.org, linux-kernel@vger.kernel.org On Wed, 2009-12-09 at 13:24 +0000, Al Viro wrote: > > That is, IIRC the problem is that you need to have the argc/env in place > > for the binfmt engine thing, and need to have ran the binfmt engine > > thing before you know the personality. > > > > As to your idea, if that were feasible we could do without the copy and > > simply steal the pages directly from the old mm. > > *raised brows* > Old mm may bloody well be still shared, so I'd be vary of trying that - > there's a lot of nasty surprises we could get on that way. Good point, but I think we might be able to do the copy from old to new in flush_old_exec() if we can get the binfmt things to pass the right address along (or set it in the brpm struct). It looks like it has clue about personality at that point.