All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: Helge Deller <deller@gmx.de>,
	Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Craig Gallek <kraigatgoog@gmail.com>,
	Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
	Alexei Starovoitov <ast@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-parisc@vger.kernel.org" <linux-parisc@vger.kernel.org>,
	Willem de Bruijn <willemb@google.com>
Subject: Re: [PATCH v2] soreuseport: add compat case for setsockopt SO_ATTACH_REUSEPORT_CBPF
Date: Sat, 04 Jun 2016 00:20:01 +0200	[thread overview]
Message-ID: <57520291.7090004@iogearbox.net> (raw)
In-Reply-To: <20160603214917.GA12557@ls3530.box>

On 06/03/2016 11:49 PM, Helge Deller wrote:
> Commit 538950a1b752 ("soreuseport: setsockopt SO_ATTACH_REUSEPORT_[CE]BPF")
> missed to add the compat case for the SO_ATTACH_REUSEPORT_CBPF option.
>
> Signed-off-by: Helge Deller <deller@gmx.de>

LGTM, thanks!

Acked-by: Daniel Borkmann <daniel@iogearbox.net>

[ Cc Willem: I believe we also need something similar for PACKET_FANOUT_DATA
   when PACKET_FANOUT_CBPF is requested since we have the same issue with the
   pointer in struct sock_fprog there, too. ]

> diff --git a/net/compat.c b/net/compat.c
> index 5cfd26a..1373947 100644
> --- a/net/compat.c
> +++ b/net/compat.c
> @@ -354,7 +354,8 @@ static int do_set_sock_timeout(struct socket *sock, int level,
>   static int compat_sock_setsockopt(struct socket *sock, int level, int optname,
>   				char __user *optval, unsigned int optlen)
>   {
> -	if (optname == SO_ATTACH_FILTER)
> +	if (optname == SO_ATTACH_FILTER ||
> +	    optname == SO_ATTACH_REUSEPORT_CBPF)
>   		return do_set_attach_filter(sock, level, optname,
>   					    optval, optlen);
>   	if (optname == SO_RCVTIMEO || optname == SO_SNDTIMEO)
>

  reply	other threads:[~2016-06-03 22:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-03 21:33 [PATCH] soreuseport: add compat case for setsockopt SO_ATTACH_REUSEPORT_CBPF Craig Gallek
2016-06-03 21:40 ` Alexei Starovoitov
2016-06-03 21:49   ` [PATCH v2] " Helge Deller
2016-06-03 22:20     ` Daniel Borkmann [this message]
2016-06-05 13:16       ` Willem de Bruijn
2016-06-06 22:21     ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57520291.7090004@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=alexei.starovoitov@gmail.com \
    --cc=ast@kernel.org \
    --cc=davem@davemloft.net \
    --cc=deller@gmx.de \
    --cc=kraigatgoog@gmail.com \
    --cc=linux-parisc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sergei.shtylyov@cogentembedded.com \
    --cc=willemb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.