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: <20250131082928.GA24105@kernel.org>
Date: Fri, 31 Jan 2025 08:29:28 +0000
From: Simon Horman <horms@...nel.org>
To: Mina Almasry <almasrymina@...gle.com>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-doc@...r.kernel.org, kvm@...r.kernel.org,
	virtualization@...ts.linux.dev, linux-kselftest@...r.kernel.org,
	"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>,
	Andrew Lunn <andrew+netdev@...n.ch>,
	David Ahern <dsahern@...nel.org>,
	Stefan Hajnoczi <stefanha@...hat.com>,
	Stefano Garzarella <sgarzare@...hat.com>,
	"Michael S. Tsirkin" <mst@...hat.com>,
	Jason Wang <jasowang@...hat.com>,
	Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
	Eugenio PĂ©rez <eperezma@...hat.com>,
	Shuah Khan <shuah@...nel.org>, sdf@...ichev.me,
	asml.silence@...il.com, dw@...idwei.uk,
	Jamal Hadi Salim <jhs@...atatu.com>,
	Victor Nogueira <victor@...atatu.com>,
	Pedro Tammela <pctammela@...atatu.com>
Subject: Re: [PATCH RFC net-next v2 4/6] net: devmem: TCP tx netlink api

On Thu, Jan 30, 2025 at 09:15:37PM +0000, Mina Almasry wrote:
> From: Stanislav Fomichev <sdf@...ichev.me>
> 
> Add bind-tx netlink call to attach dmabuf for TX; queue is not
> required, only ifindex and dmabuf fd for attachment.
> 
> Signed-off-by: Stanislav Fomichev <sdf@...ichev.me>
> Signed-off-by: Mina Almasry <almasrymina@...gle.com>

Hi Mina,

I noticed minor issue relating to generated code.

...

> diff --git a/Documentation/netlink/specs/netdev.yaml b/Documentation/netlink/specs/netdev.yaml
> index cbb544bd6c84..93f4333e7bc6 100644
> --- a/Documentation/netlink/specs/netdev.yaml
> +++ b/Documentation/netlink/specs/netdev.yaml

The lines preceding the hunk below are:

      name: napi-set
      doc: Set configurable NAPI instance settings.
      attribute-set: napi
      flags: [ admin-perm ]
      do:
        request:
          attributes:
            - id

> @@ -711,6 +711,18 @@ operations:
>              - defer-hard-irqs
>              - gro-flush-timeout
>              - irq-suspend-timeout
> +    -
> +      name: bind-tx
> +      doc: Bind dmabuf to netdev for TX
> +      attribute-set: dmabuf

Unlike the entry for napi-set there is no "flags: [ admin-perm ]" fpr
bind-tx...

> +      do:
> +        request:
> +          attributes:
> +            - ifindex
> +            - fd
> +        reply:
> +          attributes:
> +            - id
>  
>  kernel-family:
>    headers: [ "linux/list.h"]

...

> diff --git a/net/core/netdev-genl-gen.c b/net/core/netdev-genl-gen.c

...

> @@ -190,6 +196,13 @@ static const struct genl_split_ops netdev_nl_ops[] = {

The lines preceding this hunk are:

	{
		.cmd		= NETDEV_CMD_NAPI_SET,
		.doit		= netdev_nl_napi_set_doit,
		.policy		= netdev_napi_set_nl_policy,

>  		.maxattr	= NETDEV_A_NAPI_IRQ_SUSPEND_TIMEOUT,
>  		.flags		= GENL_ADMIN_PERM | GENL_CMD_CAP_DO,
>  	},
> +	{
> +		.cmd		= NETDEV_CMD_BIND_TX,
> +		.doit		= netdev_nl_bind_tx_doit,
> +		.policy		= netdev_bind_tx_nl_policy,
> +		.maxattr	= NETDEV_A_DMABUF_FD,
> +		.flags		= GENL_ADMIN_PERM | GENL_CMD_CAP_DO,

... so I don't think GENL_ADMIN_PERM should be here.

Flagged by running tools/net/ynl/ynl-regen.sh -f && git diff

> +	},
>  };
>  
>  static const struct genl_multicast_group netdev_nl_mcgrps[] = {

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ