From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH 17/23] y2038: time: avoid timespec usage in settimeofday() Date: Thu, 14 Nov 2019 15:35:35 +0100 Message-ID: References: <20191108210236.1296047-1-arnd@arndb.de> <20191108211323.1806194-8-arnd@arndb.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Thomas Gleixner Cc: y2038 Mailman List , John Stultz , "linux-kernel@vger.kernel.org" , Stephen Boyd , David Howells , Al Viro , Deepa Dinamani , Christian Brauner , Jens Axboe , Ingo Molnar , Corey Minyard , zhengbin , Li RongQing , Linux API List-Id: linux-api@vger.kernel.org On Thu, Nov 14, 2019 at 3:04 PM Thomas Gleixner wrote: > On Thu, 14 Nov 2019, Arnd Bergmann wrote: > > On Wed, Nov 13, 2019 at 10:53 PM Thomas Gleixner 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