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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240328090220.458c98c2@kernel.org>
Date: Thu, 28 Mar 2024 09:02:20 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Hangbin Liu <liuhangbin@...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 <donald.hunter@...il.com>, Jiri Pirko <jiri@...nulli.us>, Jacob
 Keller <jacob.e.keller@...el.com>, Stanislav Fomichev <sdf@...gle.com>
Subject: Re: [PATCH net-next 1/2] ynl: rename array-nest to indexed-array

On Thu, 28 Mar 2024 15:50:35 +0800 Hangbin Liu wrote:
> I agree we need raise exception when only support nest sub-type. But
> what about after adding other sub-types in patch 2/2. e.g.
> 
> 	if attr_spec["sub-type"] == 'nest':
> 		decoded = self._decode_array_nest(attr, attr_spec)
> 	else:
> 		decoded = self._decode_index_array(attr, attr_spec)
> 
> Should we remove the exception in patch 2?

Looking a bit closer you should probably have:

-            elif attr_spec["type"] == 'array-nest':
-                decoded = self._decode_array_nest(attr, attr_spec)
+            elif attr_spec["type"] == 'indexed-array':
+                decoded = self._decode_array_attr(attr, attr_spec)
             elif attr_spec["type"] == 'bitfield32':

and do the sub-type handling inside (now renamed) _decode_array_attr()
Throw the exception there appropriately.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ