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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f7840b22-38b5-4252-9663-4aefb993b211@redhat.com>
Date: Sun, 28 Dec 2025 16:20:44 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: I Viswanath <viswanathiyyappan@...il.com>, kuba@...nel.org,
 horms@...nel.org, andrew+netdev@...n.ch, edumazet@...gle.com,
 xuanzhuo@...ux.alibaba.com, mst@...hat.com, jasowang@...hat.com,
 eperezma@...hat.com
Cc: netdev@...r.kernel.org, virtualization@...ts.linux.dev
Subject: Re: [PATCH net-next v6 0/2] net: Split ndo_set_rx_mode into snapshot
 and deferred write

On 12/27/25 6:42 PM, I Viswanath wrote:
> This is an implementation of the idea provided by Jakub here
> 
> https://lore.kernel.org/netdev/20250923163727.5e97abdb@kernel.org/
> 
> ndo_set_rx_mode is problematic because it cannot sleep. 
> 
> To address this, this series proposes dividing the concept of setting
> rx_mode into 2 stages: snapshot and deferred I/O. To achieve this, we
> reinterpret set_rx_mode and add create a new ndo write_rx_mode as
> explained below:
> 
> The new set_rx_mode will be responsible for customizing the rx_mode
> snapshot which will be used by write_rx_mode to update the hardware
> 
> In brief, the new flow looks something like:
> 
> prepare_rx_mode():
>     ndo_set_rx_mode();
>     prepare_snapshot();
> 
> write_rx_mode():
>     use_ready_snapshot();
>     ndo_write_rx_mode();
> 
> write_rx_mode() is called from a work item and doesn't hold the 
> netif_addr_lock lock during ndo_write_rx_mode() making it sleepable
> in that section.
> 
> This model should work correctly if the following conditions hold:
> 
> 1. write_rx_mode should use the rx_mode set by the most recent
>     call to make_snapshot_ready before its execution.
> 
> 2. If a make_snapshot_ready call happens during execution of write_rx_mode,
>     write_rx_mode should be rescheduled.
> 
> 3. All calls to modify rx_mode should pass through the prepare_rx_mode +
> 	schedule write_rx_mode execution flow. netif_rx_mode_schedule_work 
>     has been implemented in core for this purpose.
> 
> 1 and 2 are implemented in core
> 
> Drivers need to ensure 3 using netif_rx_mode_schedule_work
> 
> To use this model, a driver needs to implement the
> ndo_write_rx_mode callback, change the set_rx_mode callback
> appropriately and replace all calls to modify rx mode with
> netif_rx_mode_schedule_work
> 
> Signed-off-by: I Viswanath <viswanathiyyappan@...il.com>

## Form letter - net-next-closed

The net-next tree is closed for new drivers, features, code refactoring
and optimizations due to the merge window and the winter break. We are
currently accepting bug fixes only.

Please repost when net-next reopens after Jan 2nd.

RFC patches sent for review only are obviously welcome at any time.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ