Thread (15 messages) 15 messages, 5 authors, 2016-02-27

Re: [PATCH 3/4] net: ipv4: tcp_probe: Replace timespec with timespec64

From: Deepa Dinamani <hidden>
Date: 2016-02-27 02:56:05

On Thu, Feb 25, 2016 at 8:31 PM, Arnd Bergmann [off-list ref] wrote:
On Wednesday 24 February 2016 23:07:10 Deepa Dinamani wrote:
quoted
TCP probe log timestamps use struct timespec which is
not y2038 safe. Even though timespec might be good enough here
as it is used to represent delta time, the plan is to get rid
of all uses of timespec in the kernel.
Replace with struct timespec64 which is y2038 safe.

Prints still use unsigned long format and type.
This is because long is 64 bit on 64 bit systems and 32 bit on
32 bit systems. Hence, time64_t(64 bit signed number) does not
have a specifier that matches on both architectures.
Actually time64_t is always 'long long', but tv_sec is time_t
(long) instead of time64_t on 64-bit architectures.

Using a %ll format string and a cast to s64 would work as well,
but as you say above, it's not important here.
You are right. A cast to u64 would work as well.
I missed that the size of long long on 64 bit architectures according
to all current
data models is equivalent to long.

I will leave the prints to be in long format.
But, will reword the commit text in v2.

Thanks,
-Deepa
_______________________________________________
Y2038 mailing list
Y2038@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/y2038
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help