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: <4fbd4eed-9b39-4432-9ab2-96dee3bbf070@davidwei.uk>
Date: Tue, 28 Oct 2025 17:38:06 -0700
From: David Wei <dw@...idwei.uk>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Daniel Borkmann <daniel@...earbox.net>, Paolo Abeni <pabeni@...hat.com>,
 netdev@...r.kernel.org, bpf@...r.kernel.org, davem@...emloft.net,
 razor@...ckwall.org, 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, toke@...hat.com,
 yangzhenze@...edance.com, wangdongdong.6@...edance.com
Subject: Re: [PATCH net-next v3 02/15] net: Implement
 netdev_nl_bind_queue_doit

On 2025-10-28 16:44, Jakub Kicinski wrote:
> On Tue, 28 Oct 2025 14:59:05 -0700 David Wei wrote:
>> On 2025-10-23 19:08, Jakub Kicinski wrote:
>>> On Thu, 23 Oct 2025 14:48:15 +0200 Daniel Borkmann wrote:
>>>> It is needed given we need to always ensure lock ordering for the two devices,
>>>> that is, the order is always from the virtual to the physical device.
>>>
>>> You do seem to be taking the lock before you check if the device was
>>> the type you expected tho.
>>
>> I believe this is okay. Let's say we have two netdevs, A that is real
>> and B that is virtual.
> 
> Now imagine they are both virtual.

:facepalm: Yes, you're right, I hadn't considered this case. I'll check
if it's safe to access netdev->dev without holding the instance lock,
and if not, go back to locking both netdevs in a deterministic order.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ