From: Daniel Borkmann <daniel@iogearbox.net>
To: Arnd Bergmann <arnd@arndb.de>, David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: AF_PACKET mmap() v4...
Date: Thu, 05 Nov 2015 10:39:15 +0100 [thread overview]
Message-ID: <563B23C3.5070406@iogearbox.net> (raw)
In-Reply-To: <4931220.z2MFa8LzkQ@wuerfel>
On 11/05/2015 10:07 AM, Arnd Bergmann wrote:
> On Thursday 05 November 2015 00:04:14 David Miller wrote:
>> As part of fixing y2038 problems, Arnd is going to have to make a new
>> version fo the AF_PACKET mmap() tpacker descriptors in order to extend
>> the time values to 64-bit.
>>
>> So I want everyone to think about whether there are any other changes
>> we might want to make given that we have to make a v4 anyways.
>>
>> Particularly, I am rather certain that the buffer management could be
>> improved. Some have complained that v3 is kinda awkward to use and/or
>> suboptimal is various ways.
>
> I have taken a closer look at the actual timestamp data now, and noticed
> that we use __u32 for both tp_sec and ts_sec in the user visible data.
> This means that once we fix the internal implementation to use 64-bit
> timestamps, we actually won't overflow until 2106 because the 2038 overflow
> is only for signed 32-bit numbers as we have in 'struct timespec'.
>
> So the good news is that we can keep the existing v1 through v3 formats
> beyond 2038, but only as long as all user space that cares about the
> value also interprets it as unsigned.
Right, I was just about to ask that. So we could just make a union in
AF_PACKET's UAPI for a single 64-bit variable (as in ktime_t) to fix that.
Best,
Daniel
next prev parent reply other threads:[~2015-11-05 9:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-05 5:04 AF_PACKET mmap() v4 David Miller
2015-11-05 6:53 ` Richard Cochran
2015-11-05 8:14 ` Guy Harris
2015-11-05 15:32 ` David Miller
2015-11-05 9:07 ` Arnd Bergmann
2015-11-05 9:39 ` Daniel Borkmann [this message]
2015-11-05 11:38 ` Eric Dumazet
2015-11-05 12:56 ` Daniel Borkmann
2015-11-05 16:17 ` Eric Dumazet
2015-11-05 22:56 ` Daniel Borkmann
2015-11-06 11:34 ` Daniel Borkmann
2015-11-08 2:19 ` Alexei Starovoitov
2015-11-08 4:27 ` John Fastabend
2015-11-09 10:54 ` Daniel Borkmann
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=563B23C3.5070406@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.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).