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]
Date:	Wed, 7 May 2014 14:55:48 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Dongsheng Yang <yangds.fnst@...fujitsu.com>
Cc:	mingo@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sched/clock: cleanup, remove wrap_{max|min}().

On Wed, May 07, 2014 at 08:48:58PM +0900, Dongsheng Yang wrote:
> I am not sure why we need the wrap_{max|min}() in kernel/sched/clock.c.
> But I checked the implementation of max() and min() in linux/kernel.h, I think
> we can reuse them here rather than introduce a new function named
> wrap_{max|min}().

wrap is a good hint there.. they're supposed to deal with the clock
wrapping. Of course 2^64 ns is a rather long time (~584 years in fact),
but that doesn't mean we shouldn't care.

And no, min/max don't do the right thing.

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ