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] [day] [month] [year] [list]
Message-ID: <1c391e24-15d1-9be4-c32f-4677912359f9@linuxfoundation.org>
Date:   Fri, 4 Jun 2021 15:34:01 -0600
From:   Shuah Khan <skhan@...uxfoundation.org>
To:     Kees Cook <keescook@...omium.org>, Shuah Khan <shuah@...nel.org>
Cc:     Dan Carpenter <dan.carpenter@...cle.com>,
        linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
        Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH] selftests/tls: Add {} to avoid static checker warning

On 5/26/21 9:27 PM, Kees Cook wrote:
> This silences a static checker warning due to the unusual macro
> construction of EXPECT_*() by adding explicit {}s around the enclosing
> while loop.
> 
> Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
> Fixes: 7f657d5bf507 ("selftests: tls: add selftests for TLS sockets")
> Signed-off-by: Kees Cook <keescook@...omium.org>
> ---
>   tools/testing/selftests/net/tls.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/net/tls.c b/tools/testing/selftests/net/tls.c
> index 426d07875a48..7119f8eb823b 100644
> --- a/tools/testing/selftests/net/tls.c
> +++ b/tools/testing/selftests/net/tls.c
> @@ -418,8 +418,9 @@ TEST_F(tls, sendmsg_large)
>   		EXPECT_EQ(sendmsg(self->cfd, &msg, 0), send_len);
>   	}
>   
> -	while (recvs++ < sends)
> +	while (recvs++ < sends) {
>   		EXPECT_NE(recv(self->fd, mem, send_len, 0), -1);
> +	}
>   
>   	free(mem);
>   }
> 

Will pick this up for 5.14

thanks,
-- Shuah

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ