qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Aleksandar Rikalo <arikalo@wavecomp.com>,
	Riku Voipio <riku.voipio@iki.fi>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Aleksandar Markovic <amarkovic@wavecomp.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Aurelien Jarno <aurelien@aurel32.net>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PULL 0/3] Linux user for 4.1 patches
Date: Thu, 18 Jul 2019 12:40:14 +0200	[thread overview]
Message-ID: <a1c7dda7-8a20-c712-686f-5648014ce643@vivier.eu> (raw)
In-Reply-To: <CAFEAcA8kMkRuqWt4_tv+ZH5NJ0-kidJ==2A_JdFbPhjYuS+XCQ@mail.gmail.com>

Le 18/07/2019 à 12:20, Peter Maydell a écrit :
> On Wed, 17 Jul 2019 at 15:55, Laurent Vivier <laurent@vivier.eu> wrote:
>>
>> The following changes since commit a1a4d49f60d2b899620ee2be4ebb991c4a90a026:
>>
>>   Merge remote-tracking branch 'remotes/philmd-gitlab/tags/pflash-next-20190716' into staging (2019-07-16 17:02:44 +0100)
>>
>> are available in the Git repository at:
>>
>>   git://github.com/vivier/qemu.git tags/linux-user-for-4.1-pull-request
>>
>> for you to fetch changes up to ad0bcf5d59f120d546be7a2c3590afc66eea0b01:
>>
>>   linux-user: check valid address in access_ok() (2019-07-17 09:02:51 +0200)
>>
>> ----------------------------------------------------------------
>> fix access_ok() to allow to run LTP on AARCH64,
>> fix SIOCGSTAMP with 5.2 kernel headers,
>> fix structure target_ucontext for MIPS
>>
>> ---------------------------------------------------------------
> 
> This causes 'make check-tcg' to produce new warnings from
> running the tests (x86-64 host):
> 
>   RUN     tests for x86_64
>   TEST    test-mmap (default) on x86_64
> ERROR: ioctl(IOCGSTAMP_NEW): target=0x80108906 host=0x8906
> ERROR: ioctl(IOCGSTAMPNS_NEW): target=0x80108907 host=0x8907
>   TEST    sha1 on x86_64
> ERROR: ioctl(IOCGSTAMP_NEW): target=0x80108906 host=0x8906
> ERROR: ioctl(IOCGSTAMPNS_NEW): target=0x80108907 host=0x8907
>   TEST    linux-test on x86_64
> ERROR: ioctl(IOCGSTAMP_NEW): target=0x80108906 host=0x8906
> ERROR: ioctl(IOCGSTAMPNS_NEW): target=0x80108907 host=0x8907
>   TEST    testthread on x86_64
> ERROR: ioctl(IOCGSTAMP_NEW): target=0x80108906 host=0x8906
> ERROR: ioctl(IOCGSTAMPNS_NEW): target=0x80108907 host=0x8907
>   TEST    test-x86_64 on x86_64
> ERROR: ioctl(IOCGSTAMP_NEW): target=0x80108906 host=0x8906
> ERROR: ioctl(IOCGSTAMPNS_NEW): target=0x80108907 host=0x8907
>   TEST    test-mmap (4096 byte pages) on x86_64
> ERROR: ioctl(IOCGSTAMP_NEW): target=0x80108906 host=0x8906
> ERROR: ioctl(IOCGSTAMPNS_NEW): target=0x80108907 host=0x8907

It comes from linux-user/syscall.c:

 6328         /* automatic consistency check if same arch */
 6329 #if (defined(__i386__) && defined(TARGET_I386) && defined(TARGET_ABI32)) || \
 6330     (defined(__x86_64__) && defined(TARGET_X86_64))
 6331         if (unlikely(ie->target_cmd != ie->host_cmd)) {
 6332             fprintf(stderr, "ERROR: ioctl(%s): target=0x%x host=0x%x\n",
 6333                     ie->name, ie->target_cmd, ie->host_cmd);
 6334         }
 6335 #endif

because of:

+  { TARGET_SIOCGSTAMP_OLD, SIOCGSTAMP, "IOCGSTAMP_OLD", IOC_R, \
+    do_ioctl_SIOCGSTAMP },
+  { TARGET_SIOCGSTAMPNS_OLD, SIOCGSTAMPNS, "IOCGSTAMPNS_OLD", IOC_R, \
+    do_ioctl_SIOCGSTAMPNS },
+  { TARGET_SIOCGSTAMP_NEW, SIOCGSTAMP, "IOCGSTAMP_NEW", IOC_R, \
+    do_ioctl_SIOCGSTAMP },
+  { TARGET_SIOCGSTAMPNS_NEW, SIOCGSTAMPNS, "IOCGSTAMPNS_NEW", IOC_R, \
+    do_ioctl_SIOCGSTAMPNS },

As the host_cmd is not used, the simplest way to fix that is

+  { TARGET_SIOCGSTAMP_OLD, TARGET_SIOCGSTAMP_OLD, "IOCGSTAMP_OLD", IOC_R, \
+    do_ioctl_SIOCGSTAMP },
+  { TARGET_SIOCGSTAMPNS_OLD, TARGET_SIOCGSTAMPNS_OLD, "IOCGSTAMPNS_OLD", IOC_R, \
+    do_ioctl_SIOCGSTAMPNS },
+  { TARGET_SIOCGSTAMP_NEW, TARGET_SIOCGSTAMP_NEW, "IOCGSTAMP_NEW", IOC_R, \
+    do_ioctl_SIOCGSTAMP },
+  { TARGET_SIOCGSTAMPNS_NEW, TARGET_SIOCGSTAMPNS_NEW, "IOCGSTAMPNS_NEW", IOC_R, \
+    do_ioctl_SIOCGSTAMPNS },

As SIOCGSTAMP_OLD and SIOCGSTAMP_NEW can be undefined on the host (and not needed 
because we always use SIOCGSTAMP and SIOCGSTAMPNS)

Thanks,
Laurent


  reply	other threads:[~2019-07-18 10:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-17 14:54 [Qemu-devel] [PULL 0/3] Linux user for 4.1 patches Laurent Vivier
2019-07-17 14:54 ` [Qemu-devel] [PULL 1/3] linux-user: Fix structure target_ucontext for MIPS Laurent Vivier
2019-07-17 14:54 ` [Qemu-devel] [PULL 2/3] linux-user: fix to handle variably sized SIOCGSTAMP with new kernels Laurent Vivier
2019-07-17 14:54 ` [Qemu-devel] [PULL 3/3] linux-user: check valid address in access_ok() Laurent Vivier
2019-07-18 10:20 ` [Qemu-devel] [PULL 0/3] Linux user for 4.1 patches Peter Maydell
2019-07-18 10:40   ` Laurent Vivier [this message]
2019-07-18 11:00     ` Peter Maydell
2019-07-18 11:10       ` Laurent Vivier
2019-07-18 11:26         ` Peter Maydell

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=a1c7dda7-8a20-c712-686f-5648014ce643@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=amarkovic@wavecomp.com \
    --cc=arikalo@wavecomp.com \
    --cc=aurelien@aurel32.net \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    --cc=rth@twiddle.net \
    /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).