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: <20090330095522.GA6058@nowhere>
Date:	Mon, 30 Mar 2009 11:55:23 +0200
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Lai Jiangshan <laijs@...fujitsu.com>
Cc:	Ingo Molnar <mingo@...e.hu>, Steven Rostedt <srostedt@...hat.com>,
	Li Zefan <lizf@...fujitsu.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] tracing: fix incorrect return type of ns2usecs()

On Mon, Mar 30, 2009 at 11:52:13AM +0800, Lai Jiangshan wrote:
> 
> Impact: fix time output bug in 32bits system
> 
> ns2usecs() returns 'long', it's incorrect.
> 
> (In i386)
> # cat trace
> ...
>           <idle>-0     [000]   521.442100: _spin_lock <-tick_do_update_jiffies64
>           <idle>-0     [000]   521.442101: do_timer <-tick_do_update_jiffies64
>           <idle>-0     [000]   521.442102: update_wall_time <-do_timer
>           <idle>-0     [000]   521.442102: update_xtime_cache <-update_wall_time
> ....
> (It always print the time less than 2200 seconds besides ...)
> Because 'long' is 32bits in i386. ( (1<<31) useconds is about 2200 seconds)
> 
> # cat trace
> ...
>           <idle>-0     [001] 4154502640.134759: rcu_bh_qsctr_inc <-__do_softirq
>           <idle>-0     [001] 4154502640.134760: _local_bh_enable <-__do_softirq
>           <idle>-0     [001] 4154502640.134761: idle_cpu <-irq_exit
> ...
> (very large value)
> Because 'long' is a signed type and is 32bits in i386.
> 
> Signed-off-by: Lai Jiangshan <laijs@...fujitsu.com>
> Reported-by: Li Zefan <lizf@...fujitsu.com>
> Tested-by: Lai Jiangshan <laijs@...fujitsu.com>


Acked-by: Frederic Weisbecker <fweisbec@...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