From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755181AbcILVjt (ORCPT ); Mon, 12 Sep 2016 17:39:49 -0400 Received: from forward4j.cmail.yandex.net ([5.255.227.22]:55637 "EHLO forward4j.cmail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751463AbcILVjr (ORCPT ); Mon, 12 Sep 2016 17:39:47 -0400 Authentication-Results: mxback9g.mail.yandex.net; dkim=pass header.i=@yandex.ru From: Evgeniy Polyakov Envelope-From: drustafa@yandex.ru To: Alban Crequy , Alban Crequy Cc: Tejun Heo , Aditya Kali , Serge Hallyn , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Iago Lopez Galeiras In-Reply-To: <1473349086-31260-1-git-send-email-alban@kinvolk.io> References: <1473349086-31260-1-git-send-email-alban@kinvolk.io> Subject: Re: [PATCH] [RFC] proc connector: add namespace events MIME-Version: 1.0 Message-Id: <772621473716384@web6g.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Tue, 13 Sep 2016 00:39:44 +0300 Content-Transfer-Encoding: 7bit Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi everyone 08.09.2016, 18:39, "Alban Crequy" : > The act of a process creating or joining a namespace via clone(), > unshare() or setns() is a useful signal for monitoring applications. > + if (old_ns->mnt_ns != new_ns->mnt_ns) > + proc_ns_connector(tsk, CLONE_NEWNS, PROC_NM_REASON_CLONE, old_mntns_inum, new_mntns_inum); > + > + if (old_ns->uts_ns != new_ns->uts_ns) > + proc_ns_connector(tsk, CLONE_NEWUTS, PROC_NM_REASON_CLONE, old_ns->uts_ns->ns.inum, new_ns->uts_ns->ns.inum); > + > + if (old_ns->ipc_ns != new_ns->ipc_ns) > + proc_ns_connector(tsk, CLONE_NEWIPC, PROC_NM_REASON_CLONE, old_ns->ipc_ns->ns.inum, new_ns->ipc_ns->ns.inum); > + > + if (old_ns->net_ns != new_ns->net_ns) > + proc_ns_connector(tsk, CLONE_NEWNET, PROC_NM_REASON_CLONE, old_ns->net_ns->ns.inum, new_ns->net_ns->ns.inum); > + > + if (old_ns->cgroup_ns != new_ns->cgroup_ns) > + proc_ns_connector(tsk, CLONE_NEWCGROUP, PROC_NM_REASON_CLONE, old_ns->cgroup_ns->ns.inum, new_ns->cgroup_ns->ns.inum); > + > + if (old_ns->pid_ns_for_children != new_ns->pid_ns_for_children) > + proc_ns_connector(tsk, CLONE_NEWPID, PROC_NM_REASON_CLONE, old_ns->pid_ns_for_children->ns.inum, new_ns->pid_ns_for_children->ns.inum); > + } > + Patch looks good to me from technical/connector point of view, but these even multiplication is a bit weird imho. I'm not against it, but did you consider sending just 2 serialized ns structures via single message, and client would check all ns bits himself?