From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964873AbcJ1Pp0 (ORCPT ); Fri, 28 Oct 2016 11:45:26 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:60965 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754973AbcJ1PpY (ORCPT ); Fri, 28 Oct 2016 11:45:24 -0400 From: Arnd Bergmann To: Deepa Dinamani Cc: Dmitry Torokhov , linux-input@vger.kernel.org, Linux Kernel Mailing List , y2038 Mailman List Subject: Re: [PATCH v2 3/4] input: Deprecate real timestamps beyond year 2106 Date: Fri, 28 Oct 2016 17:45:20 +0200 Message-ID: <1960434.J8MW3Y2VCi@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-34-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: References: <1476761253-13450-1-git-send-email-deepa.kernel@gmail.com> <5347568.3SpFZiqxSr@wuerfel> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:wWmRzHRA/27HRjNMaVBmuFb8wsDmXlzBdNZgvOsMbB6sYjl/q1J bRgiGAW7/uQX8+BrteuL1w7HJ0XW6yx2/2zOZ0xkwbK7SAGyA02mQTJ3Cw/MoanQ+90RZEL fBFFfDYrB2Dm40CA56qd1Xb32Whm91Hq2WHqtH/PDso/rnz+sRrcQkA5P/o/X6VIB2CoQfH gJo6pOxjn+I+T9Lzf2xWA== X-UI-Out-Filterresults: notjunk:1;V01:K0:fYmSVpp1BpQ=:L2w1Tfz2eaTAqRo+j/kIvk SnLuNkw+0SAx8VrBbm4GzCQEBePi2Q92HfKfqpBu01RHxJ45E09fv/mUKOV35PvikKyvBxPr9 w2TT//imKG0vXVdbCTO0BFB/FdVBa4C5OKMO3LrKmdlYdlfMDaix27cB9XrLagaOuVWz3GUhs VOiME5TImvnV3F7LGEa0OW+FUAg4MUGyKEcTd0vsYoHUEC1LBHkUH02d6+xBKNXoBXJ7NeXqQ VzV12/ZnCSOrVbmY/tYyHAor+rMEdAnhn1BE7ZFLzaeiTdCnbPjSVPAUZOd0T9hGkx7RHK4ae tB1lTM9mWV3LfW7shbSEd39orvAfPpENADh9dKD0RR+3o2KuAsnSBf+oiwxa+G0sY74S2LGvp nT/L9qOSvpy8O+oSD5QYpCSxOnmt3AuUksvf9tC+Bh9ZAlJRS3DVgM05ftXgPEPeXwj/7fjH2 y03obdem9X9bV51Ymctvm7sN4hkb88rc1dNdTKlfvnAXd5cnzcXqVcApwvqDr4EHD3jpB0N4x OoTWP14cvXEQFKKR9G7xe8NHhhF0aGx84hL8aHoUnuGzxIplr0YrHq+mN8YQIId0PPpu+TyOx IWhl8/gFJ1f0z7ck16O6VI4OAJV9w6pEqEOsmc74FCwVuGvqw/R17OEhWcGFCrw08atebWjOp 9WgJPQtBIsnT7JjsrAHvEBVjzcwYXWBlSFMzLZ6EJi/KqEnYt/OZE/H/PBoMaIT4/VjJbaHTi Fv1kRJCMrrS9fJhb Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday, October 28, 2016 8:19:46 AM CEST Deepa Dinamani wrote: > On Fri, Oct 28, 2016 at 5:43 AM, Arnd Bergmann wrote: > > On Monday, October 17, 2016 8:27:32 PM CEST Deepa Dinamani wrote: > >> @@ -55,24 +60,24 @@ struct ff_effect_compat { > >> > >> static inline size_t input_event_size(void) > >> { > >> - return (in_compat_syscall() && !COMPAT_USE_64BIT_TIME) ? > >> - sizeof(struct input_event_compat) : sizeof(struct input_event); > >> + return in_compat_syscall() ? sizeof(struct raw_input_event_compat) : > >> + sizeof(struct raw_input_event); > >> } > > > > I think the COMPAT_USE_64BIT_TIME check has to stay here, > > it's needed for x32 mode on x86-64. > > There is no time_t anymore in the raw_input_event structure. > The struct uses __kernel_ulong_t type. > This should take care of x32 support. I don't think it does. > From this cover letter: > https://www.spinics.net/lists/linux-arch/msg16356.html > > I see that that the __kernel types were introduced to address the ABI > issues for x32. This is a variation of the problem we are trying to solve for the other architectures in your patch set: On x32, the kernel uses produces a structure with the 64-bit layout, using __u64 tv_sec, to match the current user space that has 64-bit __kernel_ulong_t and 64-bit time_t, but in_compat_syscall() also returns 'true' here, as this is mostly a 32-bit ABI (time_t being one of the exceptions). ARnd