linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Rich Felker <dalias@libc.org>
Cc: Bluez mailing list <linux-bluetooth@vger.kernel.org>,
	y2038 Mailman List <y2038@lists.linaro.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Deepa Dinamani <deepa.kernel@gmail.com>,
	Guy Harris <guy@alum.mit.edu>
Subject: Re: [PATCH] hcidump: add support for time64 based libc
Date: Fri, 10 Jan 2020 22:19:01 +0100	[thread overview]
Message-ID: <CAK8P3a2VONV2Z6rs=xpntJyzfX4W7YijqCFr-f-PNMm3g4zRyA@mail.gmail.com> (raw)
In-Reply-To: <20200110210512.GB30412@brightrain.aerifal.cx>

On Fri, Jan 10, 2020 at 10:05 PM Rich Felker <dalias@libc.org> 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.

     Arnd

  reply	other threads:[~2020-01-10 21:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-10 20:49 [PATCH] hcidump: add support for time64 based libc Arnd Bergmann
2020-01-10 21:05 ` Rich Felker
2020-01-10 21:19   ` Arnd Bergmann [this message]
2020-01-10 23:32     ` Guy Harris
2020-01-11 16:21       ` Arnd Bergmann
2020-01-10 23:30 ` Guy Harris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAK8P3a2VONV2Z6rs=xpntJyzfX4W7YijqCFr-f-PNMm3g4zRyA@mail.gmail.com' \
    --to=arnd@arndb.de \
    --cc=dalias@libc.org \
    --cc=deepa.kernel@gmail.com \
    --cc=guy@alum.mit.edu \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=y2038@lists.linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).