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: <20260131154338.4d6b36a2@kernel.org>
Date: Sat, 31 Jan 2026 15:43:38 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Daniel Borkmann <daniel@...earbox.net>
Cc: netdev@...r.kernel.org, bpf@...r.kernel.org, davem@...emloft.net,
 razor@...ckwall.org, pabeni@...hat.com, willemb@...gle.com,
 sdf@...ichev.me, john.fastabend@...il.com, martin.lau@...nel.org,
 jordan@...fe.io, maciej.fijalkowski@...el.com, magnus.karlsson@...el.com,
 dw@...idwei.uk, toke@...hat.com, yangzhenze@...edance.com,
 wangdongdong.6@...edance.com
Subject: Re: [PATCH net-next v8 03/16] net: Add lease info to queue-get
 response

On Thu, 29 Jan 2026 23:28:17 +0100 Daniel Borkmann wrote:
> Populate nested lease info to the queue-get response that returns the
> ifindex, queue id with type and optionally netns id if the device
> resides in a different netns.

> +enum netif_lease_dir {
> +	NETIF_VIRT_TO_PHYS,
> +	NETIF_PHYS_TO_VIRT,
> +};
> +
> +struct netdev_rx_queue *
> +__netif_get_rx_queue_lease(struct net_device **dev, unsigned int *rxq,
> +			   enum netif_lease_dir dir);

dev.h

>  #endif /* _LINUX_NETDEV_RX_QUEUE_H */
> diff --git a/net/core/netdev-genl.c b/net/core/netdev-genl.c
> index a0b4a9197b91..7d073894ca74 100644
> --- a/net/core/netdev-genl.c
> +++ b/net/core/netdev-genl.c
> @@ -391,8 +391,11 @@ netdev_nl_queue_fill_one(struct sk_buff *rsp, struct net_device *netdev,
>  			 u32 q_idx, u32 q_type, const struct genl_info *info)
>  {
>  	struct pp_memory_provider_params *params;
> +	struct net_device *orig_netdev = netdev;
> +	struct nlattr *nest_lease, *nest_queue;
>  	struct netdev_rx_queue *rxq;
>  	struct netdev_queue *txq;
> +	u32 lease_q_idx = q_idx;

No need to init this, no?

>  	void *hdr;
>  
>  	hdr = genlmsg_iput(rsp, info);
> @@ -410,6 +413,37 @@ netdev_nl_queue_fill_one(struct sk_buff *rsp, struct net_device *netdev,
>  		if (nla_put_napi_id(rsp, rxq->napi))
>  			goto nla_put_failure;
>  
> +		if (netif_rx_queue_lease_get_owner(&netdev, &lease_q_idx)) {

Does it work if we factored this out to a helper?

Also apparently the words lessee and lessor are legit English words.

I wonder if using those would make the code quite a bit easier to
follow when we have to refer to the lease in a specific direction.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ