Received: by 10.192.165.148 with SMTP id m20csp369645imm; Wed, 25 Apr 2018 00:25:38 -0700 (PDT) X-Google-Smtp-Source: AIpwx48iaWcidpj+N9ChatAPtXsl1VCKGgf8RfkbHGBk0ogE1UrNxbcLzvnME6rdqFXv6l0OKqbQ X-Received: by 10.101.97.173 with SMTP id i13mr22730861pgv.449.1524641138637; Wed, 25 Apr 2018 00:25:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524641138; cv=none; d=google.com; s=arc-20160816; b=AzNAwm0cNVKhGWbultekLjIKQLqGsP5T6CRLdoPfj7e+jbOLSlImUu5uozkwccrQrH tFNWk7YEVWpH7KE8jum4RUZcMHg+ACDkLOcLsCv/3bxr62vLS1rIshwmH4lHNsDmu+BE 9RoV2Gq3td5dHcjk7QmBLbSLUDySgqPCbPEE0dyonc8d+O0oKoc7lehAYS+RKx4M3QdK xTi7rVjrZA8xEWogEe3g1K7VvTD31NwDcXMhZE25VaWtduOfzv846GfSrGBmWlJ1m/bV k8zolc7J/HuPtHBGHzqgto8rtEsjm6k3lZwJcKHv7NUE4FnrvTu9x+03FnNBsNzZLzBv T6pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature:dkim-filter :arc-authentication-results; bh=jOOKXBP4AkhUQf7TUJzMEm1Fe4pRzuqjMHOR33pdnf4=; b=fAtgxvoCZvCa98wBimJyWI9N16wL1tCDQneuiFmiLObzqJHZyLKXEH3Ttle2fLIRhJ X9flctXk69yIBtLVhar4taEWNfrFXPeKrMX9kJvWcIUwJoOUg+D9xxULs5RTUcGxDofz iDl3Fuv3tdRfEvQNfO8qC3h66HnerzecJqh0YOsFG1o2eBsHAmG1lcUGHSaxROugPqvj KDiXxpm/3DgEIGPecIYF6u2hdarbDi0Px0G4BXn3l6+/BCPkZpGso9tJYAT+ortxfLKt TyC2u/YQnOT6yq2qm09aF03Obr/gmARX5CPhP6TgT/bX0QiHuMfyWR9JbNr+0Rn2lFD+ GA6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@perex.cz header.s=default header.b=i29dBeQl; 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 w8si12777419pgv.276.2018.04.25.00.25.23; Wed, 25 Apr 2018 00:25:38 -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=pass header.i=@perex.cz header.s=default header.b=i29dBeQl; 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 S1751308AbeDYHYW (ORCPT + 99 others); Wed, 25 Apr 2018 03:24:22 -0400 Received: from mail1.perex.cz ([77.48.224.245]:39882 "EHLO mail1.perex.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750929AbeDYHYV (ORCPT ); Wed, 25 Apr 2018 03:24:21 -0400 Received: from mail1.perex.cz (localhost [127.0.0.1]) by smtp1.perex.cz (Perex's E-mail Delivery System) with ESMTP id 470DCA003F; Wed, 25 Apr 2018 09:24:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.perex.cz 470DCA003F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=perex.cz; s=default; t=1524641059; bh=jOOKXBP4AkhUQf7TUJzMEm1Fe4pRzuqjMHOR33pdnf4=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=i29dBeQld9K6iuiFt+LHT02GIzC+aXA1jTf1345a7GNpYdcBGB3su6qKM/o0BhEWH Fw4dvHCmU/PHvoEEhi5irq8b20Y/GyXd3wr/G1BDQ5luaxWw6UEjkE2znJDxu3Zrb9 VkgWW9/W1oGW/pWE8tSikd7fUnEL9ISd8W44G8uU= Received: from p50.perex-int.cz (unknown [192.168.100.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: perex) by mail1.perex.cz (Perex's E-mail Delivery System) with ESMTPSA; Wed, 25 Apr 2018 09:23:58 +0200 (CEST) Subject: Re: [PATCH 0/8] Fix year 2038 issue for sound subsystem To: Arnd Bergmann 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 References: <66b26dc6-9139-80cc-0b49-28ff68169b5c@perex.cz> From: Jaroslav Kysela Message-ID: <1b6a0710-7bc1-08d1-49a5-f1bed7bf3f84@perex.cz> Date: Wed, 25 Apr 2018 09:23:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dne 24.4.2018 v 15:37 Arnd Bergmann napsal(a): > 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. We have almost everything hidden in the alsa-lib code for the applications and there is the protocol versioning, so we can detect the changes easily and handle the new fields in the library. As you noted, the current code will be fine until 2038 even with my proposed change (which is more easy to be implemented in the kernel - less bloat) and there are 20 years to update alsa-lib remaining for the 32-bit systems. Only the binary compatibility for the older binaries should be taken into account. Also, you expect that tv_nsec will be changed to the 's64' type. Do you have that confirmed from the glibc developers? From the current specification, the tv_nsec type is 'long'. It may cause some binary compatibility issues, too. Thanks, Jaroslav -- Jaroslav Kysela Linux Sound Maintainer; ALSA Project; Red Hat, Inc.