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: <CAO3-Pboo32iQBBUHUELUkvvpSa=jZwUqefrwC-NBjDYx4yxYJQ@mail.gmail.com>
Date: Wed, 28 Feb 2024 10:37:51 -0600
From: Yan Zhai <yan@...udflare.com>
To: Joel Fernandes <joel@...lfernandes.org>
Cc: paulmck@...nel.org, Eric Dumazet <edumazet@...gle.com>, netdev@...r.kernel.org, 
	"David S. Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, 
	Jiri Pirko <jiri@...nulli.us>, Simon Horman <horms@...nel.org>, 
	Daniel Borkmann <daniel@...earbox.net>, Lorenzo Bianconi <lorenzo@...nel.org>, 
	Coco Li <lixiaoyan@...gle.com>, Wei Wang <weiwan@...gle.com>, 
	Alexander Duyck <alexanderduyck@...com>, Hannes Frederic Sowa <hannes@...essinduktion.org>, 
	linux-kernel@...r.kernel.org, rcu@...r.kernel.org, bpf@...r.kernel.org, 
	kernel-team@...udflare.com
Subject: Re: [PATCH] net: raise RCU qs after each threaded NAPI poll

On Wed, Feb 28, 2024 at 9:37 AM Joel Fernandes <joel@...lfernandes.org> wrote:
> Also optionally, I wonder if calling rcu_tasks_qs() directly is better
> (for documentation if anything) since the issue is Tasks RCU specific. Also
> code comment above the rcu_softirq_qs() call about cond_resched() not taking
> care of Tasks RCU would be great!
>
Yes it's quite surprising to me that cond_resched does not help here,
I will include that comment. Raising just the task RCU QS seems
sufficient to the problem we encountered. But according to commit
d28139c4e967 ("rcu: Apply RCU-bh QSes to RCU-sched and RCU-preempt
when safe"), there might be additional threat factor in __do_softirq
that also applies to threaded poll.

Yan


> Reviewed-by: Joel Fernandes (Google) <joel@...lfernandes.org>
>
> thanks,
>
>  - Joel
> [1]
> @@ -381,8 +553,10 @@ asmlinkage __visible void __softirq_entry __do_softirq(void)
>                 pending >>= softirq_bit;
>         }
>
> -       if (__this_cpu_read(ksoftirqd) == current)
> +       if (!IS_ENABLED(CONFIG_PREEMPT_RT) &&
> +           __this_cpu_read(ksoftirqd) == current)
>                 rcu_softirq_qs();
> +
>         local_irq_disable();

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ