[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 08/10] linux-user: Fix target FS_IOC_GETFLAGS and FS_
From: |
riku . voipio |
Subject: |
[Qemu-devel] [PULL 08/10] linux-user: Fix target FS_IOC_GETFLAGS and FS_IOC_SETFLAGS numbers |
Date: |
Wed, 18 Oct 2017 15:33:22 +0300 |
From: Peter Maydell <address@hidden>
We were defining TARGET_FS_IOC_GETFLAGS and TARGET_FS_IOC_SETFLAGS
using the host 'long' type in the size field, which meant that
they had the wrong values if the host and guest had different
sized longs. Switch to abi_long instead.
This fixes a bug where these ioctls don't work on 32-bit guests
on 64-bit hosts (and makes the LTP test 'setxattr03' pass
where it did not previously.)
Reported-by: pgndev <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Signed-off-by: Riku Voipio <address@hidden>
---
linux-user/syscall_defs.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index 6e2287e918..447915cf80 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -1101,8 +1101,8 @@ struct target_pollfd {
/* Note that the ioctl numbers claim type "long" but the actual type
* used by the kernel is "int".
*/
-#define TARGET_FS_IOC_GETFLAGS TARGET_IOR('f', 1, long)
-#define TARGET_FS_IOC_SETFLAGS TARGET_IOW('f', 2, long)
+#define TARGET_FS_IOC_GETFLAGS TARGET_IOR('f', 1, abi_long)
+#define TARGET_FS_IOC_SETFLAGS TARGET_IOW('f', 2, abi_long)
#define TARGET_FS_IOC_FIEMAP TARGET_IOWR('f',11,struct fiemap)
--
2.14.2
- [Qemu-devel] [PULL 00/10] linux-user update for 2.11, riku . voipio, 2017/10/18
- [Qemu-devel] [PULL 03/10] linux-user: remove duplicate break in syscall, riku . voipio, 2017/10/18
- [Qemu-devel] [PULL 05/10] tcg: Fix off-by-one in assert in page_set_flags, riku . voipio, 2017/10/18
- [Qemu-devel] [PULL 01/10] linux-user: fix O_TMPFILE handling, riku . voipio, 2017/10/18
- [Qemu-devel] [PULL 02/10] target/m68k, linux-user: manage FP registers in ucontext, riku . voipio, 2017/10/18
- [Qemu-devel] [PULL 04/10] linux-user: Allow -R values up to 0xffff0000 for 32-bit ARM guests, riku . voipio, 2017/10/18
- [Qemu-devel] [PULL 07/10] linux-user/sh4: Reduce TARGET_VIRT_ADDR_SPACE_BITS to 31, riku . voipio, 2017/10/18
- [Qemu-devel] [PULL 06/10] linux-user: Tidy and enforce reserved_va initialization, riku . voipio, 2017/10/18
- [Qemu-devel] [PULL 10/10] linux-user: Fix TARGET_MTIOCTOP/MTIOCGET/MTIOCPOS values, riku . voipio, 2017/10/18
- [Qemu-devel] [PULL 09/10] linux-user/main: support dfilter, riku . voipio, 2017/10/18
- [Qemu-devel] [PULL 08/10] linux-user: Fix target FS_IOC_GETFLAGS and FS_IOC_SETFLAGS numbers,
riku . voipio <=
- Re: [Qemu-devel] [PULL 00/10] linux-user update for 2.11, Peter Maydell, 2017/10/19
- Re: [Qemu-devel] [PULL 00/10] linux-user update for 2.11, no-reply, 2017/10/22