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: <20210112173116.GG2743@paulmck-ThinkPad-P72>
Date:   Tue, 12 Jan 2021 09:31:16 -0800
From:   "Paul E. McKenney" <paulmck@...nel.org>
To:     Neeraj Upadhyay <neeraju@...eaurora.org>
Cc:     josh@...htriplett.org, rostedt@...dmis.org,
        mathieu.desnoyers@...icios.com, jiangshanlai@...il.com,
        joel@...lfernandes.org, rcu@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rcu: Correct cpu offline trace in rcutree_dying_cpu

On Mon, Jan 11, 2021 at 05:15:58PM +0530, Neeraj Upadhyay wrote:
> Correctly trace whether the outgoing cpu blocks current gp in
> rcutree_dying_cpu().
> 
> Signed-off-by: Neeraj Upadhyay <neeraju@...eaurora.org>

Good catch, queued, thank you!  Please see below for my usual
wordsmithing, and please lat me know if I messed something up.

							Thanx, Paul

------------------------------------------------------------------------

commit ab6e7609e7590e1bb220ef6b0822a823dde46f6c
Author: Neeraj Upadhyay <neeraju@...eaurora.org>
Date:   Mon Jan 11 17:15:58 2021 +0530

    rcu: Fix CPU-offline trace in rcutree_dying_cpu
    
    The condition in the trace_rcu_grace_period() in rcutree_dying_cpu() is
    backwards, so that it uses the string "cpuofl" when the offline CPU is
    blocking the current grace period and "cpuofl-bgp" otherwise.  Given that
    the "-bgp" stands for "blocking grace period", this is at best misleading.
    This commit therefore switches these strings in order to correctly trace
    whether the outgoing cpu blocks the current grace period.
    
    Signed-off-by: Neeraj Upadhyay <neeraju@...eaurora.org>
    Signed-off-by: Paul E. McKenney <paulmck@...nel.org>

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index cc6b6fc..63c6dba 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -2387,7 +2387,7 @@ int rcutree_dying_cpu(unsigned int cpu)
 
 	blkd = !!(rnp->qsmask & rdp->grpmask);
 	trace_rcu_grace_period(rcu_state.name, READ_ONCE(rnp->gp_seq),
-			       blkd ? TPS("cpuofl") : TPS("cpuofl-bgp"));
+			       blkd ? TPS("cpuofl-bgp") : TPS("cpuofl"));
 	return 0;
 }
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ