[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20090624143706.GC18662@redhat.com>
Date: Wed, 24 Jun 2009 16:37:06 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Roland McGrath <roland@...hat.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Christoph Hellwig <hch@...radead.org>,
James Morris <jmorris@...ei.org>, Ingo Molnar <mingo@...e.hu>,
Chris Wright <chrisw@...s-sol.org>,
linux-kernel@...r.kernel.org, Al Viro <viro@...IV.linux.org.uk>,
linux-security-module@...r.kernel.org
Subject: Re: [PATCH 1/1] mm_for_maps: simplify, use ptrace_may_access()
On 06/24, Roland McGrath wrote:
>
> > 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.
>
> Agreed. It has only one caller (though two forks of it) in
> fs/proc/task_{no,}mmu.c and it looks easy to change.
>
> > With or without this patch, without ->cred_guard_mutex held we can race
> > with exec() and get the new ->mm but check old creds.
>
> It looks safe and proper for mm_for_maps() to take that mutex around its
> check. Your patch looks good to me as it is, and taking cred_guard_mutex
> can be another security fix patch on top.
Agreed, will do.
Oleg.
--
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