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:	Wed, 20 Sep 2006 16:08:18 -0700
From:	"Dmitriy Zavin" <dmitriyz@...gle.com>
To:	"Andi Kleen" <ak@...e.de>
Cc:	linux-kernel@...r.kernel.org, akpm@...l.org
Subject: Re: [PATCH 2/4] jiffies: Add 64bit jiffies compares (needed when long < 64bit).

These compares are there to use jiffies_64 safely on 32bit and 64 bit
systems, and jiffies_64 (and thus get_jiffies_64()) is always defined
as u64. Since this is not arch code, but generic for all
architectures, it should use the generic u64/s64 types. If the user
passes in a long and assumes that it's 64 bit, then it is user error.
I'll add a comment that says that these macros must be used with u64
values (as returned by get_jiffies_64()).

Thanks.

--Dima

P.S. This also means that currently, on 64 bit systems,
time_before/time_after is broken (typecheck fails) on values returned
by get_jiffies_64().

On 9/20/06, Andi Kleen <ak@...e.de> wrote:
>
> > +#define time_after64(a,b)            \
> > +     (typecheck(__u64, a) && \
> > +      typecheck(__u64, b) && \
>
> Did you double check the typecheck DTRT when someone
> passes in both plain long and long long on 64bit?
>
> -Andi
>
>
-
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