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: <e666e773-556a-4564-b9b2-607b062bfce4@kernel.org>
Date: Wed, 18 Jun 2025 08:41:03 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Simon Horman <horms@...nel.org>
Cc: "David S. Miller" <davem@...emloft.net>,
 Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
 Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] nfc: Remove checks for nla_data returning NULL

On 17/06/2025 10:45, Simon Horman wrote:
> The implementation of nla_data is as follows:
> 
> static inline void *nla_data(const struct nlattr *nla)
> {
> 	return (char *) nla + NLA_HDRLEN;
> }
> 
> Excluding the case where nla is exactly -NLA_HDRLEN, it will not return
> NULL. And it seems misleading to assume that it can, other than in this
> corner case. So drop checks for this condition.
> 
> Flagged by Smatch.
> 
> Compile tested only.
> 
> Signed-off-by: Simon Horman <horms@...nel.org>
> ---

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ