Use of __kernel_timespec in userspace genetlink API
rcwhelan at gmail.com
Tue Apr 23 01:35:33 CEST 2019
Sorry to be dense, but given commit c870c7a; the timespec struct will be 16
bytes in size, regardless of the arch? 32/64bit x86 and 32/64bit ARM?
On Mon, Apr 22, 2019 at 2:15 PM Tharre <tharre3 at gmail.com> wrote:
> On 04/18, Matt Layher wrote:
> > My C experience is very limited, and I have no experience working on C
> > within the kernel, but is exposing a "__kernel*" type to userspace a
> > procedure? I would have expected to see a regular timespec from
> > linux/time.h, or perhaps a timespec64 in its place.
> There is no timespec64 defined anywhere in include/linux, and it can't
> be a normal timespec because of the Year 2038 problem. And despite it's
> prefix, __kernel_timespec is defined in include/linux/time.h.
> > I can do some slightly more intelligent checking to fix the current issue
> > with my library, but I wanted to check in and confirm that this API
> > is correct.
> The change from struct timespec to struct __kernel_timespec happened in
> commit c870c7a so I'm guessing it's intentional.
> Hope that helps.
>  http://git.zx2c4.com/WireGuard/commit/?id=c870c7a
> PGP fingerprint: 42CE 7698 D6A0 6129 AA16 EF5C 5431 BDE2 C8F0 B2F4
> WireGuard mailing list
> WireGuard at lists.zx2c4.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the WireGuard