[Devel] Re: [PATCH 8/9] user namespaces: debug refcounts
Alexey Dobriyan
adobriyan at gmail.com
Sun May 31 11:51:13 PDT 2009
On Fri, May 29, 2009 at 05:33:52PM -0500, Serge E. Hallyn wrote:
> Create /proc/userns, which prints out all user namespaces. It
> prints the address of the user_ns itself, the uid and userns address
> of the user who created it, and the reference count.
> +static int proc_userns_show(struct seq_file *m, void *v)
> +{
> + struct user_namespace *ns = v;
> + seq_printf(m, "userns %p creator (uid %d ns %p) count %d\n",
> + (void *)ns, ns->creator->uid, (void *) ns->creator->user_ns,
> + atomic_read(&ns->kref.refcount));
> + return 0;
> +}
Kernel shouldn't expose location of kernel objects to userspace.
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list