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-next>] [day] [month] [year] [list]
Date:   Thu, 10 Oct 2019 11:50:46 -0700
From:   "Srivatsa S. Bhat" <srivatsa@...il.mit.edu>
To:     linux-kernel@...r.kernel.org, rostedt@...dmis.org, mingo@...hat.com
Cc:     amakhalov@...are.com, akaher@...are.com, anishs@...are.com,
        bordoloih@...are.com, srivatsab@...are.com, srivatsa@...il.mit.edu
Subject: [PATCH 1/3] tracing/hwlat: Report total time spent in all NMIs
 during the sample

From: Srivatsa S. Bhat (VMware) <srivatsa@...il.mit.edu>

nmi_total_ts is supposed to record the total time spent in *all* NMIs
that occur on the given CPU during the (active portion of the)
sampling window. However, the code seems to be overwriting this
variable for each NMI, thereby only recording the time spent in the
most recent NMI. Fix it by accumulating the duration instead.

Fixes: 7b2c86250122 ("tracing: Add NMI tracing in hwlat detector")
Cc: stable@...r.kernel.org
Signed-off-by: Srivatsa S. Bhat (VMware) <srivatsa@...il.mit.edu>
---

 kernel/trace/trace_hwlat.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/trace/trace_hwlat.c b/kernel/trace/trace_hwlat.c
index fa95139..a0251a7 100644
--- a/kernel/trace/trace_hwlat.c
+++ b/kernel/trace/trace_hwlat.c
@@ -150,7 +150,7 @@ void trace_hwlat_callback(bool enter)
 		if (enter)
 			nmi_ts_start = time_get();
 		else
-			nmi_total_ts = time_get() - nmi_ts_start;
+			nmi_total_ts += time_get() - nmi_ts_start;
 	}
 
 	if (enter)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ