[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120309220244.GD19584@count0.beaverton.ibm.com>
Date: Fri, 9 Mar 2012 14:02:44 -0800
From: Matt Helsley <matthltc@...ibm.com>
To: Cyrill Gorcunov <gorcunov@...nvz.org>
Cc: Oleg Nesterov <oleg@...hat.com>,
Matt Helsley <matthltc@...ibm.com>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
Pavel Emelyanov <xemul@...allels.com>,
Kees Cook <keescook@...omium.org>, Tejun Heo <tj@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [RFC] c/r: prctl: Add ability to set new mm_struct::exe_file v3
On Fri, Mar 09, 2012 at 07:42:24PM +0400, Cyrill Gorcunov wrote:
> On Fri, Mar 09, 2012 at 04:21:22PM +0100, Oleg Nesterov wrote:
<snip>
> > Just one note for the record, prctl_set_mm_exe_file() does
> >
> > if (mm->num_exe_file_vmas)
> > return -EBUSY;
> >
> > We could do
> >
> > if (mm->exe_file)
> > return -EBUSY;
> >
> > This way "because this feature is a special to C/R" becomes
> > really true. IOW, you can't do PR_SET_MM_EXE_FILE twice.
> >
>
> Sure, i'll make it this way. Thanks a lot, Oleg!!!
Sorry about the other email -- hadn't full caught up on this thread.
This is even better, yes.
Of course I'd prefer it if there was a way to keep num_exe_file_vmas
correct and not special-case c/r. The first approximation of a solution
might be to increment the count whenever a new mmap filp == mm->exe_file
and decrement on unmap. I think there are a bunch of details needed to
make that work but my feeling is it's do-able. Have you investigated this
already and rejected it for some reason (did I miss that discussion
somehow?)?
Cheers,
-Matt Helsley
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists