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]
Date:   Sat, 16 Oct 2021 00:50:08 +0000
From:   patchwork-bot+netdevbpf@...nel.org
To:     Stefano Garzarella <sgarzare@...hat.com>
Cc:     netdev@...r.kernel.org, kuba@...nel.org,
        virtualization@...ts.linux-foundation.org, davem@...emloft.net,
        marcandre.lureau@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] vsock_diag_test: remove free_sock_stat() call in
 test_no_sockets

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@...nel.org>:

On Thu, 14 Oct 2021 17:20:45 +0200 you wrote:
> In `test_no_sockets` we don't expect any sockets, indeed
> check_no_sockets() prints an error and exits if `sockets` list is
> not empty, so free_sock_stat() call is unnecessary since it would
> only be called when the `sockets` list is empty.
> 
> This was discovered by a strange warning printed by gcc v11.2.1:
>   In file included from ../../include/linux/list.h:7,
>                    from vsock_diag_test.c:18:
>   vsock_diag_test.c: In function ‘test_no_sockets’:
>   ../../include/linux/kernel.h:35:45: error: array subscript ‘struct vsock_stat[0]’ is partly outside array bound
>   s of ‘struct list_head[1]’ [-Werror=array-bounds]
>      35 |         const typeof(((type *)0)->member) * __mptr = (ptr);     \
>         |                                             ^~~~~~
>   ../../include/linux/list.h:352:9: note: in expansion of macro ‘container_of’
>     352 |         container_of(ptr, type, member)
>         |         ^~~~~~~~~~~~
>   ../../include/linux/list.h:393:9: note: in expansion of macro ‘list_entry’
>     393 |         list_entry((pos)->member.next, typeof(*(pos)), member)
>         |         ^~~~~~~~~~
>   ../../include/linux/list.h:522:21: note: in expansion of macro ‘list_next_entry’
>     522 |                 n = list_next_entry(pos, member);                       \
>         |                     ^~~~~~~~~~~~~~~
>   vsock_diag_test.c:325:9: note: in expansion of macro ‘list_for_each_entry_safe’
>     325 |         list_for_each_entry_safe(st, next, sockets, list) {
>         |         ^~~~~~~~~~~~~~~~~~~~~~~~
>   In file included from vsock_diag_test.c:18:
>   vsock_diag_test.c:333:19: note: while referencing ‘sockets’
>     333 |         LIST_HEAD(sockets);
>         |                   ^~~~~~~
>   ../../include/linux/list.h:23:26: note: in definition of macro ‘LIST_HEAD’
>      23 |         struct list_head name = LIST_HEAD_INIT(name)
> 
> [...]

Here is the summary with links:
  - [net] vsock_diag_test: remove free_sock_stat() call in test_no_sockets
    https://git.kernel.org/netdev/net/c/ba95a6225b02

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ