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: <20240227065614.57946760@kernel.org>
Date: Tue, 27 Feb 2024 06:56:14 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Nicolas Dichtel <nicolas.dichtel@...nd.com>
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

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?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ