netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Smith <danms@us.ibm.com>
To: "Serge E. Hallyn" <serue@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: Tue, 04 Aug 2009 14:02:11 -0700	[thread overview]
Message-ID: <878whzl2cs.fsf@caffeine.danplanet.com> (raw)
In-Reply-To: <20090804205241.GF10275@us.ibm.com> (Serge E. Hallyn's message of "Tue\, 4 Aug 2009 15\:52\:41 -0500")

SH> Does this re-use of tmp make sense?  (It only would if
SH> dev_alloc_skb() did a generic prealloc for any subsequent
SH> skb_clone() which i don't think is the case)

No, this is cruft.

SH> Also, do you need any kind of lock on the queue to make this walk
SH> safe, or do ensure below (sorry i'm slow and haven't gotten there)
SH> that all tasks with an open fd for either end of this sock are
SH> frozen?

Hmm, it seems that holding the lock while processing the queue isn't
really the way to go.  Perhaps comparing the pid of the other end of
the socket against the list in the context is best?

SH> what about UNIXCB(skb).creds and .secid?

Yep, okay.

SH> It looks like the above provides a way around needing
SH> CAP_NET_ADMIN to set SOCK_DBG in sock->sk_flags?  You can probably
SH> fix that by masking it out here, and if a flag in the checkpoint
SH> image says it was on originally, then set it below through
SH> setsockopt.

Yep, okay.

SH> Sanity checking on sk_type, sk_state, backlog etc should probably
SH> also be added.

I check type and state on restart globally and per-protocol.  Backlog
could use it though too, yeah.

Thanks!

-- 
Dan Smith
IBM Linux Technology Center
email: danms@us.ibm.com

  reply	other threads:[~2009-08-04 21:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1249331463-11887-1-git-send-email-danms@us.ibm.com>
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 [this message]
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

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=878whzl2cs.fsf@caffeine.danplanet.com \
    --to=danms@us.ibm.com \
    --cc=adobriyan@gmail.com \
    --cc=containers@lists.osdl.org \
    --cc=netdev@vger.kernel.org \
    --cc=serue@us.ibm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).