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:   Wed, 22 Mar 2023 11:27:01 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Donald Hunter <donald.hunter@...il.com>
Cc:     netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Paolo Abeni <pabeni@...hat.com>, donald.hunter@...hat.com
Subject: Re: [PATCH net-next v2 3/6] tools: ynl: Add array-nest attr
 decoding to ynl

On Wed, 22 Mar 2023 11:27:25 +0000 Donald Hunter wrote:
> > So in terms of C this treats the payload of the attr as a packed array?
> > That's not what array-nest is, array-nest wraps every entry in another
> > nlattr:
> > https://docs.kernel.org/next/userspace-api/netlink/genetlink-legacy.html#array-nest
> >
> > It's not a C array dumped into an attribute.
> >
> > IIRC I was intending to use 'binary' for packed arrays. Still use
> > sub-type to carry the type, but main type should be 'binary'.
> >
> > If that sounds reasonable could you document or remind me to document
> > this as the expected behavior? Sub-type appears completely undocumented
> > now :S  
> 
> That sounds reasonable, yes. I will also rename the method to
> 'as_c_array'. I think it should just be restricted to scalar subtypes,
> i.e. u16, u32, etc. Do you agree?

We can limit it to scalars for now. There are some arrays of structs
(from memory TC GRED had VCs defined as array of structs?) but that
should hopefully be rare and can be added later.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ