From: "Serge E. Hallyn" <serue@us.ibm.com>
To: Dan Smith <danms@us.ibm.com>
Cc: containers@lists.osdl.org, Alexey Dobriyan <adobriyan@gmail.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH 5/5] c/r: Add AF_UNIX support (v7)
Date: Wed, 5 Aug 2009 08:29:48 -0500 [thread overview]
Message-ID: <20090805132948.GA31272@us.ibm.com> (raw)
In-Reply-To: <8763d3dwmx.fsf@caffeine.danplanet.com>
Quoting Dan Smith (danms@us.ibm.com):
> SH> why only free iov_base if ret!=0?
>
> Because I was diagnosing a crash that only seemed to happen when I
> free()'d the buffer after it was used by sendmsg() and I forgot to
> remove this :(
>
> >> + a->sk_peercred.pid = task_tgid_vnr(current);
> >> + a->sk_peercred.uid = ctx->realcred->uid;
>
> SH> I don't know how much it matters, but of course root could be
> SH> restarting a set of tasks owned by several non-root uids, and the
> SH> peercred.uid's might need to be something other than
> ctx-> realcred->uid. Or not?
>
> Oh, so you're suggesting I use ctx->ecred instead? I didn't actually
> notice the double declaration in the ckpt_ctx, but I guess that would
> be better.
No, I'm suggesting that the checkpointed application might have had
tasks owned by uids 0, 3, 55, and 1001, and a.peercred.uid might have
been 1001, right? current, ctx->realcred->uid, and ctx->ecred might
all be different uids. I think you just need to checkpoint the uid
(eventually an objref to a checkpointed user struct so we can also
catch the user namespace).
-serge
prev parent reply other threads:[~2009-08-05 13:29 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-03 20:30 C/R support of UNIX sockets Dan Smith
[not found] ` <1249331463-11887-1-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-08-03 20:30 ` [PATCH 1/5] Add an errno validation function (v2) Dan Smith
[not found] ` <1249331463-11887-2-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-08-04 19:10 ` Serge E. Hallyn
2009-08-03 20:31 ` [PATCH 2/5] Add a ckpt_read_string() " Dan Smith
[not found] ` <1249331463-11887-3-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-08-04 19:13 ` Serge E. Hallyn
[not found] ` <20090804191334.GB10275-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-08-04 19:20 ` Dan Smith
2009-08-03 20:31 ` [PATCH 4/5] Export fill_fname() as ckpt_fill_fname() Dan Smith
[not found] ` <1249331463-11887-5-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-08-04 19:24 ` Serge E. Hallyn
2009-08-03 20:31 ` [PATCH 3/5] Add common socket helpers to unify the security hooks Dan Smith
2009-08-04 19:20 ` Serge E. Hallyn
2009-08-04 19:43 ` Dan Smith
2009-08-04 19:58 ` Serge E. Hallyn
2009-08-03 20:31 ` [PATCH 5/5] c/r: Add AF_UNIX support (v7) Dan Smith
2009-08-04 19:57 ` Serge E. Hallyn
2009-08-04 20:52 ` Serge E. Hallyn
2009-08-04 21:02 ` Dan Smith
2009-08-04 21:17 ` Serge E. Hallyn
2009-08-04 22:24 ` Dan Smith
2009-08-04 22:31 ` Serge E. Hallyn
2009-08-04 22:47 ` Dan Smith
2009-08-05 13:29 ` Serge E. Hallyn [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090805132948.GA31272@us.ibm.com \
--to=serue@us.ibm.com \
--cc=adobriyan@gmail.com \
--cc=containers@lists.osdl.org \
--cc=danms@us.ibm.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.