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:	Mon, 11 Dec 2006 17:31:00 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	dada1@...mosbay.com
Cc:	akpm@...l.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Introduce jiffies_32 and related compare functions

From: Eric Dumazet <dada1@...mosbay.com>
Date: Mon, 11 Dec 2006 23:58:06 +0100

> Some subsystems dont need more than 32bits timestamps.
> 
> See for example net/ipv4/inetpeer.c and include/net/tcp.h :
> #define tcp_time_stamp            ((__u32)(jiffies))
> 
> 
> Because most timeouts should work with 'normal jiffies' that are 32bits on 
> 32bits platforms, it makes sense to be able to use only 32bits to store them 
> and not 64 bits, to save ram.
> 
> This patch introduces jiffies_32, and related comparison functions 
> time_after32(), time_before32(), time_after_eq32() and time_before_eq32().
> 
> I plan to use this infrastructure in network code for example (struct 
> dst_entry comes to mind).

The TCP case is because the protocol limits the size of
the timestamp we can store in the TCP Timestamp option.

Otherwise we would use the full 64-bit jiffies timestamp,
in order to have a larger window of values which would not
overflow.

Since there is no protocol limitation involved in cases
such as dst_entry, I think we should keep it at 64-bits
on 64-bit platforms to make the wrap-around window as
large as possible.

I really don't see any reason to make these changes.  Yes,
you'd save some space, but one of the chief advantages of
64-bit is that we get larger jiffies value windows.  If
that has zero value, as your intended changes imply, then
we shouldn't need the default 64-bit jiffies either, by
implication.
-
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