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]
Date: Wed, 2 Aug 2023 20:06:46 -0600
From: David Ahern <dsahern@...nel.org>
To: thinker.li@...il.com, davem@...emloft.net, edumazet@...gle.com,
 kuba@...nel.org, netdev@...r.kernel.org, pabeni@...hat.com,
 martin.lau@...ux.dev, kernel-team@...a.com, yhs@...a.com
Cc: sinquersw@...il.com, kuifeng@...a.com
Subject: Re: [PATCH net-next v5 2/2] selftests: fib_tests: Add a test case for
 IPv6 garbage collection

On 8/1/23 6:43 PM, thinker.li@...il.com wrote:
\> @@ -747,6 +750,97 @@ fib_notify_test()
>  	cleanup &> /dev/null
>  }
>  
> +fib6_gc_test()
> +{
> +	echo
> +	echo "Fib6 garbage collection test"
> +
> +	STRACE=$(which strace)
> +	if [ -z "$STRACE" ]; then
> +	    echo "    SKIP: strace not found"
> +	    ret=$ksft_skip
> +	    return
> +	fi
> +
> +	EXPIRE=10
> +
> +	setup
> +
> +	set -e
> +
> +	# Check expiration of routes every 3 seconds (GC)
> +	$NS_EXEC sysctl -wq net.ipv6.route.gc_interval=300
> +
> +	$IP link add dummy_10 type dummy
> +	$IP link set dev dummy_10 up
> +	$IP -6 address add 2001:10::1/64 dev dummy_10
> +
> +	$NS_EXEC sysctl -wq net.ipv6.route.flush=1
> +
> +	# Temporary routes
> +	for i in $(seq 1 1000); do
> +	    # Expire route after $EXPIRE seconds
> +	    $IP -6 route add 2001:20::$i \
> +		via 2001:10::2 dev dummy_10 expires $EXPIRE
> +	done
> +	N_EXP=$($IP -6 route list |grep expires|wc -l)
> +	if [ $N_EXP -ne 1000 ]; then

race condition here ... that you can install all 1000 routes and then
run this command before any expire. 10 seconds is normally more than
enough time, but on a loaded server it might not be. And really it does
not matter. What matters is that you install routes with an expires and
they disappear when expected - and I believe the flush below should not
be needed to validate they have been removed.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ