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] [day] [month] [year] [list]
Message-ID: <c60fdfff-9792-44ce-a811-b2ccf201d3ed@6wind.com>
Date: Tue, 27 Feb 2024 16:10:44 +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, donald.hunter@...il.com, jiri@...nulli.us, sdf@...gle.com
Subject: Re: [PATCH net-next v2 02/15] tools: ynl: create local attribute
 helpers

Le 27/02/2024 à 15:56, Jakub Kicinski a écrit :
> On Tue, 27 Feb 2024 12:05:31 +0100 Nicolas Dichtel wrote:
>>> +static inline __s16 ynl_attr_get_s16(const struct nlattr *attr)
>>> +{
>>> +	__s16 tmp;
>>> +
>>> +	memcpy(&tmp, (unsigned char *)(attr + 1), sizeof(tmp));  
>> The same would work here, am I wrong?
>> return *(__s16 *)ynl_attr_data(attr);
>>
>> Same for all kind of int.
> 
> What about unaligned access?
Attributes are aligned, at least u16 and u32
For u64, it's not true anymore (:


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ