From: Arnd Bergmann <arnd@arndb.de>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: "Daniel P . Berrangé" <berrange@redhat.com>,
"Gerhard Stenzel" <gerhard.stenzel@de.ibm.com>,
"Riku Voipio" <riku.voipio@iki.fi>,
"Laurent Vivier" <laurent@vivier.eu>,
"Christian Ehrhardt" <christian.ehrhardt@canonical.com>,
qemu-devel@nongnu.org,
"Christian Borntraeger" <borntraeger@de.ibm.com>
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 [thread overview]
Message-ID: <CAK8P3a3L9e9X1-rODexx34EEs37zNK2qKXZRfZ+oi7eni_286Q@mail.gmail.com> (raw)
In-Reply-To: <ac90d2b2-83e8-6ad3-5dca-81e179edec00@linaro.org>
On Sun, Jul 14, 2019 at 12:41 PM Richard Henderson
<richard.henderson@linaro.org> 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
next prev parent reply other threads:[~2019-07-14 11:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-11 17:31 [Qemu-devel] [PATCH v4] linux-user: fix to handle variably sized SIOCGSTAMP with new kernels Laurent Vivier
2019-07-11 17:41 ` no-reply
2019-07-11 21:05 ` Arnd Bergmann
2019-07-12 12:17 ` Laurent Vivier
2019-07-12 12:47 ` Arnd Bergmann
2019-07-12 13:22 ` Laurent Vivier
2019-07-12 13:36 ` Arnd Bergmann
2019-07-12 13:47 ` Laurent Vivier
2019-07-12 13:55 ` Arnd Bergmann
2019-07-14 10:41 ` Richard Henderson
2019-07-14 11:33 ` Arnd Bergmann [this message]
2019-07-14 13:31 ` Laurent Vivier
2019-07-12 15:12 ` no-reply
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=CAK8P3a3L9e9X1-rODexx34EEs37zNK2qKXZRfZ+oi7eni_286Q@mail.gmail.com \
--to=arnd@arndb.de \
--cc=berrange@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=christian.ehrhardt@canonical.com \
--cc=gerhard.stenzel@de.ibm.com \
--cc=laurent@vivier.eu \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=riku.voipio@iki.fi \
/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).