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: <11025195.jAqGPh9YPj@wuerfel>
Date:	Thu, 05 Nov 2015 17:18:41 +0100
From:	Arnd Bergmann <arnd@...db.de>
To:	Tina Ruchandani <ruchandani.tina@...il.com>
Cc:	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	y2038 <y2038@...ts.linaro.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [RESEND PATCH] USB: usbmon: Use 64bit timestamp for mon_bin_hdr

On Thursday 29 October 2015 22:44:31 Tina Ruchandani wrote:
> struct mon_bin_hdr allows for a 64-bit seconds timestamp. The code
> currently uses 'struct timeval' to populate the timestamp in mon_bin_hdr,
> which has a 32-bit seconds field and will overflow in year 2038 and beyond.
> This patch replaces 'struct timeval' with 'struct timespec64' which is
> y2038 safe. This patch is part of a larger attempt to remove instances
> of struct timeval and other 32-bit timekeeping (time_t, struct timespec)
> from the kernel.
> 
> Signed-off-by: Tina Ruchandani <ruchandani.tina@...il.com>

Reviewed-by: Arnd Bergmann <arnd@...db.de>

As the patch is a week old and Greg hasn't picked it up yet, I'm guessing
that he doesn't have it in his queue any more and you should send it once
more with my 'Reviewed-by' tag.

> @@ -494,7 +495,7 @@ static void mon_bin_event(struct mon_reader_bin *rp, struct urb *urb,
>         struct mon_bin_hdr *ep;
>         char data_tag = 0;
>  
> -       do_gettimeofday(&ts);
> +       getnstimeofday64(&ts);
>  
>         spin_lock_irqsave(&rp->b_lock, flags);
>  

This is a very minor comment I still have, and the patch is fine as it, but
I tend to prefer ktime_get_real_ts64() over getnstimeofday64() these days.
The two functions do the exact same thing, and I hope to remove the latter
eventually.

	Arnd
--
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