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:   Mon, 27 Jul 2020 19:16:36 -0700
From:   Jonathan Lemon <jonathan.lemon@...il.com>
To:     netdev@...r.kernel.org
Cc:     kernel-team@...com
Subject: Re: [RFC PATCH v2 14/21] net/tcp: add netgpu ioctl setting up zero
 copy RX queues

On Mon, Jul 27, 2020 at 03:44:37PM -0700, Jonathan Lemon wrote:
> From: Jonathan Lemon <bsd@...com>
> 
> Netgpu delivers iovecs to userspace for incoming data, but the
> destination queue must be attached to the socket.  Do this via
> and ioctl call on the socket itself.
> 
> Signed-off-by: Jonathan Lemon <jonathan.lemon@...il.com>
> ---
>  net/ipv4/tcp.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
> index 27de9380ed14..261c28ccc8f6 100644
> --- a/net/ipv4/tcp.c
> +++ b/net/ipv4/tcp.c
> @@ -279,6 +279,7 @@
>  #include <linux/uaccess.h>
>  #include <asm/ioctls.h>
>  #include <net/busy_poll.h>
> +#include <net/netgpu.h>
>  
>  struct percpu_counter tcp_orphan_count;
>  EXPORT_SYMBOL_GPL(tcp_orphan_count);
> @@ -636,6 +637,10 @@ int tcp_ioctl(struct sock *sk, int cmd, unsigned long arg)
>  			answ = READ_ONCE(tp->write_seq) -
>  			       READ_ONCE(tp->snd_nxt);
>  		break;
> +#if IS_ENABLED(CONFIG_NETGPU)
> +	case NETGPU_SOCK_IOCTL_ATTACH_QUEUES:	/* SIOCPROTOPRIVATE */
> +		return netgpu_attach_socket(sk, (void __user *)arg);
> +#endif
>  	default:
>  		return -ENOIOCTLCMD;
>  	}

Actually, this is just ugly, so I'm going to rip it out and have it done
the other way around: (ctx -> sk) instead of (sk -> ctx), so ignore this.
-- 
Jonathan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ