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: <cdc20491-a0a8-4dfd-9326-797bb0de0f90@nvidia.com>
Date: Mon, 21 Apr 2025 13:53:17 -0400
From: Joel Fernandes <joelagnelf@...dia.com>
To: linux-kernel@...r.kernel.org, Jonathan Corbet <corbet@....net>,
 "Paul E. McKenney" <paulmck@...nel.org>,
 Frederic Weisbecker <frederic@...nel.org>,
 Neeraj Upadhyay <neeraj.upadhyay@...nel.org>,
 Joel Fernandes <joel@...lfernandes.org>,
 Josh Triplett <josh@...htriplett.org>, Boqun Feng <boqun.feng@...il.com>,
 Uladzislau Rezki <urezki@...il.com>, Steven Rostedt <rostedt@...dmis.org>,
 Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
 Lai Jiangshan <jiangshanlai@...il.com>, Zqiang <qiang.zhang1211@...il.com>,
 Davidlohr Bueso <dave@...olabs.net>
Cc: rcu@...r.kernel.org, linux-doc@...r.kernel.org
Subject: Re: [PATCH v5] rcutorture: Perform more frequent testing of ->gpwrap



On 4/21/2025 1:47 PM, Joel Fernandes wrote:
> Currently, the ->gpwrap is not tested (at all per my testing) due to the
> requirement of a large delta between a CPU's rdp->gp_seq and its node's
> rnp->gpseq.
> 
> This results in no testing of ->gpwrap being set. This patch by default
> adds 5 minutes of testing with ->gpwrap forced by lowering the delta
> between rdp->gp_seq and rnp->gp_seq to just 8 GPs. All of this is
> configurable, including the active time for the setting and a full
> testing cycle.
> 
> By default, the first 25 minutes of a test will have the _default_
> behavior there is right now (ULONG_MAX / 4) delta. Then for 5 minutes,
> we switch to a smaller delta causing 1-2 wraps in 5 minutes. I believe
> this is reasonable since we at least add a little bit of testing for
> usecases where ->gpwrap is set.
> 
> Tested-by: Paul E. McKenney <paulmck@...nel.org>
> Signed-off-by: Joel Fernandes <joelagnelf@...dia.com>
> ---
> v4->v5
>  - Added gpwrap_lag torture param to turn off entire test.
>  - replaced references to 'ovf' with 'gpwrap lag'.
> 
> Will move this to my rcu/torture-for-6.16 and update my rcu/for-next branches.
>  
>  .../admin-guide/kernel-parameters.txt         |  5 ++
>  kernel/rcu/rcu.h                              |  4 ++
>  kernel/rcu/rcutorture.c                       | 72 ++++++++++++++++++-
>  kernel/rcu/tree.c                             | 34 ++++++++-
>  kernel/rcu/tree.h                             |  1 +
>  5 files changed, 113 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index 76e538c77e31..e1d11b6595fd 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -5657,6 +5657,11 @@
>  			are zero, rcutorture acts as if is interpreted
>  			they are all non-zero.
>  
> +	rcutorture.gpwrap_lag= [KNL]
> +			Enable grace-period wrap lag testing. Setting
> +			to false prevents the gpwrap lag test from
> +			running.
> +
FYI, I added docs for the additional params here as well:


+       rcutorture.gpwrap_lag= [KNL]
+                       Enable grace-period wrap lag testing. Setting
+                       to false prevents the gpwrap lag test from
+                       running.
+
+       rcutorture.gpwrap_lag_gps= [KNL]
+                       Set the value for grace-period wrap lag during
+                       active lag testing periods. This controls how many
+                       grace periods differences we tolerate between
+                       rdp and rnp's gp_seq before setting overflow flag.
+
+       rcutorture.gpwrap_lag_cycle_mins= [KNL]
+                       Set the total cycle duration for gpwrap lag
+                       testing in minutes. This is the total time for
+                       one complete cycle of active and inactive
+                       testing periods. Default is 30 minutes.
+
+       rcutorture.gpwrap_lag_active_mins= [KNL]
+                       Set the duration for which gpwrap lag is active
+                       within each cycle, in minutes. During this time,
+                       the grace-period wrap lag will be set to the
+                       value specified by gpwrap_lag_gps. Default is
+                       5 minutes.
+


Will push this to my rcu/torture-for-6.16 and also update my rcu/for-next branch.

 - Joel



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ