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]
Date:	Thu, 22 Oct 2009 06:25:30 +0900
From:	Johannes Berg <johannes@...solutions.net>
To:	Jarek Poplawski <jarkao2@...il.com>
Cc:	Tilman Schmidt <tilman@...p.cc>,
	David Miller <davem@...emloft.net>, hidave.darkstar@...il.com,
	linux-kernel@...r.kernel.org, tglx@...utronix.de,
	linux-wireless@...r.kernel.org, linux-ppp@...r.kernel.org,
	netdev@...r.kernel.org, paulus@...ba.org,
	Michael Buesch <mb@...sch.de>,
	Oliver Hartkopp <oliver@...tkopp.net>
Subject: Re: [PATCH] net: Adjust softirq raising in __napi_schedule

On Wed, 2009-10-21 at 23:19 +0200, Jarek Poplawski wrote:
> On Wed, Oct 21, 2009 at 08:46:40PM +0200, Tilman Schmidt wrote:
> ...
> > I have tested your patch and I can confirm that it fixes the messages.
> > I have not noticed any ill effects.
> 
> OK. So, in any case, here is this next variant/proposal.
> 
> Thanks,
> Jarek P.
> ------------------------>
> net: Adjust softirq raising in __napi_schedule
> 
> This patch changes __raise_softirq_irqoff() to raise_softirq_irqoff()
> in __napi_schedule() to enable proper softirq scheduling from process
> context. The main intent is to let use netif_rx() universally, and
> make netif_rx_ni() redundant.
> 
> Currently using netif_rx() instead of netif_rx_ni() triggers:
> "NOHZ: local_softirq_pending 08" warnings, but additional cost of one
> "if" on the fast path doesn't seem to justify maintaining it
> separately.
> 
> This patch is based on the analysis, suggestions and the original
> patch for mac80211 by: Michael Buesch <mb@...sch.de>
> 
> Another patch calling netif_rx variants conditionally was done by:
> Oliver Hartkopp <oliver@...tkopp.net>
> 
> Reported-by: Michael Buesch <mb@...sch.de>
> Reported-by: Oliver Hartkopp <oliver@...tkopp.net>
> Reported-by: Tilman Schmidt <tilman@...p.cc>
> Diagnosed-by: Michael Buesch <mb@...sch.de>
> Tested-by: Tilman Schmidt <tilman@...p.cc>
> Signed-off-by: Jarek Poplawski <jarkao2@...il.com>
> ---
> 
>  net/core/dev.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 28b0b9e..7fc4009 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -2728,7 +2728,7 @@ void __napi_schedule(struct napi_struct *n)
>  
>  	local_irq_save(flags);
>  	list_add_tail(&n->poll_list, &__get_cpu_var(softnet_data).poll_list);
> -	__raise_softirq_irqoff(NET_RX_SOFTIRQ);
> +	raise_softirq_irqoff(NET_RX_SOFTIRQ);

This still doesn't make any sense.

There may or may not be a lot of code that assumes that everything else
is run with other tasklets disabled, and that it cannot be interrupted
by a tasklet and thus create a race.

Can you prove that is not the case, across the entire networking layer?

johannes

Download attachment "signature.asc" of type "application/pgp-signature" (802 bytes)

Powered by blists - more mailing lists