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: <174414348524.117.7223153072511748144@patchwork.local>
Date: Tue, 08 Apr 2025 20:18:05 -0000
From: Joel Fernandes <joelagnelf@...dia.com>
To: "Paul E. McKenney" <paulmck@...nel.org>
Cc: rcu <rcu@...r.kernel.org>, Joel Fernandes <joelagnelf@...dia.com>, linux-kernel <linux-kernel@...r.kernel.org>, kernel-team <kernel-team@...a.com>, rostedt <rostedt@...dmis.org>
Subject: Re: [v2,05/12] rcutorture: Add tests for SRCU up/down reader primitives

Hello, Paul,

On Tue, 8 Apr 2025 20:16:08 GMT, "Paul E. McKenney" wrote:
> This commit adds a new rcutorture.n_up_down kernel boot parameter
> that specifies the number of outstanding SRCU up/down readers, which
> begin in kthread context and end in an hrtimer handler.  There is a new
> kthread ("rcu_torture_updown") that scans an per-reader array looking
> for elements whose readers have ended.  This kthread sleeps between one
> and two milliseconds between consecutive scans.
> 
> [ paulmck: Apply kernel test robot feedback. ]
> [ paulmck: Apply Z qiang feedback. ]
> 
[...]
> +	for (i = 0; i < n_up_down; i++) {
> +		init_rcu_torture_one_read_state(&updownreaders[i].rtorsu_rtors, rand);
> +		hrtimer_init(&updownreaders[i].rtorsu_hrt, CLOCK_MONOTONIC,
> +			     HRTIMER_MODE_REL | HRTIMER_MODE_SOFT);

This will now fail to build and needs the following: I will squash it into my
for-next branch into this patch, but let me know if you prefer to provide an
update.

    Fix build error by converting hrtimer_init to hrtimer_setup, see:
    https://lore.kernel.org/all/174384280127.31282.2714486346304643188.tip-bot2@tip-bot2/

diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index 4f0a00a8bdee..14a22ef3b56f 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -2480,9 +2480,8 @@ static int rcu_torture_updown_init(void)
        }
        for (i = 0; i < n_up_down; i++) {
                init_rcu_torture_one_read_state(&updownreaders[i].rtorsu_rtors, rand);
-               hrtimer_init(&updownreaders[i].rtorsu_hrt, CLOCK_MONOTONIC,
-                            HRTIMER_MODE_REL | HRTIMER_MODE_SOFT);
-               updownreaders[i].rtorsu_hrt.function = rcu_torture_updown_hrt;
+               hrtimer_setup(&updownreaders[i].rtorsu_hrt,
rcu_torture_updown_hrt, CLOCK_MONOTONIC,
+                             HRTIMER_MODE_REL | HRTIMER_MODE_SOFT);
                torture_random_init(&updownreaders[i].rtorsu_trs);
                init_rcu_torture_one_read_state(&updownreaders[i].rtorsu_rtors,
                                                &updownreaders[i].rtorsu_trs);

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ