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: <20201106065642.ti7mgrll7mbrndja@linux-p48b.lan>
Date:   Thu, 5 Nov 2020 22:56:42 -0800
From:   Davidlohr Bueso <dave@...olabs.net>
To:     paulmck@...nel.org
Cc:     rcu@...r.kernel.org, linux-kernel@...r.kernel.org,
        kernel-team@...com, mingo@...nel.org, jiangshanlai@...il.com,
        akpm@...ux-foundation.org, mathieu.desnoyers@...icios.com,
        josh@...htriplett.org, tglx@...utronix.de, peterz@...radead.org,
        rostedt@...dmis.org, dhowells@...hat.com, edumazet@...gle.com,
        fweisbec@...il.com, oleg@...hat.com, joel@...lfernandes.org
Subject: Re: [PATCH tip/core/rcu 03/28] locktorture: Track time of last
 ->writeunlock()

On Thu, 05 Nov 2020, paulmck@...nel.org wrote:

>From: "Paul E. McKenney" <paulmck@...nel.org>
>
>This commit adds a last_lock_release variable that tracks the time of
>the last ->writeunlock() call, which allows easier diagnosing of lock
>hangs when using a kernel debugger.

This makes sense to have.

Acked-by: Davidlohr Bueso <dbueso@...e.de>

>
>Cc: Davidlohr Bueso <dave@...olabs.net>
>Signed-off-by: Paul E. McKenney <paulmck@...nel.org>
>---
> kernel/locking/locktorture.c | 2 ++
> 1 file changed, 2 insertions(+)
>
>diff --git a/kernel/locking/locktorture.c b/kernel/locking/locktorture.c
>index 62d215b..316531d 100644
>--- a/kernel/locking/locktorture.c
>+++ b/kernel/locking/locktorture.c
>@@ -60,6 +60,7 @@ static struct task_struct **reader_tasks;
>
> static bool lock_is_write_held;
> static bool lock_is_read_held;
>+static unsigned long last_lock_release;
>
> struct lock_stress_stats {
> 	long n_lock_fail;
>@@ -632,6 +633,7 @@ static int lock_torture_writer(void *arg)
> 		lwsp->n_lock_acquired++;
> 		cxt.cur_ops->write_delay(&rand);
> 		lock_is_write_held = false;
>+		WRITE_ONCE(last_lock_release, jiffies);
> 		cxt.cur_ops->writeunlock();
>
> 		stutter_wait("lock_torture_writer");
>-- 
>2.9.5
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ