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] [day] [month] [year] [list]
Message-ID: <53765A2D.8050205@redhat.com>
Date:	Fri, 16 May 2014 14:34:21 -0400
From:	Vlad Yasevich <vyasevic@...hat.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
CC:	netdev@...r.kernel.org, dingtianhong@...wei.com, kaber@...sh.net,
	vfalico@...il.com, jiri@...nulli.us
Subject: Re: [PATCH v2 1/4] net: Find the nesting level of a given device
 by type.

On 05/16/2014 01:32 PM, Eric Dumazet wrote:
> On Fri, 2014-05-16 at 13:18 -0400, Vlad Yasevich wrote:
>> Multiple devices in the kernel can be stacked/nested and they
>> need to know their nesting level for the purposes of lockdep.
>> This patch provides a generic function that determines a nesting
>> level of a particular device by its type (ex: vlan, macvlan, etc).
>> We only care about nesting of the same type of devices.
>>
>> For example:
>>   eth0 <- vlan0.10 <- macvlan0 <- vlan1.20
>>
>> The nesting level of vlan1.20 would be 1, since there is another vlan
>> in the stack under it.
>>
>> Signed-off-by: Vlad Yasevich <vyasevic@...hat.com>
>> ---
>>  include/linux/netdevice.h | 10 ++++++++++
>>  net/core/dev.c            | 48 +++++++++++++++++++++++++++++++++++++++++++++++
>>  2 files changed, 58 insertions(+)
> 
> Nice, but if LOCKDEP is not used, do we really want to have
> dev_get_nest_level() being something else than a constant ?
> 
> 

Doesn't seem to hurt.  As it stands right now, vlan code will
keep calculating its own every time it needs to take a lock
and it will be other then 1 when you have a stack of them.

-vlad

--
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