All of lore.kernel.org
 help / color / mirror / Atom feed
From: ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org (Eric W. Biederman)
To: Cedric Le Goater <clg-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
Cc: containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org,
	den-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org,
	benjamin.thery-6ktuUTfB/bM@public.gmane.org,
	"Denis V. Lunev" <den-3ImXcnM4P+0@public.gmane.org>
Subject: Re: [patch 0/1][NETNS49] Make af_unix autobind per namespace
Date: Wed, 03 Oct 2007 08:36:53 -0600	[thread overview]
Message-ID: <m1przwe03e.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <47039510.7040001-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org> (Cedric Le Goater's message of "Wed, 03 Oct 2007 15:11:44 +0200")

Cedric Le Goater <clg-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org> writes:
> my 2 cnts,
>
> when 'restarting' a socket bound to an abstract name, we will have 
> a EADDRINUSE if we try to rebind it to an abtract name which is 
> already in use by a socket in a another namespace ? 

No.

> it seems to me that this is an identifier and like any identifier
> it should be private to the namespace, which probably means having
> unix_abstract_socket_table[] per net namespace.

Yes it is.  It is a hash table so we are filter the hash chain
and not having two copies of the table.  But effectively it's
the same thing.

All this patch was suggesting was having a per network namespace
copy of the data structure for the random number generator for
generating the name.  

The ``random number generator'' is just a 16bit counter that loops
through all 64k values seeing if a name is available and if so
using it.  Sharing our place in the loop between different namespaces
may be ineffeicient but it should work fine.

Eric

  parent reply	other threads:[~2007-10-03 14:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-02 15:18 [patch 0/1][NETNS49] Make af_unix autobind per namespace Daniel Lezcano
2007-10-02 15:18 ` [patch 1/1][NETNS49] Make af_unix autobind per network namespace Daniel Lezcano
     [not found] ` <20071002151846.827206013-WECHFHqYCmGD/CxQmPlnQ0FT0OZdM7KVQQ4Iyu8u01E@public.gmane.org>
2007-10-02 15:31   ` [patch 0/1][NETNS49] Make af_unix autobind per namespace Daniel Lezcano
2007-10-02 17:18   ` Eric W. Biederman
     [not found]     ` <m1fy0tjv04.fsf-T1Yj925okcoyDheHMi7gv2pdwda3JcWeAL8bYrjMMd8@public.gmane.org>
2007-10-02 20:51       ` Daniel Lezcano
     [not found]         ` <4702AF67.1010707-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2007-10-02 22:43           ` Eric W. Biederman
     [not found]             ` <m1myv1gmsl.fsf-T1Yj925okcoyDheHMi7gv2pdwda3JcWeAL8bYrjMMd8@public.gmane.org>
2007-10-03  8:35               ` Daniel Lezcano
2007-10-03  8:14           ` Denis V. Lunev
     [not found]             ` <47034F4F.5000901-3ImXcnM4P+0@public.gmane.org>
2007-10-03 13:11               ` Cedric Le Goater
     [not found]                 ` <47039510.7040001-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2007-10-03 14:36                   ` Eric W. Biederman [this message]
     [not found]                     ` <m1przwe03e.fsf-T1Yj925okcoyDheHMi7gv2pdwda3JcWeAL8bYrjMMd8@public.gmane.org>
2007-10-03 15:34                       ` Cedric Le Goater
2007-10-03  8:11       ` Denis V. Lunev

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=m1przwe03e.fsf@ebiederm.dsl.xmission.com \
    --to=ebiederm-as9lmozglivwk0htik3j/w@public.gmane.org \
    --cc=benjamin.thery-6ktuUTfB/bM@public.gmane.org \
    --cc=clg-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org \
    --cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
    --cc=den-3ImXcnM4P+0@public.gmane.org \
    --cc=den-GEFAQzZX7r8dnm+yROfE0A@public.gmane.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.