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: <aQJFxrzPh-87QU5K@horms.kernel.org>
Date: Wed, 29 Oct 2025 16:50:14 +0000
From: Simon Horman <horms@...nel.org>
To: Ankit Khushwaha <ankitkhushwaha.linux@...il.com>
Cc: Pablo Neira Ayuso <pablo@...filter.org>,
	Jozsef Kadlecsik <kadlec@...filter.org>,
	Florian Westphal <fw@...len.de>, Phil Sutter <phil@....cc>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Shuah Khan <shuah@...nel.org>, netfilter-devel@...r.kernel.org,
	coreteam@...filter.org, netdev@...r.kernel.org,
	linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org,
	Muhammad Usama Anjum <usama.anjum@...labora.com>
Subject: Re: [PATCH v2] selftest: net: fix socklen_t type mismatch in
 sctp_collision test

On Tue, Oct 28, 2025 at 10:59:47PM +0530, Ankit Khushwaha wrote:
> Socket APIs like recvfrom(), accept(), and getsockname() expect socklen_t*
> arg, but tests were using int variables. This causes -Wpointer-sign 
> warnings on platforms where socklen_t is unsigned.
> 
> Change the variable type from int to socklen_t to resolve the warning and
> ensure type safety across platforms.
> 
> warning fixed:
> 
> sctp_collision.c:62:70: warning: passing 'int *' to parameter of 
> type 'socklen_t *' (aka 'unsigned int *') converts between pointers to 
> integer types with different sign [-Wpointer-sign]
>    62 |                 ret = recvfrom(sd, buf, sizeof(buf), 
> 									0, (struct sockaddr *)&daddr, &len);
>       |                                                           ^~~~
> /usr/include/sys/socket.h:165:27: note: passing argument to 
> parameter '__addr_len' here
>   165 |                          socklen_t *__restrict __addr_len);
>       |                                                ^
> 
> Reviewed-by: Muhammad Usama Anjum <usama.anjum@...labora.com>
> Signed-off-by: Ankit Khushwaha <ankitkhushwaha.linux@...il.com>

Thanks for the update.

Reviewed-by: Simon Horman <horms@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ