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: <989659fd-c090-40c7-9966-eff8a424f94d@6wind.com>
Date: Fri, 20 Oct 2023 09:44:58 +0200
From: Nicolas Dichtel <nicolas.dichtel@...nd.com>
To: Jakub Kicinski <kuba@...nel.org>, davem@...emloft.net
Cc: netdev@...r.kernel.org, edumazet@...gle.com, pabeni@...hat.com
Subject: Re: [PATCH net-next 3/3] netlink: specs: add support for auto-sized
 scalars

Le 18/10/2023 à 23:39, Jakub Kicinski a écrit :
> Support uint / sint types in specs and YNL.
> 
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
I'm not a ynl expert, but FWIW:
Acked-by: Nicolas Dichtel <nicolas.dichtel@...nd.com>

[snip]


> +#ifndef MNL_HAS_AUTO_SCALARS
Is there a libmnl patch in flight?

> +static inline uint64_t mnl_attr_get_uint(const struct nlattr *attr)
> +{
> +	if (mnl_attr_get_len(attr) == 4)
> +		return mnl_attr_get_u32(attr);
> +	return mnl_attr_get_u64(attr);
> +}
> +
> +static inline void
> +mnl_attr_put_uint(struct nlmsghdr *nlh, uint16_t type, uint64_t data)
> +{
> +	if ((uint32_t)data == (uint64_t)data)
> +		return mnl_attr_put_u32(nlh, type, data);
> +	return mnl_attr_put_u64(nlh, type, data);
> +}
> +#endif

Powered by blists - more mailing lists