linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
To: WEN Pingbo <pingbo.wen-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: y2038-cunTk1MwBs8s++Sfvej+rw@public.gmane.org,
	dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	aksgarg1989-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 0/3] introduce new evdev interface type
Date: Fri, 27 Nov 2015 17:58:54 +0100	[thread overview]
Message-ID: <8705201.iaeQDTRocP@wuerfel> (raw)
In-Reply-To: <1448618432-32357-1-git-send-email-pingbo.wen-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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

  parent reply	other threads:[~2015-11-27 16:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-27 10:00 [PATCH 0/3] introduce new evdev interface type WEN Pingbo
2015-11-27 10:00 ` [PATCH 1/3] input: evdev: introduce new evdev interface WEN Pingbo
     [not found]   ` <1448618432-32357-2-git-send-email-pingbo.wen-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-11-27 10:37     ` kbuild test robot
2015-11-27 10:00 ` [PATCH 2/3] input: evdev: add new ioctl EVIOCSIFTYPE / EVIOCGIFTYPE WEN Pingbo
2015-11-27 16:59   ` Arnd Bergmann
2015-11-29  9:19     ` Pingbo Wen
2015-11-27 10:00 ` [PATCH 3/3] uinput: convert input_event to input_value WEN Pingbo
     [not found] ` <1448618432-32357-1-git-send-email-pingbo.wen-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-11-27 16:58   ` Arnd Bergmann [this message]
2015-11-29  9:13     ` [PATCH 0/3] introduce new evdev interface type Pingbo Wen
2015-11-30 15:13       ` Arnd Bergmann
2015-12-01  8:34         ` Pingbo Wen
2015-12-01  8:34         ` Pingbo Wen
     [not found]           ` <CB4E5A6F-D514-4D3B-9C95-13A52C509EC9-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-12-01 10:47             ` Arnd Bergmann
2015-12-03 12:49               ` Pingbo Wen
     [not found]                 ` <1BB6B3AD-F547-49F8-886A-56EF80CE62FE-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-12-03 12:54                   ` [Y2038] " Arnd Bergmann
2015-12-03 12:56                     ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8705201.iaeQDTRocP@wuerfel \
    --to=arnd-r2ngtmty4d4@public.gmane.org \
    --cc=aksgarg1989-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=pingbo.wen-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=y2038-cunTk1MwBs8s++Sfvej+rw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).