Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752626Ab0F3HBV (ORCPT ); Wed, 30 Jun 2010 03:01:21 -0400 Received: from cantor.suse.de ([195.135.220.2]:48064 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752398Ab0F3HBU (ORCPT ); Wed, 30 Jun 2010 03:01:20 -0400 Date: Wed, 30 Jun 2010 09:01:15 +0200 From: Michal Hocko To: Linus Torvalds Cc: Ingo Molnar , Darren Hart , Thomas Gleixner , LKML , Nick Piggin , Alexey Kuznetsov , Peter Zijlstra Subject: Re: [PATCH] futex: futex_find_get_task make credentials check conditional Message-ID: <20100630070115.GB3890@tiehlicka.suse.cz> References: <20100625082711.GA32765@tiehlicka.suse.cz> <4C24ED34.9040808@us.ibm.com> <4C253D32.6040304@us.ibm.com> <20100628144246.GA14201@tiehlicka.suse.cz> <20100628153214.GA24127@tiehlicka.suse.cz> <20100628155845.GC24127@tiehlicka.suse.cz> <20100628163952.GD24127@tiehlicka.suse.cz> <1277743748.3561.139.camel@laptop> <20100629084230.GE6215@tiehlicka.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1193 Lines: 31 On Tue 29-06-10 09:41:02, Linus Torvalds wrote: > On Tue, Jun 29, 2010 at 1:42 AM, Michal Hocko 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/