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:   Thu, 23 May 2019 08:58:28 -0700
From:   John Fastabend <john.fastabend@...il.com>
To:     Jakub Sitnicki <jakub@...udflare.com>,
        John Fastabend <john.fastabend@...il.com>
Cc:     Daniel Borkmann <daniel@...earbox.net>, netdev@...r.kernel.org,
        Marek Majkowski <marek@...udflare.com>
Subject: Re: [PATCH net] sk_msg: Keep reference on socket file while psock
 lives

[...]

> 
> Thanks for taking a look at it. Setting MSG_DONTWAIT works great for
> me. No more crashes in sk_stream_wait_memory. I've tested it on top of
> current bpf-next (f49aa1de9836). Here's my:
> 
>   Tested-by: Jakub Sitnicki <jakub@...udflare.com>
> 
> The actual I've tested is below, for completeness.
> 
> BTW. I've ran into another crash which I haven't seen before while
> testing sockmap-echo, but it looks unrelated:
> 
>   https://lore.kernel.org/netdev/20190522100142.28925-1-jakub@cloudflare.com/
> 
> -Jakub
> 
> --- 8< ---
> 
> diff --git a/net/core/skbuff.c b/net/core/skbuff.c
> index e89be6282693..4a7c656b195b 100644
> --- a/net/core/skbuff.c
> +++ b/net/core/skbuff.c
> @@ -2337,6 +2337,7 @@ int skb_send_sock_locked(struct sock *sk, struct sk_buff *skb, int offset,
>                 kv.iov_base = skb->data + offset;
>                 kv.iov_len = slen;
>                 memset(&msg, 0, sizeof(msg));
> +               msg.msg_flags = MSG_DONTWAIT;
> 
>                 ret = kernel_sendmsg_locked(sk, &msg, &kv, 1, slen);
>                 if (ret <= 0)

I went ahead and submitted this feel free to add your signed-off-by.

Thanks,
John

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ