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: <20250213110452.5684bc39@kernel.org>
Date: Thu, 13 Feb 2025 11:04:52 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Breno Leitao <leitao@...ian.org>
Cc: Frederic Weisbecker <frederic@...nel.org>, LKML
 <linux-kernel@...r.kernel.org>, Peter Zijlstra <peterz@...radead.org>, Ingo
 Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>, Boqun Feng
 <boqun.feng@...il.com>, Waiman Long <longman@...hat.com>, "David S. Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni
 <pabeni@...hat.com>, Simon Horman <horms@...nel.org>, Hayes Wang
 <hayeswang@...ltek.com>, linux-usb@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH 1/2] net: Assert proper context while calling
 napi_schedule()

On Thu, 13 Feb 2025 10:14:02 -0800 Breno Leitao wrote:
> > The problem is a bit nasty, on a closer look. We don't know if netcons
> > is called in IRQ context or not. How about we add an hrtimer to netdevsim,
> > schedule it to fire 5usec in the future instead of scheduling NAPI
> > immediately? We can call napi_schedule() from a timer safely.
> > 
> > Unless there's another driver which schedules NAPI from xmit.
> > Then we'd need to try harder to fix this in netpoll.
> > veth does use NAPI on xmit but it sets IFF_DISABLE_NETPOLL already.  
> 
> Just to make sure I follow the netpoll issue. What would you like to fix
> in netpoll exactly?

Nothing in netpoll, the problem is that netdevsim calls napi_schedule
from the xmit path. That's incompatible with netpoll. We should fix
netdevsim instead (unless more real drivers need napi-from-xmit to
work).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ