linux-parisc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] soreuseport: add compat case for setsockopt SO_ATTACH_REUSEPORT_CBPF
@ 2016-06-03 21:33 Craig Gallek
  2016-06-03 21:40 ` Alexei Starovoitov
  0 siblings, 1 reply; 6+ messages in thread
From: Craig Gallek @ 2016-06-03 21:33 UTC (permalink / raw)
  To: Helge Deller
  Cc: Sergei Shtylyov, Alexei Starovoitov, David S. Miller,
	netdev@vger.kernel.org, linux-parisc@vger.kernel.org

On Fri, Jun 3, 2016 at 5:09 PM, Helge Deller <deller@gmx.de> wrote:
> Any idea for a better naming than "do_sockopt_fix_sock_fprog()" ?
Thanks for catching and fixing this.  I'd suggest simply leaving the
function name as-is.  Your fix to the condition in that function is
sufficient to address the issue.

Craig

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] soreuseport: add compat case for setsockopt SO_ATTACH_REUSEPORT_CBPF
  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
  0 siblings, 1 reply; 6+ messages in thread
From: Alexei Starovoitov @ 2016-06-03 21:40 UTC (permalink / raw)
  To: Craig Gallek
  Cc: Helge Deller, Sergei Shtylyov, Alexei Starovoitov,
	David S. Miller, netdev@vger.kernel.org,
	linux-parisc@vger.kernel.org

On Fri, Jun 03, 2016 at 05:33:09PM -0400, Craig Gallek wrote:
> On Fri, Jun 3, 2016 at 5:09 PM, Helge Deller <deller@gmx.de> wrote:
> > Any idea for a better naming than "do_sockopt_fix_sock_fprog()" ?
> Thanks for catching and fixing this.  I'd suggest simply leaving the
> function name as-is.  Your fix to the condition in that function is
> sufficient to address the issue.

+1
and thanks for the fixes!

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] soreuseport: add compat case for setsockopt SO_ATTACH_REUSEPORT_CBPF
  2016-06-03 21:40 ` Alexei Starovoitov
@ 2016-06-03 21:49   ` Helge Deller
  2016-06-03 22:20     ` Daniel Borkmann
  2016-06-06 22:21     ` David Miller
  0 siblings, 2 replies; 6+ messages in thread
From: Helge Deller @ 2016-06-03 21:49 UTC (permalink / raw)
  To: Alexei Starovoitov
  Cc: Craig Gallek, Helge Deller, Sergei Shtylyov, Alexei Starovoitov,
	David S. Miller, netdev@vger.kernel.org,
	linux-parisc@vger.kernel.org

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>

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)

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] soreuseport: add compat case for setsockopt SO_ATTACH_REUSEPORT_CBPF
  2016-06-03 21:49   ` [PATCH v2] " Helge Deller
@ 2016-06-03 22:20     ` Daniel Borkmann
  2016-06-05 13:16       ` Willem de Bruijn
  2016-06-06 22:21     ` David Miller
  1 sibling, 1 reply; 6+ messages in thread
From: Daniel Borkmann @ 2016-06-03 22:20 UTC (permalink / raw)
  To: Helge Deller, Alexei Starovoitov
  Cc: Craig Gallek, Sergei Shtylyov, Alexei Starovoitov,
	David S. Miller, netdev@vger.kernel.org,
	linux-parisc@vger.kernel.org, Willem de Bruijn

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)
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] soreuseport: add compat case for setsockopt SO_ATTACH_REUSEPORT_CBPF
  2016-06-03 22:20     ` Daniel Borkmann
@ 2016-06-05 13:16       ` Willem de Bruijn
  0 siblings, 0 replies; 6+ messages in thread
From: Willem de Bruijn @ 2016-06-05 13:16 UTC (permalink / raw)
  To: Daniel Borkmann
  Cc: Helge Deller, Alexei Starovoitov, Craig Gallek, Sergei Shtylyov,
	Alexei Starovoitov, David S. Miller, netdev@vger.kernel.org,
	linux-parisc@vger.kernel.org, Willem de Bruijn

> 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. ]

Indeed. I'll send a patch in a few days (am traveling). Thanks for the
heads-up, Daniel.

(apologies if you also received an html version of this reply)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] soreuseport: add compat case for setsockopt SO_ATTACH_REUSEPORT_CBPF
  2016-06-03 21:49   ` [PATCH v2] " Helge Deller
  2016-06-03 22:20     ` Daniel Borkmann
@ 2016-06-06 22:21     ` David Miller
  1 sibling, 0 replies; 6+ messages in thread
From: David Miller @ 2016-06-06 22:21 UTC (permalink / raw)
  To: deller
  Cc: alexei.starovoitov, kraigatgoog, sergei.shtylyov, ast, netdev,
	linux-parisc

From: Helge Deller <deller@gmx.de>
Date: Fri, 3 Jun 2016 23:49:17 +0200

> 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>

Applied.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-06-06 22:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2016-06-05 13:16       ` Willem de Bruijn
2016-06-06 22:21     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).