Received: by 10.192.165.148 with SMTP id m20csp4737493imm; Tue, 24 Apr 2018 07:39:17 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+44udggnsFh0B+ngsqPcVscj0RDVL7Rna6crGfgWlJ/l1Ef11HcF4/eOD+Y36Cvo2rh7IY X-Received: by 2002:a17:902:6ac7:: with SMTP id i7-v6mr24605922plt.374.1524580756993; Tue, 24 Apr 2018 07:39:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524580756; cv=none; d=google.com; s=arc-20160816; b=tUhizDm512wTYEsZ+fSOeJjPgfj961vhfBgwKw8RjzZSrR+pRVDp4KrJIdGEh3fdsx +9WnHIZ1vDwyUvDxm2AP80jeHf7TVpb9Sm0m99pT3a8e7Dsi1J1zKDTAtepi4kC4ttlO /2+jnEx92CA8rHP7q9L8ZTQxQIQUydFBnoPttcZeKYmhsqsw/slln6YGXUJK784GScle 4stQmAaw3l2Ae2FBY7FVHWN+dj0/36H6Pwwb5azbrCpHMiUv/EZ8VWAueR5A2RJeRFDT 4g7XUdO2ISHz9IZucCBoBzMuAYxG+Jze3JVIHwkZKe1NKgQsJzXBT/e2FOfHMXsGcwet hdbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=2nojdLCTlScrfxMWbNiJmZSjlJRBS2W53JwAlGgPkn8=; b=Bfu3SHhMa91XwHueaL7v+hOjLX7Eesx2ykn8gHENgeFxC6tba5yxdiO8yEwFCmHWNP poifAw7U2DxBxcS3A2FQVD35NUdh1+C18QZF9xR5uZe/zeEQZ/NrK0JadrVA21lB6WJ9 FrGLDZngzdk+n41lUrA/qKKapyMw0XyONh1qsBULU4gW8PMY6eUqwB+XiiZsH4PPY75U U4c2e4W3146vp/+vMmPdWg+yqZWUNxBuePBSZO3pxnLoiDn5ISqRApCmUYJMcNYwUa/m fj6cpd3Sc7xUFTG9UxaG76yqvWLH3ZjJ7xnbe5a9sg3OucxikpH4JQnFpx8iPHpeHZOq 6tVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=R1qHU3pB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t21si13469862pfi.221.2018.04.24.07.39.02; Tue, 24 Apr 2018 07:39:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=R1qHU3pB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934655AbeDXNhd (ORCPT + 99 others); Tue, 24 Apr 2018 09:37:33 -0400 Received: from mail-qt0-f196.google.com ([209.85.216.196]:41462 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934178AbeDXNha (ORCPT ); Tue, 24 Apr 2018 09:37:30 -0400 Received: by mail-qt0-f196.google.com with SMTP id d3-v6so22040124qth.8 for ; Tue, 24 Apr 2018 06:37:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=2nojdLCTlScrfxMWbNiJmZSjlJRBS2W53JwAlGgPkn8=; b=R1qHU3pBzDbp5CLhxfFEioDKd+qy5VWWB/+2AObdEkWamlRr1zwQN1Jhka7wIxHryZ ZkCtf01p+jF39R9ZxOC1IHfjHYqC6DzTraYbf7E6ByDgbS/ztZnLbbpG8MfcPSwDCyI/ F3gx/DdeCntIkAizSe+KYJ/mcv3bh1rXFLwGV3avsYoRpsvQWgi08aRADiVjXfaNn/gu kDhgn3Cje7QSvUAAIlNZ/f0xPA8cOE3k8QQ8vI9nvhP+y+SdVvWBPHO7Bgnx9+m78j7S dBT2aorEgMmDnOnPouXelwtTKFLErDeaCYA1fEVmRAg5//Hh/QtSFPLBZrQ6sT7CJiFW F04g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=2nojdLCTlScrfxMWbNiJmZSjlJRBS2W53JwAlGgPkn8=; b=JP86mThEJ17ZfcIWUMdjhxcyAM2HwmDIOjihFCIjWwwjNIG+kr4m0pFAQjRgYQ+2c3 mQ/bEJrGB3dKRpW1ByqeOP6BdjOtUgSQB63h/wPu9adLLA2sj2eCaBRwSXbjL3DjOz6/ hTxNtlvP2AEvbERNtXNXbVSzeNIQm8YRBkPiFOBMl21d3eWEEkkPq5bXSA9WkGAGs7bb h//b93Jj9Kw6pJmmleRzHtrDxQXHclaxI/cyAkkqbt7d/Z3ka0oGlWVJ6U9bBl5QtG8s oLJbfmMvwXrESzOsWaTuGHcrNKhGwOOvjXGYUQUAbZK4oZ2cgvfteXgYc2sKLchCcdee WUTg== X-Gm-Message-State: ALQs6tBz9+fzfAw3SGSzAxOvPg78qvotBOpTnQZJ8Mp4N7yzVPERtKtQ xhA6PfPlTe2avt6hzWcfrxjR79ul1ecqU9jB/Xw= X-Received: by 2002:ac8:119a:: with SMTP id d26-v6mr26721076qtj.389.1524577049446; Tue, 24 Apr 2018 06:37:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.185.25 with HTTP; Tue, 24 Apr 2018 06:37:28 -0700 (PDT) In-Reply-To: <66b26dc6-9139-80cc-0b49-28ff68169b5c@perex.cz> References: <66b26dc6-9139-80cc-0b49-28ff68169b5c@perex.cz> From: Arnd Bergmann Date: Tue, 24 Apr 2018 15:37:28 +0200 X-Google-Sender-Auth: fPBAGge0nKgKHjIA3BMvRaiMi_0 Message-ID: Subject: Re: [PATCH 0/8] Fix year 2038 issue for sound subsystem To: Jaroslav Kysela Cc: Baolin Wang , Takashi Iwai , Liam Girdwood , Mark Brown , Takashi Sakamoto , Ingo Molnar , SF Markus Elfring , Dan Carpenter , jeeja.kp@intel.com, Vinod Koul , Guneshwor Singh , subhransu.s.prusty@intel.com, Bhumika Goyal , gudishax.kranthikumar@intel.com, Naveen M , hardik.t.shah@intel.com, Arvind Yadav , Fabian Frederick , alsa-devel@alsa-project.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 24, 2018 at 3:29 PM, Jaroslav Kysela wrote: > Dne 24.4.2018 v 14:06 Baolin Wang napsal(a): >> 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. > > Thanks for your patchset. A few comments: > > It might be more nice to reuse the existing structures and put > timespec64 to the reserved field and duplicate information (with the > 32-bit wrapping for the old fields). It means that we do not need new > ioctls and old libraries will be fine. The current approach is intended to make any user space work without source-level changes, i.e. you can still build an old alsa-lib package against a new glibc as long as you have the latest kernel headers (which the glibc requires for using 64-bit time_t). If we try to extend the structures in a different way, that requires user space changes, and existing source code would silently break on a future glibc. IMHO changing the source-level interface should only be done as a last resort for y2038. Note that most of the work is not required to keep working beyond 2038, but actually is required just to keep working with an updated glibc that redefines time_t to 64 bit. The audio timestamps should be in CLOCK_MONOTONIC for new user space anyway, and that doesn't overflow a 32-bit type. > It may make sense to define private snd_timespec32 and snd_timespec64 > with s32/s64 types instead separate sec/usec fields. Right, I have some ideas there as well as I saw one remaining issue in my patch for the status mmap: when building a program with 64-bit time_t, we still see a copy of the old structure but with an\ impossible layout. ARnd