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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6aa760e5-390a-b7ba-62f1-dc01308031fa@perex.cz>
Date:   Thu, 26 Apr 2018 15:30:58 +0200
From:   Jaroslav Kysela <perex@...ex.cz>
To:     Arnd Bergmann <arnd@...db.de>, y2038@...ts.linaro.org,
        linux-kernel@...r.kernel.org
Cc:     tiwai@...e.com, lgirdwood@...il.com, broonie@...nel.org,
        o-takashi@...amocchi.jp, alsa-devel@...a-project.org,
        Baolin Wang <baolin.wang@...aro.org>
Subject: Re: [PATCH 0/4] ALSA: Fix year 2038 issue for sound subsystem,
 alternative

Dne 26.4.2018 v 14:44 Arnd Bergmann napsal(a):
> I've tried the suggestion from Jaroslaw, doing a minimal change to the
> UAPI headers to keep the existing binary interface. As he predicted,
> this is a much simpler set of kernel changes, but we will pay for that
> with added complexity in alsa-lib.
> 
> The first two patches in this series are taken from Baolin's patch
> set, with a small bugfix folded in to avoid a compile-time regression.
> 
> The other two patches are to redefine the UAPI and to deprecate
> the support for CLOCK_REALTIME time stamps, which we can no longer
> allow with user space that we expect to survive beyond 2038.
> 
> Overall, I'd still be happier with Baolin's approach since it allows
> us to keep compatiblity with CLOCK_REALTIME users and requires
> fewer changes in user space, but this would work as well.

Hi Arnd,

  Thanks for your work. I proposed a bit different implementation. Example:

struct snd_example {
  struct snd_native_timespec tstamp;
  ....
  u64 tstamp_sec64; /* use the reserved[] array for this */
};

  So tstamp contains the current 32-bit tv_sec/tv_nsec and the full
64-bit value is in tstamp_sec64. In this way, we can transfer any type
of the timespec64 values and it's backward compatible to retain the
binary compatibility. The protocol versions should be increased to let
the userspace know about the new 64-bit fields.

  The timer read protocol must be updated, because the stream will
change, so I am fine to add new ioctl (like originally proposed).

  The alsa-lib defines timespec only if posix defines are not set so
glibc's time.h does not define the timespec structure - it may be improved.

					Jaroslav

> 
> 	Arnd
> 
> Cc: Jaroslav Kysela <perex@...ex.cz>
> Cc: tiwai@...e.com
> Cc: lgirdwood@...il.com
> Cc: broonie@...nel.org
> Cc: o-takashi@...amocchi.jp
> Cc: y2038@...ts.linaro.org
> Cc: alsa-devel@...a-project.org
> Cc: linux-kernel@...r.kernel.org
> Cc: Baolin Wang <baolin.wang@...aro.org>
> 
> Arnd Bergmann (2):
>   ALSA: replace timespec types in uapi headers
>   ALSA: Deprecate CLOCK_REALTIME timestamps
> 
> Baolin Wang (2):
>   ALSA: Replace timespec with timespec64
>   ALSA: Avoid using timespec for struct snd_ctl_elem_value
> 
>  include/sound/asound.h            |  8 +++++
>  include/sound/pcm.h               | 22 +++++++-----
>  include/sound/timer.h             |  4 +--
>  include/uapi/sound/asound.h       | 53 +++++++++++++++++++++--------
>  sound/core/Kconfig                | 11 ++++++
>  sound/core/compat.h               | 11 ++++++
>  sound/core/pcm.c                  |  3 ++
>  sound/core/pcm_compat.c           | 70 ++++++++++++++++++++++-----------------
>  sound/core/pcm_lib.c              | 36 ++++++++++++--------
>  sound/core/pcm_native.c           | 25 ++++++++++----
>  sound/core/rawmidi_compat.c       | 12 +++----
>  sound/core/timer.c                | 28 ++++++++--------
>  sound/core/timer_compat.c         |  4 ++-
>  sound/pci/hda/hda_controller.c    | 14 +++++---
>  sound/soc/intel/skylake/skl-pcm.c |  4 +--
>  15 files changed, 203 insertions(+), 102 deletions(-)
>  create mode 100644 sound/core/compat.h
> 


-- 
Jaroslav Kysela <perex@...ex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ