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: <663d8b4e19c1b_13d894294d7@willemb.c.googlers.com.notmuch>
Date: Thu, 09 May 2024 22:49:50 -0400
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Jakub Kicinski <kuba@...nel.org>, 
 davem@...emloft.net
Cc: netdev@...r.kernel.org, 
 edumazet@...gle.com, 
 pabeni@...hat.com, 
 Jakub Kicinski <kuba@...nel.org>, 
 shuah@...nel.org, 
 linux-kselftest@...r.kernel.org
Subject: Re: [PATCH net-next 1/2] selftests: net: fix timestamp not arriving
 in cmsg_time.sh

Jakub Kicinski wrote:
> On slow machines the SND timestamp sometimes doesn't arrive before
> we quit. The test only waits as long as the packet delay, so it's
> easy for a race condition to happen.
> 
> Double the wait but do a bit of polling, once the SND timestamp
> arrives there's no point to wait any longer.
> 
> This fixes the "TXTIME abs" failures on debug kernels, like:
> 
>    Case ICMPv4  - TXTIME abs returned '', expected 'OK'
> 
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>

Reviewed-by: Willem de Bruijn <willemb@...gle.com>

> diff --git a/tools/testing/selftests/net/cmsg_sender.c b/tools/testing/selftests/net/cmsg_sender.c
> index c79e65581dc3..f25268504937 100644
> --- a/tools/testing/selftests/net/cmsg_sender.c
> +++ b/tools/testing/selftests/net/cmsg_sender.c
> @@ -333,16 +333,17 @@ static const char *cs_ts_info2str(unsigned int info)
>  	return "unknown";
>  }
>  
> -static void
> +static unsigned long
>  cs_read_cmsg(int fd, struct msghdr *msg, char *cbuf, size_t cbuf_sz)
>  {
>  	struct sock_extended_err *see;
>  	struct scm_timestamping *ts;
> +	unsigned int ts_seen = 0;

nit: mixing unsigned long and unsigned int

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ