Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758498AbYBYSkl (ORCPT ); Mon, 25 Feb 2008 13:40:41 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755214AbYBYSkc (ORCPT ); Mon, 25 Feb 2008 13:40:32 -0500 Received: from x346.tv-sign.ru ([89.108.83.215]:38000 "EHLO mail.screens.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754451AbYBYSkc (ORCPT ); Mon, 25 Feb 2008 13:40:32 -0500 Date: Mon, 25 Feb 2008 21:42:02 +0300 From: Oleg Nesterov To: "Serge E. Hallyn" Cc: Andrew Morton , Casey Schaufler , David Quigley , "Eric W. Biederman" , Eric Paris , Harald Welte , Pavel Emelyanov , Stephen Smalley , linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] kill_pid_info_as_uid: don't use security_task_kill() Message-ID: <20080225184202.GA22147@tv-sign.ru> References: <20080225174228.GA22084@tv-sign.ru> <20080225180020.GA10631@sergelap.austin.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080225180020.GA10631@sergelap.austin.ibm.com> User-Agent: Mutt/1.5.11 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1493 Lines: 35 On 02/25, Serge E. Hallyn wrote: > > Quoting Oleg Nesterov (oleg@tv-sign.ru): > > kill_pid_info_as_uid() is solely used by drivers/usb/core/. The original > > "[PATCH] Fix signal sending in usbdevio on async URB completion" commit > > 46113830a18847cff8da73005e57bc49c2f95a56 was right, but nowadays we use > > struct pid and this solves most of the addressed problems. > > > > It would be nice to use kill_pid_info() instead, but we can't because USB > > uses .si_code = SI_ASYNCIO which fools SI_FROMUSER() and thus security checks. > > > > I think we should omit the permission checks completely, the task which does > > ioctl(USBDEVFS_SUBMITURB) explicitly asks to send the signal to it, we should > > not deny the signal even if the task changes its credentials in any way. > > > > For now, we can remove security_task_kill(). It is bogus, the signal has come > > from kernel. > > Ok, could you augment the comment above > kernel/signal.c:kill_pid_info_as_uid() to say that it is only called > from within the usb subsystem? OK, will do a bit later. I still hope we can kill this helper or at least cleanup it further. What we need in fact is kill_pid_info_skip_check_kill_permission(), and only because USB uses SI_ASYNCIO < 0. Oleg. -- 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/