[Devel] Re: [PATCH 8/9] user namespaces: debug refcounts
Serge E. Hallyn
serge at hallyn.com
Mon Jun 1 12:02:50 PDT 2009
Quoting Alexey Dobriyan (adobriyan at gmail.com):
> 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.
This one was just so ppl could verify things were working as
promised. I won't be sending it again.
(OTOH, noone noticed i wasn't actually calling the securebits
c/r helpers... I'll be sending a new set of patches fixing that,
not including this patch, and hopefully addressing Andrew's and
Oren's latest replies.
thanks,
-serge
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list