lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 27 Oct 2016 16:12:54 -0700
From:   Dmitry Torokhov <dmitry.torokhov@...il.com>
To:     Deepa Dinamani <deepa.kernel@...il.com>
Cc:     linux-input@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Arnd Bergmann <arnd@...db.de>,
        y2038 Mailman List <y2038@...ts.linaro.org>,
        Peter Hutterer <peter.hutterer@...-t.net>,
        Benjamin Tissoires <benjamin.tissoires@...hat.com>,
        Jiri Kosina <jkosina@...e.com>,
        Hans de Goede <hdegoede@...hat.com>
Subject: Re: [PATCH v2 3/4] input: Deprecate real timestamps beyond year 2106

On Thu, Oct 27, 2016 at 03:25:43PM -0700, Deepa Dinamani wrote:
> >> 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?

I really do not see the point. I think we agree that the current
protocol is not working past 2038 and it does not seem we can fix it
transparently for the user. So we need to define new protocol and let
kernel and clients negotiate which one is used.

I am not concerned about in-kernel representation much as it does not
get stored anywhere so we can adjust it as needed without too much
effort.

> 
> 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?

It would depend largely on the scope.

Thanks.

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ