Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1481991
| From | Evgeniy Polyakov <zbr@ioremap.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] [RFC] proc connector: add namespace events |
| Date | 2016-09-12 23:40 +0200 |
| Message-ID | <sgH7j-FR-17@gated-at.bofh.it> (permalink) |
| References | <sf9AK-7xA-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi everyone 08.09.2016, 18:39, "Alban Crequy" <alban.crequy@gmail.com>: > 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?
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH] [RFC] proc connector: add namespace events Evgeniy Polyakov <zbr@ioremap.net> - 2016-09-12 23:40 +0200
Re: [PATCH] [RFC] proc connector: add namespace events Alban Crequy <alban.crequy@gmail.com> - 2016-09-13 16:50 +0200
Re: [PATCH] [RFC] proc connector: add namespace events Jiri Benc <jbenc@redhat.com> - 2016-09-14 11:30 +0200
csiph-web