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  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, 6 May 2020 12:27:22 -0400
From:   Soheil Hassas Yeganeh <soheil@...gle.com>
To:     Eric Dumazet <edumazet@...gle.com>
Cc:     "David S . Miller" <davem@...emloft.net>,
        netdev <netdev@...r.kernel.org>,
        Eric Dumazet <eric.dumazet@...il.com>,
        Arjun Roy <arjunroy@...gle.com>
Subject: Re: [PATCH net] selftests: net: tcp_mmap: fix SO_RCVLOWAT setting

On Wed, May 6, 2020 at 12:21 PM Eric Dumazet <edumazet@...gle.com> wrote:
>
> Since chunk_size is no longer an integer, we can not
> use it directly as an argument of setsockopt().
>
> This patch should fix tcp_mmap for Big Endian kernels.
>
> Fixes: 597b01edafac ("selftests: net: avoid ptl lock contention in tcp_mmap")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Cc: Soheil Hassas Yeganeh <soheil@...gle.com>
> Cc: Arjun Roy <arjunroy@...gle.com>

Acked-by: Soheil Hassas Yeganeh <soheil@...gle.com>

> ---
>  tools/testing/selftests/net/tcp_mmap.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/net/tcp_mmap.c b/tools/testing/selftests/net/tcp_mmap.c
> index 62171fd638c817dabe2d988f3cfae74522112584..4555f88252bafd31d6c225590316f03b08d3b132 100644
> --- a/tools/testing/selftests/net/tcp_mmap.c
> +++ b/tools/testing/selftests/net/tcp_mmap.c
> @@ -282,12 +282,14 @@ static void setup_sockaddr(int domain, const char *str_addr,
>  static void do_accept(int fdlisten)
>  {
>         pthread_attr_t attr;
> +       int rcvlowat;
>
>         pthread_attr_init(&attr);
>         pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
>
> +       rcvlowat = chunk_size;
>         if (setsockopt(fdlisten, SOL_SOCKET, SO_RCVLOWAT,
> -                      &chunk_size, sizeof(chunk_size)) == -1) {
> +                      &rcvlowat, sizeof(rcvlowat)) == -1) {
>                 perror("setsockopt SO_RCVLOWAT");
>         }
>
> --
> 2.26.2.526.g744177e7f7-goog
>

Powered by blists - more mailing lists