Messages in this thread | | | Date | Wed, 30 Jun 2010 09:01:15 +0200 | From | Michal Hocko <> | Subject | Re: [PATCH] futex: futex_find_get_task make credentials check conditional |
| |
On Tue 29-06-10 09:41:02, Linus Torvalds wrote: > On Tue, Jun 29, 2010 at 1:42 AM, Michal Hocko <mhocko@suse.cz> wrote: > > > > futex_find_get_task is currently used (through lookup_pi_state) from two > > contexts, futex_requeue and futex_lock_pi_atomic. While credentials check > > makes sense in the first code path, the second one is more problematic > > because this check requires that the PI lock holder (pid parameter) has > > the same uid and euid as the process's euid which is trying to lock the > > same futex (current). > > So exactly why does it make sense to check the credentials in the > first code path then?
I though that requeue needs this for security reasons (don't let requeue process for other user), but when I thought about that again you are right and the only what matters should be accessibility of the shared memory.
-- Michal Hocko L3 team SUSE LINUX s.r.o. Lihovarska 1060/12 190 00 Praha 9 Czech Republic
| |