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: <1f1b08da0909161258g3e57a579iac2238c2f0916b07@mail.gmail.com>
Date:	Wed, 16 Sep 2009 12:58:42 -0700
From:	john stultz <johnstul@...ibm.com>
To:	Zhaolei <zhaolei@...fujitsu.com>
Cc:	Steven Rostedt <rostedt@...dmis.org>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...e.hu>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/3] ftrace: add tracepoint for xtime

On Wed, Sep 16, 2009 at 12:56 PM, john stultz <johnstul@...ibm.com> wrote:
> On Tue, Aug 25, 2009 at 1:14 AM, Zhaolei <zhaolei@...fujitsu.com> wrote:
>> From: Xiao Guangrong <xiaoguangrong@...fujitsu.com>
>>  /* Structure holding internal timekeeping values. */
>>  struct timekeeper {
>>        /* Current clocksource used for timekeeping. */
>> @@ -338,6 +341,8 @@ int do_settimeofday(struct timespec *tv)
>>
>>        update_vsyscall(&xtime, timekeeper.clock);
>>
>> +       trace_gtod_update_xtime(&xtime, &wall_to_monotonic);
>> +
>
> So the only thing to watch out on here is that xtime doesn't hold the
> current time, but the accumulated time. There is some unaccumulated
> time still kept in the clocksource structure.
>
> You probably want (assuming you only need tick granularity time) to
> use current_kernel_time().
>
> As an aside, is there a reason you have to have update callbacks and
> duplicate the time storage instead of using the existing interfaces?
> (ie: Is this due to locking or something else?)

Doh. Sorry, you're actually tracing the timekeeping code. Not using
this to assist tracing. Got this confused.

So yea, I think this should be ok, plus or minus determining if you
really want xtime or xtime_cache.

-john
--
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