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: <ZTn7v05E2iirB0g2@nanopsycho>
Date: Thu, 26 Oct 2023 07:42:33 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, pabeni@...hat.com, davem@...emloft.net,
	edumazet@...gle.com
Subject: Re: [patch net-next v3] tools: ynl: introduce option to process
 unknown attributes or types

Thu, Oct 26, 2023 at 02:56:36AM CEST, kuba@...nel.org wrote:
>On Wed, 25 Oct 2023 11:57:36 +0200 Jiri Pirko wrote:
>> {'129': {'0': b'\x00\x00\x00\x00\x00\x00\x00\x00',
>>          '1': b'\x00\x00\x00\x00\x00\x00\x00\x00',
>>          '2': b'(\x00\x00\x00\x00\x00\x00\x00'},
>>  '132': b'\x00',
>>  '133': b'',
>>  '134': {'0': b''},
>
>I'm not convinced, and still prefer leaving NlAttr objects in place.

If I understand that correctly, you would like to dump the
NlAttr.__repr__() as a printable representation of the objec, correct?

It yes, this is what I wrote in the discussion of v2:

Instead of:
{'129': {'0': b'\x00\x00\x00\x00\x00\x00\x00\x00',
         '1': b'\x00\x00\x00\x00\x00\x00\x00\x00',
         '2': b'(\x00\x00\x00\x00\x00\x00\x00'},
You'd get:
{'129': {'0': [type:0 len:12] b'\x00\x00\x00\x00\x00\x00\x00\x00',
         '1': [type:1 len:12] b'\x00\x00\x00\x00\x00\x00\x00\x00',
         '2': [type:2 len:12] b'(\x00\x00\x00\x00\x00\x00\x00'},
Looks like unnecessary redundant info, I would rather stick with
"as_bin()". __repr__() is printable representation of the whole object,
we just need value here, already have that in a structured object.


What is "type" and "len" good for here?



>-- 
>pw-bot: reject

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ