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: <8d449738-e2ab-4571-bbbb-857cf510c0ee@gmail.com>
Date: Thu, 16 Jan 2025 02:27:29 +0000
From: Pavel Begunkov <asml.silence@...il.com>
To: Jakub Kicinski <kuba@...nel.org>, David Wei <dw@...idwei.uk>
Cc: io-uring@...r.kernel.org, netdev@...r.kernel.org,
 Jens Axboe <axboe@...nel.dk>, Paolo Abeni <pabeni@...hat.com>,
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jesper Dangaard Brouer <hawk@...nel.org>, David Ahern <dsahern@...nel.org>,
 Mina Almasry <almasrymina@...gle.com>,
 Stanislav Fomichev <stfomichev@...il.com>, Joe Damato <jdamato@...tly.com>,
 Pedro Tammela <pctammela@...atatu.com>
Subject: Re: [PATCH net-next v10 18/22] io_uring/zcrx: set pp memory provider
 for an rx queue

On 1/16/25 01:12, Jakub Kicinski wrote:
> On Wed,  8 Jan 2025 14:06:39 -0800 David Wei wrote:
>> +	ASSERT_RTNL();
>> +
>> +	if (ifq_idx >= dev->num_rx_queues)
> 
> _real_ rx queues.
> 
> We don't allow configuring disabled queues today.

ok

> 
>> +		return -EINVAL;
>> +	ifq_idx = array_index_nospec(ifq_idx, dev->num_rx_queues);
>> +
>> +	rxq = __netif_get_rx_queue(ifq->dev, ifq_idx);
>> +	if (rxq->mp_params.mp_priv)
>> +		return -EEXIST;
>> +
>> +	ifq->if_rxq = ifq_idx;
>> +	rxq->mp_params.mp_ops = &io_uring_pp_zc_ops;
>> +	rxq->mp_params.mp_priv = ifq;
>> +	ret = netdev_rx_queue_restart(ifq->dev, ifq->if_rxq);
>> +	if (ret)
>> +		goto fail;
> 
> Hm. Could you move all this (and the rtnl_lock() in the caller)
> to a helper under net/ ? Or does something io_uring-y here need

fine

> to be protected by rtnl_lock()?

no, io_uring doesn't rely on it

-- 
Pavel Begunkov


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ