From: Cedric Le Goater <clg-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
To: "Eric W. Biederman" <ebiederm-aS9lmoZGLiVWk0Htik3J/w@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 17:34:10 +0200 [thread overview]
Message-ID: <4703B672.7080502@fr.ibm.com> (raw)
In-Reply-To: <m1przwe03e.fsf-T1Yj925okcoyDheHMi7gv2pdwda3JcWeAL8bYrjMMd8@public.gmane.org>
Eric W. Biederman wrote:
> 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.
ok. i just went over your AF_UNIX patch and saw that 'struct net' was
being checked for abstract sockets.
C.
>> 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
next prev parent reply other threads:[~2007-10-03 15:34 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
[not found] ` <m1przwe03e.fsf-T1Yj925okcoyDheHMi7gv2pdwda3JcWeAL8bYrjMMd8@public.gmane.org>
2007-10-03 15:34 ` Cedric Le Goater [this message]
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=4703B672.7080502@fr.ibm.com \
--to=clg-nmtc/0zbporqt0dzr+alfa@public.gmane.org \
--cc=benjamin.thery-6ktuUTfB/bM@public.gmane.org \
--cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
--cc=den-3ImXcnM4P+0@public.gmane.org \
--cc=den-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org \
--cc=ebiederm-aS9lmoZGLiVWk0Htik3J/w@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox