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: <20250213071426.01490615@kernel.org>
Date: Thu, 13 Feb 2025 07:14:26 -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 01:58:17 -0800 Breno Leitao wrote:
> > Looks like netcons is hitting this warning in netdevsim:
> > 
> > [   16.063196][  T219]  nsim_start_xmit+0x4e0/0x6f0 [netdevsim]
> > [   16.063219][  T219]  ? netif_skb_features+0x23e/0xa80
> > [   16.063237][  T219]  netpoll_start_xmit+0x3c3/0x670
> > [   16.063258][  T219]  __netpoll_send_skb+0x3e9/0x800
> > [   16.063287][  T219]  netpoll_send_skb+0x2a/0xa0
> > [   16.063298][  T219]  send_ext_msg_udp+0x286/0x350 [netconsole]
> > [   16.063325][  T219]  write_ext_msg+0x1c6/0x230 [netconsole]
> > [   16.063346][  T219]  console_emit_next_record+0x20d/0x430
> > 
> > https://netdev-3.bots.linux.dev/vmksft-net-drv-dbg/results/990261/7-netcons-basic-sh/stderr
> > 
> > We gotta fix that first.  
> 
> Thanks Jakub,
> 
> I understand that it will be fixed by this patchset, right?

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ