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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 4 Nov 2013 16:51:48 -0800
From:	Aaron Fabbri <ajfabbri@...il.com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	linux-rt-users@...r.kernel.org,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	yoshihiro.yunomae.ez@...achi.com
Subject: [PATCH] trace-cmd: Make read nonblocking in find_time_stamp().

This only affects the tsc -> time of day correlation when doing
`trace-cmd record --date`.

get_date_to_ts() writes a dummy event to trace_marker and then reads it back.
Reading it back is done by looping over all per-cpu raw trace pipes and trying
to read.  This read should be non-blocking, because the dummy event can end up
on any CPU.

Signed-off-by: Aaron Fabbri <ajfabbri@...il.com>
---
 trace-record.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/trace-record.c b/trace-record.c
index 1b1d293..dca8a92 100644
--- a/trace-record.c
+++ b/trace-record.c
@@ -2092,7 +2092,7 @@ static unsigned long long find_time_stamp(struct
pevent *pevent)
                        continue;

                sprintf(file, "%s/%s/trace_pipe_raw", path, name);
-               fd = open(file, O_RDONLY);
+               fd = open(file, O_RDONLY | O_NONBLOCK);
                if (fd < 0)
                        continue;
                do {
-- 
1.8.1.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ