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] [day] [month] [year] [list]
Date:	Tue, 18 Jan 2011 13:49:15 +0800
From:	Yong Zhang <yong.zhang0@...il.com>
To:	"Shaffer, Scott" <scott.shaffer@...r.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"tglx@...utronix.de" <tglx@...utronix.de>,
	"mingo@...e.hu" <mingo@...e.hu>
Subject: Re: [PATCH] fix bad delta time values in /proc/timer_list

On Tue, Jan 18, 2011 at 4:20 AM, Shaffer, Scott <scott.shaffer@...r.com> wrote:
> elapsed times printed from /proc/timer_list are incorrect for the
> CLOCK_REALTIME timer list.
>
> print_timer() is passed monotonic nsecs as current time, but should
> be passed monotonic nsecs + hrtimer_clock_base.offset for the
> timer list it is printing.
>
> This patch fixes CLOCK_REALTIME timer lists, and does not break
> CLOCK_MONOTONIC timer lists.
>
>
> This shows a thread's timer that is <10ms:
>
> xunil2.ccur.com # grep -A 9 "cpu: 1" /proc/timer_list
> cpu: 1
>  clock 0:
>  .base:       f67031d0
>  .index:      0
>  .resolution: 1 nsecs
>  .get_time:   ktime_get_real
>  .offset:     1294953310697580572 nsecs
> active timers:
>  #0: <f518ff3c>, hrtimer_wakeup, S:01, hrtimer_start_range_ns, pthread_sleep2/7067
>  # expires at 1295021767185712301-1295021767185712301 nsecs [in 1294953310698070434 to 1294953310698070434 nsecs]
>
>
> With the patch below, that thread's timer looks like:
>
>  #0: <f37d7f3c>, hrtimer_wakeup, S:01, hrtimer_start_range_ns, pthread_sleep2/9403
>  # expires at 1295022944770566772-1295022944770566772 nsecs [in 5305914 to 5305914 nsecs]
>
>
> Signed-off-by: Scott Shaffer <scott.shaffer@...r.com>

Looks good.

Reviewed-by: Yong Zhang <yong.zhang0@...il.com>
--
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