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: Thu, 13 Jul 2023 09:08:36 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Arkadiusz Kubalewski <arkadiusz.kubalewski@...el.com>, Donald Hunter
 <donald.hunter@...il.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, pabeni@...hat.com,
 edumazet@...gle.com
Subject: Re: [PATCH net-next 2/2 v2] tools: ynl-gen: fix parse multi-attr
 enum attribute

On Thu, 13 Jul 2023 11:05:50 +0200 Arkadiusz Kubalewski wrote:
> @@ -436,7 +435,7 @@ class YnlFamily(SpecFamily):
>              decoded = attr.as_struct(members)
>              for m in members:
>                  if m.enum:
> -                    self._decode_enum(decoded, m)
> +                    decoded[m] = self._decode_enum(decoded[m], m)

Yeah, not sure this is right.

Adding Donald, dropping Chuck and LMKL (please use this CC list for v3).

Given the code before the change we can assume that m is a complex type
describing the member so decoded[m] is likely going to explode.

I think you should move the enum decoding into as_struct(), transforming
the code into similar fashion as you did for responses (changing the
@decoded value before "value[m.name] = decoded").

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ