[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4] linux-user: fix to handle variably sized SIO
From: |
Arnd Bergmann |
Subject: |
Re: [Qemu-devel] [PATCH v4] linux-user: fix to handle variably sized SIOCGSTAMP with new kernels |
Date: |
Sun, 14 Jul 2019 13:33:28 +0200 |
On Sun, Jul 14, 2019 at 12:41 PM Richard Henderson
<address@hidden> wrote:
>
> On 7/12/19 3:55 PM, Arnd Bergmann wrote:
> > glibc will have to create a definition that matches the kernel, which uses
> >
> > struct __kernel_timespec {
> > __s64 tv_sec;
> > __s64 tv_nsec;
> > };
> >
> > As posix requires tv_nsec to be 'long', you need padding between
> > tv_sec and tv_nsec to have a libc definition matching the kernel's
> > binary layout.
>
> Yes, but that's glibc's lookout. All qemu cares about emulating is the kernel
> interface. So I think Laurent is right here, in that two reads handle the
> above structure just fine.
But that only works if the structure defined by qemu matches the kernel's.
The structure that Laurent proposed
struct target_timeval64 {
abi_llong tv_sec;
abi_long tv_usec;
};
is not compatible with the kernel or the glibc structure.
Arnd
- [Qemu-devel] [PATCH v4] linux-user: fix to handle variably sized SIOCGSTAMP with new kernels, Laurent Vivier, 2019/07/11
- Re: [Qemu-devel] [PATCH v4] linux-user: fix to handle variably sized SIOCGSTAMP with new kernels, no-reply, 2019/07/11
- Re: [Qemu-devel] [PATCH v4] linux-user: fix to handle variably sized SIOCGSTAMP with new kernels, Arnd Bergmann, 2019/07/11
- Re: [Qemu-devel] [PATCH v4] linux-user: fix to handle variably sized SIOCGSTAMP with new kernels, Laurent Vivier, 2019/07/12
- Re: [Qemu-devel] [PATCH v4] linux-user: fix to handle variably sized SIOCGSTAMP with new kernels, Arnd Bergmann, 2019/07/12
- Re: [Qemu-devel] [PATCH v4] linux-user: fix to handle variably sized SIOCGSTAMP with new kernels, Laurent Vivier, 2019/07/12
- Re: [Qemu-devel] [PATCH v4] linux-user: fix to handle variably sized SIOCGSTAMP with new kernels, Arnd Bergmann, 2019/07/12
- Re: [Qemu-devel] [PATCH v4] linux-user: fix to handle variably sized SIOCGSTAMP with new kernels, Laurent Vivier, 2019/07/12
- Re: [Qemu-devel] [PATCH v4] linux-user: fix to handle variably sized SIOCGSTAMP with new kernels, Arnd Bergmann, 2019/07/12
- Re: [Qemu-devel] [PATCH v4] linux-user: fix to handle variably sized SIOCGSTAMP with new kernels, Richard Henderson, 2019/07/14
- Re: [Qemu-devel] [PATCH v4] linux-user: fix to handle variably sized SIOCGSTAMP with new kernels,
Arnd Bergmann <=
- Re: [Qemu-devel] [PATCH v4] linux-user: fix to handle variably sized SIOCGSTAMP with new kernels, Laurent Vivier, 2019/07/14
Re: [Qemu-devel] [PATCH v4] linux-user: fix to handle variably sized SIOCGSTAMP with new kernels, no-reply, 2019/07/12