All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Blue Swirl <blauwirbel@gmail.com>,
	Riku Voipio <riku.voipio@iki.fi>,
	qemu-devel@nongnu.org, patches@linaro.org,
	Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH] linux-user: Fix incorrect TARGET_BLKBSZGET, TARGET_BLKBSZSET
Date: Tue, 24 Jul 2012 14:02:13 +0200	[thread overview]
Message-ID: <500E8EC5.6050806@suse.de> (raw)
In-Reply-To: <1343066720-21806-1-git-send-email-peter.maydell@linaro.org>

Am 23.07.2012 20:05, schrieb Peter Maydell:
> The definitions for the ioctl numbers TARGET_BLKBSZGET and
> TARGET_BLKBSZSET had the wrong size parameters (they are defined
> with size_t, not int, even though the ioctl implementations themselves
> read and write integers). Since commit 354a0008 we now have an
> ioctl wrapper definition for BLKBSZGET and so on an x86-64-to-x86-64
> linux-user binary we were triggering the mismatch warning in
> syscall_init().
> 
> Signed-off-by: Peter Maydell <peter.maydell>

Beep :)

> ---
>  linux-user/syscall_defs.h |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
> index a79b67d..0b239c4 100644
> --- a/linux-user/syscall_defs.h
> +++ b/linux-user/syscall_defs.h
> @@ -832,8 +832,8 @@ struct target_pollfd {
>  #define TARGET_BLKSECTGET TARGET_IO(0x12,103)/* get max sectors per request (ll_rw_blk.c) */
>  #define TARGET_BLKSSZGET  TARGET_IO(0x12,104)/* get block device sector size */
>  /* A jump here: 108-111 have been used for various private purposes. */
> -#define TARGET_BLKBSZGET  TARGET_IOR(0x12,112,int)
> -#define TARGET_BLKBSZSET  TARGET_IOW(0x12,113,int)
> +#define TARGET_BLKBSZGET  TARGET_IOR(0x12, 112, abi_ulong)
> +#define TARGET_BLKBSZSET  TARGET_IOW(0x12, 113, abi_ulong)
>  #define TARGET_BLKGETSIZE64 TARGET_IOR(0x12,114,abi_ulong)
>                                               /* return device size in bytes
>                                                  (u64 *arg) */

For the usual suspects this looks right.
But does abi_ulong correctly handle ppc64abi32 and sparc32plus? Or is
this inside some #ifdef block?

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  reply	other threads:[~2012-07-24 12:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-23 18:05 [Qemu-devel] [PATCH] linux-user: Fix incorrect TARGET_BLKBSZGET, TARGET_BLKBSZSET Peter Maydell
2012-07-24 12:02 ` Andreas Färber [this message]
2012-07-24 12:24   ` Peter Maydell
2012-08-06 13:02 ` 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=500E8EC5.6050806@suse.de \
    --to=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=blauwirbel@gmail.com \
    --cc=patches@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.