From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933549AbdKHAWt (ORCPT ); Tue, 7 Nov 2017 19:22:49 -0500 Received: from imap1.codethink.co.uk ([176.9.8.82]:42129 "EHLO imap1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755815AbdKHAWq (ORCPT ); Tue, 7 Nov 2017 19:22:46 -0500 Message-ID: <1510100559.2465.44.camel@codethink.co.uk> Subject: Re: [Y2038] [PATCH 2/2] alpha: osf_sys.c: use timespec64 where appropriate From: Ben Hutchings To: Arnd Bergmann , Richard Henderson Cc: y2038@lists.linaro.org, linux-kernel@vger.kernel.org, Ivan Kokshaysky , Alexander Viro , linux-alpha@vger.kernel.org, Matt Turner , Deepa Dinamani Date: Wed, 08 Nov 2017 00:22:39 +0000 In-Reply-To: <20171107141029.3160278-2-arnd@arndb.de> References: <20171107141029.3160278-1-arnd@arndb.de> <20171107141029.3160278-2-arnd@arndb.de> 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 On Tue, 2017-11-07 at 15:09 +0100, Arnd Bergmann wrote: > Some of the syscall helper functions (do_utimes, poll_select_set_timeout, > core_sys_select) have changed over the past year or two to use > 'timespec64' pointers rather than 'timespec'. This was fine on alpha, > since 64-bit architectures treat the two as the same type. > > However, I'd like to change that behavior and make 'timespec64' a proper > type of its own even on 64-bit architectures, and that will introduce > harmless type mismatch warnings here. > > Also, I'm trying to kill off the do_gettimeofday() helper in favor of > ktime_get() and related interfaces throughout the kernel. [...] > @@ -1004,9 +1013,10 @@ SYSCALL_DEFINE2(osf_gettimeofday, struct timeval32 __user *, tv, >   struct timezone __user *, tz) >  { >   if (tv) { > - struct timeval ktv; > - do_gettimeofday(&ktv); > - if (put_tv32(tv, &ktv)) > + struct timespec64 kts; > + > + ktime_get_ts64(&kts); [...] But this syscall is supposed to use the realtime clock, no? It seems like the correct substitute here is getnstimeofday64() (as the kernel- doc comment for do_gettimeofday() *almost* says). Ben. -- Ben Hutchings Software Developer, Codethink Ltd.