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]
Message-Id: <35691b55-436c-4c52-b241-f0c5326227cb@app.fastmail.com>
Date: Tue, 02 Jul 2024 17:25:11 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "Mina Almasry" <almasrymina@...gle.com>, Netdev <netdev@...r.kernel.org>,
 linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
 linux-alpha@...r.kernel.org, linux-mips@...r.kernel.org,
 linux-parisc@...r.kernel.org, sparclinux@...r.kernel.org,
 linux-trace-kernel@...r.kernel.org, Linux-Arch <linux-arch@...r.kernel.org>,
 bpf@...r.kernel.org, linux-kselftest@...r.kernel.org,
 linux-media@...r.kernel.org, dri-devel@...ts.freedesktop.org
Cc: "David S . Miller" <davem@...emloft.net>,
 "Eric Dumazet" <edumazet@...gle.com>, "Jakub Kicinski" <kuba@...nel.org>,
 "Paolo Abeni" <pabeni@...hat.com>,
 "Donald Hunter" <donald.hunter@...il.com>,
 "Jonathan Corbet" <corbet@....net>,
 "Richard Henderson" <richard.henderson@...aro.org>,
 "Ivan Kokshaysky" <ink@...assic.park.msu.ru>,
 "Matt Turner" <mattst88@...il.com>,
 "Thomas Bogendoerfer" <tsbogend@...ha.franken.de>,
 "James E . J . Bottomley" <James.Bottomley@...senPartnership.com>,
 "Helge Deller" <deller@....de>, "Andreas Larsson" <andreas@...sler.com>,
 "Jesper Dangaard Brouer" <hawk@...nel.org>,
 "Ilias Apalodimas" <ilias.apalodimas@...aro.org>,
 "Steven Rostedt" <rostedt@...dmis.org>,
 "Masami Hiramatsu" <mhiramat@...nel.org>,
 "Mathieu Desnoyers" <mathieu.desnoyers@...icios.com>,
 "Alexei Starovoitov" <ast@...nel.org>,
 "Daniel Borkmann" <daniel@...earbox.net>,
 "Andrii Nakryiko" <andrii@...nel.org>,
 "Martin KaFai Lau" <martin.lau@...ux.dev>,
 "Eduard Zingerman" <eddyz87@...il.com>, "Song Liu" <song@...nel.org>,
 "Yonghong Song" <yonghong.song@...ux.dev>,
 "John Fastabend" <john.fastabend@...il.com>,
 "KP Singh" <kpsingh@...nel.org>, "Stanislav Fomichev" <sdf@...ichev.me>,
 "Hao Luo" <haoluo@...gle.com>, "Jiri Olsa" <jolsa@...nel.org>,
 "Steffen Klassert" <steffen.klassert@...unet.com>,
 "Herbert Xu" <herbert@...dor.apana.org.au>,
 "David Ahern" <dsahern@...nel.org>,
 "Willem de Bruijn" <willemdebruijn.kernel@...il.com>,
 shuah <shuah@...nel.org>, "Sumit Semwal" <sumit.semwal@...aro.org>,
 Christian König <christian.koenig@....com>,
 "Bagas Sanjaya" <bagasdotme@...il.com>,
 "Christoph Hellwig" <hch@...radead.org>,
 "Nikolay Aleksandrov" <razor@...ckwall.org>,
 "Pavel Begunkov" <asml.silence@...il.com>, "David Wei" <dw@...idwei.uk>,
 "Jason Gunthorpe" <jgg@...pe.ca>,
 "Yunsheng Lin" <linyunsheng@...wei.com>,
 "Shailend Chand" <shailend@...gle.com>,
 "Harshitha Ramamurthy" <hramamurthy@...gle.com>,
 "Shakeel Butt" <shakeel.butt@...ux.dev>,
 "Jeroen de Borst" <jeroendb@...gle.com>,
 "Praveen Kaligineedi" <pkaligineedi@...gle.com>,
 "Willem de Bruijn" <willemb@...gle.com>,
 "Kaiyuan Zhang" <kaiyuanz@...gle.com>
Subject: Re: [PATCH net-next v15 10/14] tcp: RX path for devmem TCP

On Fri, Jun 28, 2024, at 02:32, Mina Almasry wrote:
> --- a/arch/alpha/include/uapi/asm/socket.h
> +++ b/arch/alpha/include/uapi/asm/socket.h
> @@ -140,6 +140,11 @@
>  #define SO_PASSPIDFD		76
>  #define SO_PEERPIDFD		77
> 
> +#define SO_DEVMEM_LINEAR	78
> +#define SCM_DEVMEM_LINEAR	SO_DEVMEM_LINEAR
> +#define SO_DEVMEM_DMABUF	79
> +#define SCM_DEVMEM_DMABUF	SO_DEVMEM_DMABUF

Something is still wrong with the number assignment:

> --- a/arch/mips/include/uapi/asm/socket.h
> +++ b/arch/mips/include/uapi/asm/socket.h
> @@ -151,6 +151,11 @@
>  #define SO_PASSPIDFD		76
>  #define SO_PEERPIDFD		77
> 
> +#define SO_DEVMEM_LINEAR	78
> +#define SCM_DEVMEM_LINEAR	SO_DEVMEM_LINEAR
> +#define SO_DEVMEM_DMABUF	79
> +#define SCM_DEVMEM_DMABUF	SO_DEVMEM_DMABUF
> +
>  #if !defined(__KERNEL__)
> 
>  #if __BITS_PER_LONG == 64

so alpha and mips use the same numbering system as
the generic version for existing numbers

> diff --git a/arch/parisc/include/uapi/asm/socket.h 
> b/arch/parisc/include/uapi/asm/socket.h
> index be264c2b1a117..2b817efd45444 100644
> --- a/arch/parisc/include/uapi/asm/socket.h
> +++ b/arch/parisc/include/uapi/asm/socket.h
> @@ -132,6 +132,11 @@
>  #define SO_PASSPIDFD		0x404A
>  #define SO_PEERPIDFD		0x404B
> 
> +#define SO_DEVMEM_LINEAR	78
> +#define SCM_DEVMEM_LINEAR	SO_DEVMEM_LINEAR
> +#define SO_DEVMEM_DMABUF	79
> +#define SCM_DEVMEM_DMABUF	SO_DEVMEM_DMABUF

parisc uses a different number, but you start using the
generic version here. This is probably fine but needs 
a comment.

> index 8ce8a39a1e5f0..25a2f5255f523 100644
> --- a/include/uapi/asm-generic/socket.h
> +++ b/include/uapi/asm-generic/socket.h
> @@ -135,6 +135,11 @@
>  #define SO_PASSPIDFD		76
>  #define SO_PEERPIDFD		77
> 
> +#define SO_DEVMEM_LINEAR	98
> +#define SCM_DEVMEM_LINEAR	SO_DEVMEM_LINEAR
> +#define SO_DEVMEM_DMABUF	99
> +#define SCM_DEVMEM_DMABUF	SO_DEVMEM_DMABUF

These on the other hand look like a typo: did you
mean number 78 and 79 instead of 98 and 99?

Alternatively, you could continue with number 87,
which is the next unused number on sparc, and have
the same numbers on all architectures?

     Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ