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, 28 Dec 2023 09:46:03 +0100
From: Helge Deller <deller@....de>
To: Mina Almasry <almasrymina@...gle.com>, netdev@...r.kernel.org,
 linux-kernel@...r.kernel.org, linux-parisc@...r.kernel.org
Subject: Re: [RFC PATCH net-next v5 12/14] net: add SO_DEVMEM_DONTNEED
 setsockopt to release RX frags

Hi Mina,

On 12/18/23 03:40, Mina Almasry wrote:
> Add an interface for the user to notify the kernel that it is done
> reading the devmem dmabuf frags returned as cmsg. The kernel will
> drop the reference on the frags to make them available for re-use.
>
> Signed-off-by: Willem de Bruijn <willemb@...gle.com>
> Signed-off-by: Kaiyuan Zhang <kaiyuanz@...gle.com>
> Signed-off-by: Mina Almasry <almasrymina@...gle.com>
>
> ---
>
> Changes in v1:
> - devmemtoken -> dmabuf_token (David).
> - Use napi_pp_put_page() for refcounting (Yunsheng).
> - Fix build error with missing socket options on other asms.
>
> ---
>   arch/alpha/include/uapi/asm/socket.h  |  8 ++++-
>   arch/mips/include/uapi/asm/socket.h   |  6 ++++
>   arch/parisc/include/uapi/asm/socket.h |  6 ++++
>   arch/sparc/include/uapi/asm/socket.h  |  6 ++++
>   include/uapi/asm-generic/socket.h     |  1 +
>   include/uapi/linux/uio.h              |  4 +++
>   net/core/sock.c                       | 45 +++++++++++++++++++++++++++
>   7 files changed, 75 insertions(+), 1 deletion(-)
>
...
> diff --git a/arch/parisc/include/uapi/asm/socket.h b/arch/parisc/include/uapi/asm/socket.h
> index be264c2b1a11..6b8674399363 100644
> --- a/arch/parisc/include/uapi/asm/socket.h
> +++ b/arch/parisc/include/uapi/asm/socket.h
> @@ -132,6 +132,12 @@
>   #define SO_PASSPIDFD		0x404A
>   #define SO_PEERPIDFD		0x404B
>
> +#define SO_DEVMEM_DONTNEED	0x404C
> +#define SO_DEVMEM_LINEAR	0x404D
> +#define SCM_DEVMEM_LINEAR	SO_DEVMEM_LINEAR
> +#define SO_DEVMEM_DMABUF	0x404E
> +#define SCM_DEVMEM_DMABUF	SO_DEVMEM_DMABUF


Could you please change this ^^ for parisc to use the same constants as
the generic version below (97-99).
Although 0x404c is the logical successor, I'd prefer to be in sync
with other generic code if possible...

Thanks!
Helge

...

> diff --git a/include/uapi/asm-generic/socket.h b/include/uapi/asm-generic/socket.h
> index 25a2f5255f52..1acb77780f10 100644
> --- a/include/uapi/asm-generic/socket.h
> +++ b/include/uapi/asm-generic/socket.h
> @@ -135,6 +135,7 @@
>   #define SO_PASSPIDFD		76
>   #define SO_PEERPIDFD		77
>
> +#define SO_DEVMEM_DONTNEED	97
>   #define SO_DEVMEM_LINEAR	98
>   #define SCM_DEVMEM_LINEAR	SO_DEVMEM_LINEAR
>   #define SO_DEVMEM_DMABUF	99


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ