Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933149AbZAQUlB (ORCPT ); Sat, 17 Jan 2009 15:41:01 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933022AbZAQUkj (ORCPT ); Sat, 17 Jan 2009 15:40:39 -0500 Received: from e5.ny.us.ibm.com ([32.97.182.145]:39040 "EHLO e5.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932792AbZAQUkh (ORCPT ); Sat, 17 Jan 2009 15:40:37 -0500 Date: Sat, 17 Jan 2009 12:37:21 -0800 From: Sukadev Bhattiprolu To: oleg@redhat.com, ebiederm@xmission.com, roland@redhat.com, bastian@waldi.eu.org Cc: daniel@hozac.com, xemul@openvz.org, containers@lists.osdl.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/7][v7] SI_USER: Masquerade si_pid when crossing pid ns boundary Message-ID: <20090117203721.GG11825@us.ibm.com> References: <20090117202638.GA11825@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090117202638.GA11825@us.ibm.com> X-Operating-System: Linux 2.0.32 on an i486 User-Agent: Mutt/1.5.15+20070412 (2007-04-11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1434 Lines: 44 From: Sukadev Bhattiprolu Date: Wed, 24 Dec 2008 14:14:18 -0800 Subject: [PATCH 6/7][v7] SI_USER: Masquerade si_pid when crossing pid ns boundary When sending a signal to a descendant namespace, set ->si_pid to 0 since the sender does not have a pid in the receiver's namespace. Note: - If rt_sigqueueinfo() sets si_code to SI_USER when sending a signal across a pid namespace boundary, the value in ->si_pid will be cleared to 0. Changelog[v5]: - (Oleg Nesterov) Address both sys_kill() and sys_tkill() cases in send_signal() to simplify code (this drops patch 7/7 from earlier version of patchset). Signed-off-by: Sukadev Bhattiprolu --- kernel/signal.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/kernel/signal.c b/kernel/signal.c index ccc020f..81b8603 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -880,6 +880,8 @@ static int __send_signal(int sig, struct siginfo *info, struct task_struct *t, break; default: copy_siginfo(&q->info, info); + if (from_ancestor_ns) + q->info.si_pid = 0; break; } } else if (!is_si_special(info)) { -- 1.5.2.5 -- 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/