Re: [PATCH 17/23] y2038: time: avoid timespec usage in settimeofday()

From
Arnd Bergmann <arnd@arndb.de>
Date
2019-11-14 14:35:57
Also in
lkml
Reply to
Thomas Gleixner, 2019-11-14
On Thu, Nov 14, 2019 at 3:04 PM Thomas Gleixner [off-list ref] wrote:
On Thu, 14 Nov 2019, Arnd Bergmann wrote:
quoted
On Wed, Nov 13, 2019 at 10:53 PM Thomas Gleixner [off-list ref] wrote:

My idea was to not duplicate the range check that is done
in do_sys_settimeofday64() and again in do_settimeofday64:

        if (!timespec64_valid_settod(ts))
                return -EINVAL;

The only check we should need in addition to this is to ensure
that passing an invalid tv_usec number doesn't become an
unexpectedly valid tv_nsec after the multiplication.
Right, but please add a proper comment as you/we are going to scratch heads
4 weeks from now when staring at that check and wondering why it is
incomplete.
Ok, done. I had just uploaded the branch with the fixup for
the __user pointer access in the same patch, but that version
had introduced another typo. I hope the version I uploaded
now has all known issues addressed for tomorrow's linux-next.

      Arnd
Thread (19 messages) 19 messages, 7 authors, last reply 2019-11-15
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help