Re: [Qemu-devel] [PATCH v4] linux-user: fix to handle variably sized SIOCGSTAMP with new kernels

2019-07-14 Thread Laurent Vivier
Le 14/07/2019 à 13:33, Arnd Bergmann a écrit : > On Sun, Jul 14, 2019 at 12:41 PM Richard Henderson > 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; >>>

Re: [Qemu-devel] [PATCH v4] linux-user: fix to handle variably sized SIOCGSTAMP with new kernels

2019-07-14 Thread Arnd Bergmann
On Sun, Jul 14, 2019 at 12:41 PM Richard Henderson 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_

Re: [Qemu-devel] [PATCH v4] linux-user: fix to handle variably sized SIOCGSTAMP with new kernels

2019-07-14 Thread Richard Henderson
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 li

Re: [Qemu-devel] [PATCH v4] linux-user: fix to handle variably sized SIOCGSTAMP with new kernels

2019-07-12 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190711173131.6347-1-laur...@vivier.eu/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190711173131.6347-1-laur...@vivier.eu Type: series Subject: [Qemu-devel] [PATCH v4] linux-user: fix to

Re: [Qemu-devel] [PATCH v4] linux-user: fix to handle variably sized SIOCGSTAMP with new kernels

2019-07-12 Thread Arnd Bergmann
On Fri, Jul 12, 2019 at 3:50 PM Laurent Vivier wrote: > Le 12/07/2019 à 15:36, Arnd Bergmann a écrit : > >> We don't do memcopy() but we set each field one by one, so the padding > >> doesn't > >> seem needed if we define correctly the user structure: > >> > >> struct target_timeval64 { > >>

Re: [Qemu-devel] [PATCH v4] linux-user: fix to handle variably sized SIOCGSTAMP with new kernels

2019-07-12 Thread Laurent Vivier
Le 12/07/2019 à 15:36, Arnd Bergmann a écrit : > On Fri, Jul 12, 2019 at 3:23 PM Laurent Vivier wrote: >> >> Le 12/07/2019 à 14:47, Arnd Bergmann a écrit : ... >>> No, you don't need to swap. The difference is only in the padding. >>> Since the kernel uses a 64/64 structure here, and user space >>

Re: [Qemu-devel] [PATCH v4] linux-user: fix to handle variably sized SIOCGSTAMP with new kernels

2019-07-12 Thread Arnd Bergmann
On Fri, Jul 12, 2019 at 3:23 PM Laurent Vivier wrote: > > Le 12/07/2019 à 14:47, Arnd Bergmann a écrit : > > On Fri, Jul 12, 2019 at 2:17 PM Laurent Vivier wrote: > >> > >> Le 11/07/2019 à 23:05, Arnd Bergmann a écrit : > >>> On Thu, Jul 11, 2019 at 7:32 PM Laurent Vivier wrote: > >>> > > >

Re: [Qemu-devel] [PATCH v4] linux-user: fix to handle variably sized SIOCGSTAMP with new kernels

2019-07-12 Thread Laurent Vivier
Le 12/07/2019 à 14:47, Arnd Bergmann a écrit : > On Fri, Jul 12, 2019 at 2:17 PM Laurent Vivier wrote: >> >> Le 11/07/2019 à 23:05, Arnd Bergmann a écrit : >>> On Thu, Jul 11, 2019 at 7:32 PM Laurent Vivier wrote: >>> Notes: v4: [lv] timeval64 and timespec64 are { long long , l

Re: [Qemu-devel] [PATCH v4] linux-user: fix to handle variably sized SIOCGSTAMP with new kernels

2019-07-12 Thread Arnd Bergmann
On Fri, Jul 12, 2019 at 2:17 PM Laurent Vivier wrote: > > Le 11/07/2019 à 23:05, Arnd Bergmann a écrit : > > On Thu, Jul 11, 2019 at 7:32 PM Laurent Vivier wrote: > > > >> > >> Notes: > >> v4: [lv] timeval64 and timespec64 are { long long , long } > > > >> > >> +STRUCT(timeval64, TYPE_LONGLON

Re: [Qemu-devel] [PATCH v4] linux-user: fix to handle variably sized SIOCGSTAMP with new kernels

2019-07-12 Thread Laurent Vivier
Le 11/07/2019 à 23:05, Arnd Bergmann a écrit : > On Thu, Jul 11, 2019 at 7:32 PM Laurent Vivier wrote: > >> >> Notes: >> v4: [lv] timeval64 and timespec64 are { long long , long } > >> >> +STRUCT(timeval64, TYPE_LONGLONG, TYPE_LONG) >> + >> +STRUCT(timespec64, TYPE_LONGLONG, TYPE_LONG) >> +

Re: [Qemu-devel] [PATCH v4] linux-user: fix to handle variably sized SIOCGSTAMP with new kernels

2019-07-11 Thread Arnd Bergmann
On Thu, Jul 11, 2019 at 7:32 PM Laurent Vivier wrote: > > Notes: > v4: [lv] timeval64 and timespec64 are { long long , long } > > +STRUCT(timeval64, TYPE_LONGLONG, TYPE_LONG) > + > +STRUCT(timespec64, TYPE_LONGLONG, TYPE_LONG) > + This still doesn't look right, see my earlier comment about

Re: [Qemu-devel] [PATCH v4] linux-user: fix to handle variably sized SIOCGSTAMP with new kernels

2019-07-11 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190711173131.6347-1-laur...@vivier.eu/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Subject: [Qemu-devel] [PATCH v4] linux-user: fix to handle variably sized SIOCGSTAMP with new kernels

[Qemu-devel] [PATCH v4] linux-user: fix to handle variably sized SIOCGSTAMP with new kernels

2019-07-11 Thread Laurent Vivier
From: Daniel P. Berrangé The SIOCGSTAMP symbol was previously defined in the asm-generic/sockios.h header file. QEMU sees that header indirectly via sys/socket.h In linux kernel commit 0768e17073dc527ccd18ed5f96ce85f9985e9115 the asm-generic/sockios.h header no longer defines SIOCGSTAMP. Instead