Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757510AbdLQXv4 (ORCPT ); Sun, 17 Dec 2017 18:51:56 -0500 Received: from imap1.codethink.co.uk ([176.9.8.82]:34634 "EHLO imap1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756698AbdLQXvy (ORCPT ); Sun, 17 Dec 2017 18:51:54 -0500 Message-ID: <1513554707.18523.299.camel@codethink.co.uk> Subject: Re: [Y2038] [PATCH v2 08/10] fix get_timespec64() for y2038 safe compat interfaces From: Ben Hutchings To: Arnd Bergmann Cc: Deepa Dinamani , Thomas Gleixner , John Stultz , y2038 Mailman List , Linux Kernel Mailing List Date: Sun, 17 Dec 2017 23:51:47 +0000 In-Reply-To: References: <20171127193037.8711-1-deepa.kernel@gmail.com> <20171127193037.8711-9-deepa.kernel@gmail.com> <1513297310.18523.293.camel@codethink.co.uk> Organization: Codethink Ltd. Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 892 Lines: 29 On Fri, 2017-12-15 at 13:02 +0100, Arnd Bergmann wrote: [...] > - I had an idea to handle the copying of timespec/timeval with a > one-size-fits-all >   function and multiple wrappers around it, such as > > enum user_ts_type { >       USER_TS_TIMEVAL = 1, >       USER_TS_32 = 2, >       USER_TS_CLEARNSEC = 4, >       USER_TS_NOCHECK = 8, > }; [...] > While working on the driver patches I encountered lots of different > combinations of > those that might be interesting here, so we could have wrappers for > the most common > ones and call get_timestruct() and put_timestruct() directly for the > less common > variations. Am I taking it too far here, or would that make sense? I don't think I've reviewed enough time-handling stuff to know, but I can certainly believe that this could be worth doing. Ben. -- Ben Hutchings Software Developer, Codethink Ltd.