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: Tue, 6 Jun 2023 13:32:51 +0200
From: Jesper Dangaard Brouer <jbrouer@...hat.com>
To: Daniel Borkmann <borkmann@...earbox.net>,
 Alexei Starovoitov <ast@...nel.org>,
 Andrii Nakryiko <andrii.nakryiko@...il.com>, bpf@...r.kernel.org
Cc: brouer@...hat.com, netdev@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH bpf-next V1] selftests/bpf: Fix check_mtu using wrong
 variable type



On 06/06/2023 13.30, Jesper Dangaard Brouer wrote:
> Dan Carpenter found via Smatch static checker, that unsigned
> 'mtu_lo' is never less than zero.
> 
> Variable mtu_lo should have been an 'int', because read_mtu_device_lo()
> uses minus as error indications.
> 
> Reported-by: Dan Carpenter <dan.carpenter@...aro.org>
> Signed-off-by: Jesper Dangaard Brouer <brouer@...hat.com>
> ---
>   tools/testing/selftests/bpf/prog_tests/check_mtu.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Providing the fixes like that I forgot.

Fixes: b62eba563229 ("selftests/bpf: Tests using bpf_check_mtu BPF-helper")

> diff --git a/tools/testing/selftests/bpf/prog_tests/check_mtu.c b/tools/testing/selftests/bpf/prog_tests/check_mtu.c
> index 5338d2ea0460..2a9a30650350 100644
> --- a/tools/testing/selftests/bpf/prog_tests/check_mtu.c
> +++ b/tools/testing/selftests/bpf/prog_tests/check_mtu.c
> @@ -183,7 +183,7 @@ static void test_check_mtu_tc(__u32 mtu, __u32 ifindex)
>   
>   void serial_test_check_mtu(void)
>   {
> -	__u32 mtu_lo;
> +	int mtu_lo;
>   
>   	if (test__start_subtest("bpf_check_mtu XDP-attach"))
>   		test_check_mtu_xdp_attach();
> 
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ