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: <5dfd82c9-5202-4047-a596-a9afb0041634@6wind.com>
Date: Fri, 23 Feb 2024 16:09:55 +0100
From: Nicolas Dichtel <nicolas.dichtel@...nd.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
 pabeni@...hat.com, jiri@...nulli.us, sdf@...gle.com, donald.hunter@...il.com
Subject: Re: [PATCH net-next 02/15] tools: ynl: create local attribute helpers

Le 23/02/2024 à 15:46, Jakub Kicinski a écrit :
> On Fri, 23 Feb 2024 15:03:49 +0100 Nicolas Dichtel wrote:
>>> +static inline unsigned int ynl_attr_data_len(const struct nlattr *attr)
>>> +{
>>> +	return attr->nla_len - NLA_ALIGN(sizeof(struct nlattr));  
>> nit: NLA_HDRLEN ?
> 
> IIRC I did that because I kept looking at the definition of 
> NLA_HDRLEN to check if it's already ALIGNed or not :( The name of 
> the define doesn't say. Not that it matters at all given the len is
I need to check the define every time :D

> multiple of 4. If you think NLA_HDRLEN is more idiomatic I'll switch.
Yes, if you don't mind, I prefer. It better describes the code I think.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ