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]
Date:   Tue, 27 Sep 2022 14:32:25 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Vladimir Oltean <vladimir.oltean@....com>
Cc:     Vladimir Oltean <olteanv@...il.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Paolo Abeni <pabeni@...hat.com>,
        Xiaoliang Yang <xiaoliang.yang_1@....com>,
        Rui Sousa <rui.sousa@....com>,
        Claudiu Manoil <claudiu.manoil@....com>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        "UNGLinuxDriver@...rochip.com" <UNGLinuxDriver@...rochip.com>,
        Horatiu Vultur <horatiu.vultur@...rochip.com>,
        Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Michael Walle <michael@...le.cc>,
        Vinicius Costa Gomes <vinicius.gomes@...el.com>,
        Maxim Kochetkov <fido_max@...ox.ru>,
        Colin Foster <colin.foster@...advantage.com>,
        Richie Pearn <richard.pearn@....com>,
        Kurt Kanzenbach <kurt@...utronix.de>,
        Jesse Brandeburg <jesse.brandeburg@...el.com>,
        Tony Nguyen <anthony.l.nguyen@...el.com>,
        Giuseppe Cavallaro <peppe.cavallaro@...com>,
        Alexandre Torgue <alexandre.torgue@...s.st.com>,
        Jose Abreu <joabreu@...opsys.com>,
        Jamal Hadi Salim <jhs@...atatu.com>,
        Cong Wang <xiyou.wangcong@...il.com>,
        Jiri Pirko <jiri@...nulli.us>,
        Gerhard Engleder <gerhard@...leder-embedded.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 net-next 01/12] net/sched: taprio: allow user input
 of per-tc max SDU

On Tue, 27 Sep 2022 21:23:19 +0000 Vladimir Oltean wrote:
> On Tue, Sep 27, 2022 at 11:27:10AM -0700, Jakub Kicinski wrote:
> > I know, that's what I expected you'd say :(
> > You'd need a reverse parser which is a PITA to do unless you have
> > clearly specified bindings.  
> 
> I think you're underestimating the problem, it's worse than PITA. My A
> still hurts and yet I couldn't find any way in which reverse parsing the
> bad netlink attribute is in any way practical in iproute2, other than
> doing it to prove a point that it's possible.

Yup, iproute2 does not have policy tables, so it's hard.

Once you have tables like this:

https://github.com/kuba-moo/ynl/blob/main/tools/net/ynl/generated/ethtool-user.c#L22

all linking up the types, it's fairly easy to reverse parse:

https://github.com/kuba-moo/ynl/blob/main/tools/net/ynl/lib/ynl.c#L75

Admittedly I haven't added parsing of the bounds yet so it'd just say
"invalid argument .bla.something" not "argument out of range
.bla.something (is: X, range N-M)" but that's just typing.

> > I'd rather you kept the code as is than make precedent for adding both
> > string and machine readable. If we do that people will try to stay on
> > the safe side and always add both.
> >
> > The machine readable format is carries all the information you need.  
> 
> Nope, the question "What range?" still isn't answered via the machine
> readable format. Just "What integer?".

Hm, doesn't NLMSGERR_ATTR_POLICY contain the bounds?

> > It's just the user space is not clever enough to read it which is,
> > well, solvable.  
> 
> You should come work at NXP, we love people who keep a healthy dose of
> unnecessary complexity in things :)

Ha! :D

> Sometimes, "not clever enough" is just fine.

Yup, go ahead with just the strings. "We'll get there" for the machine
readable parsing, hopefully, once my YAML descriptions come...

Powered by blists - more mailing lists