Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1291196ybl; Fri, 10 Jan 2020 15:43:14 -0800 (PST) X-Google-Smtp-Source: APXvYqw52z0YC/rFeioiAq0hgEXo8Js8otVa91HQYGYHmx0XJ+AkGLwtWRqQWWHBknmPxtxOUO2+ X-Received: by 2002:a9d:3cf:: with SMTP id f73mr4877428otf.11.1578699793961; Fri, 10 Jan 2020 15:43:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578699793; cv=none; d=google.com; s=arc-20160816; b=MaJG1v1PkSqYEKlBsXf0wVfl9DJOWvqhTRPhlV3LO38oToPgtanW2tbo5/DLmAg1m0 aedlqYCXh5q3t7Ne9N9N4wehQhS1C7tbPRbuoQbHVahI0uv5FeWRcYtiDWl+kTY6/Zwc vXHTA0L3LwxjZeymu0NHcoubCe3a3eElqsJ5Koq+1HESUrAT/9bqfdV1U73AHagknyFu KAGXqIJRBT3tTjY/nLhOBleeCaAjGBcrvn9DQqwV8hx6MwYiM08Aa8cdMjvVu7gZCApe qLURNWEFCxShZjzBSaOz3J7XoheMCJvi9e35u0iXJLd+mGdMIkazczMUKfVS+88ffxs4 j6aA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=OaX7J08p19Gq+/r+VW6GubkFXTcObl0z9ki8OcA6nVQ=; b=iEqSV1HlDxVBPhPhmUFJf1JPCtCcfJ2QJtMRVgQNaJz7/57sqLzOCDbNw8Z1sgmuJs w9BNbjlc+y9VKA8m4D1SjFhhV03xwdMcI9J8FXCLS3A8sqVelpZGPrUAtMDVHX5G89xd aSt2xkRIoAcWLH3NeQ6FIIu04LZhzYdfuRb3eWl9huQFektZ5vPjztSLJ02IpHDnl494 AhgHTBPUKzWHb28A8ysZj5k7waXP1ZmuBkMZetNiOzA3ODS0PEJNSn6iBAcp3hnWCuMk MsX9AQN73hpsMSwag71mbx2xy6NhGRvQ1myZrSwqOIAm1Hfj2O9TTlVobW5COtJ2hhH6 NS0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-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 p184si2070701oib.144.2020.01.10.15.43.02; Fri, 10 Jan 2020 15:43:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727593AbgAJXm7 convert rfc822-to-8bit (ORCPT + 99 others); Fri, 10 Jan 2020 18:42:59 -0500 Received: from c.mail.sonic.net ([64.142.111.80]:50374 "EHLO c.mail.sonic.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727608AbgAJXm7 (ORCPT ); Fri, 10 Jan 2020 18:42:59 -0500 Received: from [10.0.2.187] (96-74-112-17-static.hfc.comcastbusiness.net [96.74.112.17] (may be forged)) (authenticated bits=0) by c.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id 00ANWPe0014404 (version=TLSv1.2 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Fri, 10 Jan 2020 15:32:25 -0800 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.40.2.2.4\)) Subject: Re: [PATCH] hcidump: add support for time64 based libc From: Guy Harris In-Reply-To: Date: Fri, 10 Jan 2020 15:32:24 -0800 Cc: Rich Felker , Bluez mailing list , y2038 Mailman List , Johan Hedberg , Linux Kernel Mailing List , Deepa Dinamani Content-Transfer-Encoding: 8BIT Message-Id: <0BF859F5-AA95-4941-A80D-7D33F7AC3636@alum.mit.edu> References: <20200110204903.3495832-1-arnd@arndb.de> <20200110210512.GB30412@brightrain.aerifal.cx> To: Arnd Bergmann X-Mailer: Apple Mail (2.3608.40.2.2.4) X-Sonic-CAuth: UmFuZG9tSVZfzRQnWvZjU7z+oCr5uoYP1bTOtA3Pmun4SpvjUHajIkrSUR9AvHwPE0H9mnMxZLfsnA5qFsdc26xnraVEakyT X-Sonic-ID: C;+BkWdQE06hGJtCGeTRzYKg== M;Yh95dQE06hGJtCGeTRzYKg== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org On Jan 10, 2020, at 1:19 PM, Arnd Bergmann wrote: > On Fri, Jan 10, 2020 at 10:05 PM Rich Felker wrote: >> >> On Fri, Jan 10, 2020 at 09:49:03PM +0100, Arnd Bergmann wrote: >>> musl is moving to a default of 64-bit time_t on all architectures, >>> glibc will follow later. This breaks reading timestamps through cmsg >>> data with the HCI_TIME_STAMP socket option. >>> >>> Change both copies of hcidump to work on all architectures. This also >>> fixes x32, which has never worked, and carefully avoids breaking sparc64, >>> which is another special case. >> >> Won't it be broken on rv32 though? Based on my (albeit perhaps >> incomplete) reading of the thread, I think use of HCI_TIME_STAMP >> should just be dropped entirely in favor of using SO_TIMESTAMPNS -- my >> understanding was that it works with bluetooth sockets too. > > All 32-bit architectures use old_timeval32 timestamps in the kernel > here, even rv32 and x32. As a rule, we keep the types bug-for-bug > compatible between architectures and fix them all at the same time. > > Changing hcidump to SO_TIMESTAMPNS would work as well, but > that is a much bigger change and I don't know how to test that. If so, maybe I'll just do that for libpcap. Libpcap *does* have an API to request capturing with nanoseconds in tv_usec (and I plan to give it pcapng-flavored APIs to deliver higher-resolution time stamps, as well as metadata such as "incoming" vs. "outgoing", as well).