Skip to content

RFC Fix year 2038 issue for sound subsystem

Baolin Wang alsa-devel lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest7 patches 12 repliesIn review
  2. v1 RFC7 patches 24 repliesSuperseded

Changes in v2 from the cover letter

- Flat all structues to make them more clear.
- Re-modify the convertion for struct snd_timer_tread.
- Use same coding style when converting struct snd_rawmidi_status.
- Use struct snd_timer_user_status64 in compat mode directly when converting struct snd_timer_status.
- Add #ifdef __KERNEL__ when converting struct snd_ctl_elem_value.
- Re-modify the convertion for struct snd_pcm_sync_ptr.
- Fix some building errors.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7sound: Replace timespec with timespec64include/sound/pcm.h include/sound/timer.h sound/core/pcm_lib.c +4 more+57 -490 replies
2/7sound: core: Avoid using timespec for struct snd_pcm_statusinclude/sound/pcm.h sound/core/pcm.c sound/core/pcm_compat.c +1 more+319 -862 replies
3/7sound: core: Avoid using timespec for struct snd_rawmidi_statussound/core/rawmidi.c sound/core/rawmidi_compat.c+168 -340 replies
4/7sound: core: Avoid using timespec for struct snd_timer_statussound/core/timer.c sound/core/timer_compat.c+62 -570 replies
5/7uapi: sound: Avoid using timespec for struct snd_ctl_elem_valueinclude/uapi/sound/asound.h+6 -21 reply
6/7sound: core: Avoid using timespec for struct snd_pcm_sync_ptrinclude/sound/pcm.h sound/core/pcm.c sound/core/pcm_compat.c +2 more+336 -870 replies
7/7sound: core: Avoid using timespec for struct snd_timer_treadinclude/uapi/sound/asound.h sound/core/timer.c sound/core/timer_compat.c+157 -379 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [RFC PATCH v2 0/7] Fix year 2038 issue for sound subsystem

Since many structures will use timespec type variables to record time stamp in uapi/asound.h, which are not year 2038 safe on 32bit system. This patchset tries to introduce new structures removing timespec type to compatible native mode and compat mode.

Moreover this patchset also converts the internal structrures to use timespec64 type and related APIs.

Changes since v1:
- Flat all structues to make them more clear.
- Re-modify the convertion for struct snd_timer_tread.
- Use same coding style when converting struct snd_rawmidi_status.
- Use struct snd_timer_user_status64 in compat mode directly when converting struct snd_timer_status.
- Add #ifdef __KERNEL__ when converting struct snd_ctl_elem_value.
- Re-modify the convertion for struct snd_pcm_sync_ptr.
- Fix some building errors.

Appreciated for any comments, especially for patch6 which I am not sure if it is correct.

Baolin Wang (7):
sound: Replace timespec with timespec64
sound: core: Avoid using timespec for struct snd_pcm_status
sound: core: Avoid using timespec for struct snd_rawmidi_status
sound: core: Avoid using timespec for struct snd_timer_status
uapi: sound: Avoid using timespec for struct snd_ctl_elem_value
sound: core: Avoid using timespec for struct snd_pcm_sync_ptr
sound: core: Avoid using timespec for struct snd_timer_tread

 include/sound/pcm.h               |  126 +++++++++-
 include/sound/timer.h             |    4 +-
 include/uapi/sound/asound.h       |   19 +-
 sound/core/pcm.c                  |   20 +-
 sound/core/pcm_compat.c           |  469 ++++++++++++++++++++++++++++---------
 sound/core/pcm_lib.c              |   33 ++-
 sound/core/pcm_native.c           |  220 +++++++++++++----
 sound/core/rawmidi.c              |   81 ++++++-
 sound/core/rawmidi_compat.c       |  121 +++++++---
 sound/core/timer.c                |  253 ++++++++++++++++----
 sound/core/timer_compat.c         |   67 ++----
 sound/pci/hda/hda_controller.c    |   10 +-
 sound/soc/intel/skylake/skl-pcm.c |    4 +-
 13 files changed, 1090 insertions(+), 337 deletions(-)
Signature · 1 line
1.7.9.5