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]
Date:   Fri, 27 Mar 2020 12:28:05 -0700
From:   Kees Cook <keescook@...omium.org>
To:     Andrea Righi <andrea.righi@...onical.com>
Cc:     Shuah Khan <shuah@...nel.org>, linux-kselftest@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kselftest/runner: avoid using timeout when timeout is
 disabled

On Fri, Mar 27, 2020 at 10:36:20AM +0100, Andrea Righi wrote:
> Avoid using /usr/bin/timeout unnecessarily if timeout is set to 0
> (disabled) in the "settings" file for a specific test.

That seems to be a reasonable optimization, sure.

> NOTE: without this change (and adding timeout=0 in the corresponding
> settings file - tools/testing/selftests/seccomp/settings) the
> seccomp_bpf selftest is always failing with a timeout event during the
> syscall_restart step.

This, however, is worrisome. I think there is something else wrong here.
I will investigate why the output of seccomp_bpf is weird when running
under the runner scripts. Hmmm. The output looks corrupted...

-Kees

> Signed-off-by: Andrea Righi <andrea.righi@...onical.com>
> ---
>  tools/testing/selftests/kselftest/runner.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/kselftest/runner.sh b/tools/testing/selftests/kselftest/runner.sh
> index e84d901f8567..2cd3c8def0f6 100644
> --- a/tools/testing/selftests/kselftest/runner.sh
> +++ b/tools/testing/selftests/kselftest/runner.sh
> @@ -32,7 +32,7 @@ tap_prefix()
>  tap_timeout()
>  {
>  	# Make sure tests will time out if utility is available.
> -	if [ -x /usr/bin/timeout ] ; then
> +	if [ -x /usr/bin/timeout ] && [ $kselftest_timeout -gt 0 ] ; then
>  		/usr/bin/timeout "$kselftest_timeout" "$1"
>  	else
>  		"$1"
> -- 
> 2.25.1
> 

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ