lkml.org 
[lkml]   [2009]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] mm_for_maps: simplify, use ptrace_may_access()
On Tue, 23 Jun 2009, Serge E. Hallyn wrote:

> Quoting Oleg Nesterov (oleg@redhat.com):
> > It would be nice to kill __ptrace_may_access(). It requires task_lock(),
> > but this lock is only needed to read mm->flags in the middle.
> >
> > Convert mm_for_maps() to use ptrace_may_access(), this also simplifies
> > the code a little bit.
> >
> > Also, we do not need to take ->mmap_sem in advance. In fact I think
> > mm_for_maps() should not play with ->mmap_sem at all, the caller should
> > take this lock.
>
> Yeah I think that makes sense.
>
> > With or without this patch, without ->cred_guard_mutex held we can race
> > with exec() and get the new ->mm but check old creds.
> >
> > Signed-off-by: Oleg Nesterov <oleg@redhat.com>
>
> reasoning on the security check also makes sense.
>
> Reviewed-by: Serge Hallyn <serue@us.ibm.com>


Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6#next


--
James Morris
<jmorris@namei.org>


\
 
 \ /
  Last update: 2009-06-24 16:25    [W:0.279 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site