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]
Message-ID: <39e879f59ad3b219901839d1511fc96886bf94fb.camel@sipsolutions.net>
Date:   Tue, 01 Oct 2019 09:11:10 +0200
From:   Johannes Berg <johannes@...solutions.net>
To:     Taehee Yoo <ap420073@...il.com>
Cc:     David Miller <davem@...emloft.net>,
        Netdev <netdev@...r.kernel.org>, linux-wireless@...r.kernel.org,
        Jakub Kicinski <jakub.kicinski@...ronome.com>,
        j.vosburgh@...il.com, vfalico@...il.com,
        Andy Gospodarek <andy@...yhouse.net>,
        Jiří Pírko <jiri@...nulli.us>,
        sd@...asysnail.net, Roopa Prabhu <roopa@...ulusnetworks.com>,
        saeedm@...lanox.com, manishc@...vell.com, rahulv@...vell.com,
        kys@...rosoft.com, haiyangz@...rosoft.com,
        Stephen Hemminger <stephen@...workplumber.org>,
        sashal@...nel.org, hare@...e.de, varun@...lsio.com,
        ubraun@...ux.ibm.com, kgraul@...ux.ibm.com,
        Jay Vosburgh <jay.vosburgh@...onical.com>,
        Cody Schuffelen <schuffelen@...gle.com>, bjorn@...k.no
Subject: Re: [PATCH net v4 01/12] net: core: limit nested device depth

Hi,

Sorry for the delay.

> These functions are used as a callback function of
> netdev_walk_all_{upper/lower}_dev(). So these return types are needed.

Ah yes, I missed that, sorry.

> Without storing level storing, a walking graph routine is needed only
> once. The routine would work as a nesting depth validator.
> So that the detach routine doesn't need to walk the graph.
> Whereas, in this patch, both attach and detach routine need to
> walk graph. So, storing nesting variable way is slower than without
> storing nesting variable way because of the detach routine's updating
> upper and lower level routine.

Right, that's what I thought.

> But I'm sure that storing nesting variables is useful because other
> modules already using nesting level values.
> Please look at vlan_get_encap_level() and usecases.

Indeed, I noticed that later.

> If we don't provide nesting level variables, they should calculate
> every time when they need it and this way is easier way to get a
> nesting level. There are use-cases of lower_level variable
> in the 11th patch.

Yes, makes sense, agree. One could argue that you only ever need the
"lower_level" stored, not the "upper_level", but I guess that doesn't
really make a difference.

Placing these in a better position in the struct might make sense - a
cursory look suggested that they weren't filling any of the many holes
there, did you pay attention to that or was the placement more or less
random?

johannes

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ