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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 27 Feb 2015 16:56:16 -0800
From:	Cong Wang <xiyou.wangcong@...il.com>
To:	Nicolas Dichtel <nicolas.dichtel@...nd.com>
Cc:	Eric Dumazet <eric.dumazet@...il.com>,
	Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: Re: [Patch net] netns: avoid allocating idr when dumping info

On Fri, Feb 27, 2015 at 9:48 AM, Nicolas Dichtel
<nicolas.dichtel@...nd.com> wrote:
> Le 27/02/2015 18:28, Cong Wang a écrit :
>> Then call it in do_setlink(). This is not a reason we _have to_
>> allocate it in dumping.
>
> Sure, but that just shows the 'over engineering' side ;-)
> The reason to allocate it in dumping is that you need it in dumping, not
> before ;-)

Why? This relies on rtnetlink to dump the link after creation,
which is not obvious at all. IOW, imagine if rtnetlink didn't do
the dump after new link, what would happen?

You are hiding it too deep, without a valid reason. It sounds
like you want to defer the allocation as late as possible,
but again it makes no sense: 1) we don't allocate too much,
just one id in idr; 2) this loses the code readability and hides
potential bugs.

You are over engineering, not me who wants to make it sane.
--
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