From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754859AbbK0Q7B (ORCPT ); Fri, 27 Nov 2015 11:59:01 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:50606 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751484AbbK0Q67 (ORCPT ); Fri, 27 Nov 2015 11:58:59 -0500 From: Arnd Bergmann To: WEN Pingbo Cc: y2038@lists.linaro.org, dmitry.torokhov@gmail.com, aksgarg1989@gmail.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org Subject: Re: [PATCH 0/3] introduce new evdev interface type Date: Fri, 27 Nov 2015 17:58:54 +0100 Message-ID: <8705201.iaeQDTRocP@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1448618432-32357-1-git-send-email-pingbo.wen@linaro.org> References: <1448618432-32357-1-git-send-email-pingbo.wen@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:sZHl+1BwrjtGWFmT6mdHWoPCi1eVm53eYYEgLYI19k9gmXOHrfy B5xkUC/s2P9YyaadxzxHJfW4crHnUa5H8AzbyyDBtcnW0Uq7eIpFCycQHpOolXRhjK7jBgE lQHSJUUjNc3xzTyyfwAFB2462Ju3xWPP48b5lT8oz/KCtqRyzUF6A0Sf/TerFyrqIGvt3+0 iJ6z2j9q2oV7ZJNAWvmRw== X-UI-Out-Filterresults: notjunk:1;V01:K0:KJqF7pPFEsI=:5dnkIclb23wp6KyjJt0/Eo S8O0hxXPGkxTNI9VPsox7wmWyoc2A0hQY6i4q96zV0q1W48gsUHaR3bLPSB1tNQ2nUZLabftk IC4QRXZbKwdE81XBMeN0Rnich8h9e5ehdDfVcmv08mFezK/oUJPhLpcGfqqHHIkR+XLVP5sOR 8v0bnwO/CQS55a4uj1WvDFjIBIQG+jrpz+jAuOoQGBccRJ0pHEAkeUbeywMPSUDd5K9iTTCJ0 1ZCrA91JafuP2Zy0fT07wz9PULPG+0XS7I8WS5GyQidKW77yoArPbQMXKdX3GwjGiu4mBv0b4 Uh1+ngOvvz3QUIg2qHC7Reh3kqLOLhPN8/JULO4d31klv/X9MP3PHP7VZK7NaM7da1j15+PhD Fdtllpaot1/Q6q9nVjkYYf+1z2sjz8AbTeiBS2ZDeryx/QQi79ov0ZsJgMoIv+GoNuHeeuZA/ vP3GPKeuBY1lyMYemAj04v9la+feVfDEfGsceqzeWRzFeMG+FHZCJnskKv+4Vw88o+xQ8rgPl KC3tayWrv9YYAY1In7IRxHJkzccPm0MLRApXB1TrfASNeKYZbE4LE/g/HOe2dFjblDuNYCEM/ ye+Vh03AD8/AmfIorXDdePRalC8sussdLOfSg0W5i1w6AIvTTvKL63BEYKV5RR9DSvfk5zYi7 Ma2fs8W3nbmZnn3jNqxJRfhsN6YLTtb/1Bkizyh1skPMDteVpCc0ligFAxsLG7PKWVAKm+f47 Mmo6DZx8lOXbZmil Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 27 November 2015 18:00:29 WEN Pingbo wrote: > To solve the y2038 problem in input_event, I had some attempts before [1], > and this is the second one. > > We can force userspace to use monotonic time in event timestamp, so the > 'struct timeval' is enough to keep y2038-safe, as Arnd suggested. But we > can not find a way to make kernel compatible with old binaries, which use > realtime, and there are still some devices, which depend on realtime. > > So I get a idea to add a new evdev interface, which is y2038 safe. And > userspace can switch between the old and new interface via ioctl. > > The patch series add three evdev interface type: > > - EV_IF_LEGACY > send event by input_event. This is the default option, keep kernel > backward compatible. The problem I see with this approach is that it still breaks any legacy source code that is compiled with a new libc that uses 64-bit time_t. If we are requiring source code changes for building users of input devices with a new libc, we can easily get them to handle the overflow (they normally only care about the microsecond portion anyway, so it doesn't matter in most cases), or to use monotonic time. Did I miss something here? Arnd