lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpVeVpcQLPz7GDuni_v5+bJikQkc2cSzrKee72eGuOecDQ@mail.gmail.com>
Date:	Wed, 25 Jun 2014 17:22:32 -0700
From:	Cong Wang <xiyou.wangcong@...il.com>
To:	"Eric W. Biederman" <ebiederm@...ssion.com>
Cc:	Linux Kernel Network Developers <netdev@...r.kernel.org>,
	"David S. Miller" <davem@...emloft.net>,
	Patrick McHardy <kaber@...sh.net>,
	stephen hemminger <stephen@...workplumber.org>,
	Cong Wang <cwang@...pensource.com>
Subject: Re: [Patch net-next] net: make neigh tables per netns

On Wed, Jun 25, 2014 at 5:04 PM, Eric W. Biederman
<ebiederm@...ssion.com> wrote:
> Cong Wang <xiyou.wangcong@...il.com> writes:
>
>> From: Cong Wang <cwang@...pensource.com>
>>
>> Different net namespaces have different devices, routes, neighbours,
>> so their neigh table should be separated as well.
>
> This justification doesn't work.  Neighbour entries are per network
> device which are already per network device.

I knew, this is why I never say I am fixing a bug. I just don't see the
point of holding all such entries in one big table. Routing tables
are already separated.

>
> The only thing I see that you can gain by this work is getting around
> global limits on neighbor table size.  Something that I think is most
> unwise.

Yes, this is one the benefits.

>
> We may want a smarter limits infrastructure as it is possible to DOS one
> interface by hitting the global neigh table limit on other interfaces.
> That problem really isn't a network namespace problem except that with
> network namespaces you typically have more interfaces and can see the
> problem more easily.
>
>> This patch makes
>> gloable arp_tbl and nd_tbl etc. be per netns.
>
>> Also, as we don't support multiple tables per family, there is no
>> point to make tables chained by linked list, they can just be
>> statically compiled. This will eliminate the global neigh_tbl_lock.
>
> There might to this lock removal, but mixing the lock removal in with
> everything else winds up with extra noise, and code that looks
> suspiciously messy.
>
> At the very least neigh_tbl_lock today protects against rmmod decnet
> and rmmod ipv6, which while unlikely can oops they kernel if they aren't
> handled carefully.  So it definitely feels inappropriate to mush these
> all together.

At module exit, we should call unregister_pernet_subsys(), where
each ->exit() will called.

>
> If your goal is to deal with the issue of the limited set of neighbour
> limits say so and let's look at that problem.
>
> If your goal is just to kill neigh_tbl_lock please take that to a
> separate patch where the pros and cons can be weighed, and people can
> focus on the issue.
>

Neither.

> As it stands this patch does too much, and seems to do nothing except
> bypass controls on global kernel memory consumption.
>

I agree it's too big, I can split it into two if you want. One for removing
neigh_tbl_lock, one for making it per netns.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ