Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1034184AbcJ0WZs (ORCPT ); Thu, 27 Oct 2016 18:25:48 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:32942 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965226AbcJ0WZp (ORCPT ); Thu, 27 Oct 2016 18:25:45 -0400 MIME-Version: 1.0 In-Reply-To: <20161027022420.GC31660@dtor-ws> References: <1476761253-13450-1-git-send-email-deepa.kernel@gmail.com> <1476761253-13450-4-git-send-email-deepa.kernel@gmail.com> <20161027022420.GC31660@dtor-ws> From: Deepa Dinamani Date: Thu, 27 Oct 2016 15:25:43 -0700 Message-ID: Subject: Re: [PATCH v2 3/4] input: Deprecate real timestamps beyond year 2106 To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, Linux Kernel Mailing List , Arnd Bergmann , y2038 Mailman List , Peter Hutterer , Benjamin Tissoires , Jiri Kosina , Hans de Goede Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1957 Lines: 44 >> struct timeval is not y2038 safe. >> All usage of timeval in the kernel will be replaced by >> y2038 safe structures. >> >> struct input_event maintains time for each input event. >> Real time timestamps are not ideal for input as this >> time can go backwards as noted in the patch a80b83b7b8 >> by John Stultz. Hence, having the input_event.time fields >> only big enough for monotonic and boot times are >> sufficient. >> >> Leave the original input_event as is. This is to maintain >> backward compatibility with existing userspace interfaces >> that use input_event. >> Introduce a new replacement struct raw_input_event. >> This replaces timeval with struct input_timeval. This structure >> maintains time in __kernel_ulong_t or compat_ulong_t to allow >> for architectures to override types as in the case of x32. >> >> The change requires any userspace utilities reading or writing >> from event nodes to update their reading format to match >> raw_input_event. The changes to the popular libraries will be >> posted along with the kernel changes. >> The driver version is also updated to reflect the change in >> event format. > > If users are forced to update to adapt to the new event format, should > we consider more radical changes? For example, does it make sense to > send timestamp on every event? Maybe we should only send it once per > event packet (between EV_SYN/SYN_REPORT)? What granularity do we need? > Is there anything else in current protocol that we'd like to change? I did see the thread with Pingbo's patches where you had a similar comment. I see my series as decoupling the kernel input event format from the userspace format. The formats also are really the same still. Could this be considered the first step towards changing the protocol? The protocol changes might need new interfaces to be defined between libraries. And, could end up being a substantial change. Would a step by step approach make sense? -Deepa