From: Laurent Vivier <laurent@vivier.eu>
To: Aleksandar Markovic <aleksandar.markovic@rt-rk.com>,
qemu-devel@nongnu.org
Cc: amarkovic@wavecomp.com
Subject: Re: [PATCH v5 09/20] linux-user: Add support for FS_IOC_<GET|SET>VERSION ioctls
Date: Tue, 14 Jan 2020 15:21:27 +0100 [thread overview]
Message-ID: <6606362f-0dec-056c-30af-e61d7a9bdcb4@vivier.eu> (raw)
In-Reply-To: <1578947683-21011-10-git-send-email-aleksandar.markovic@rt-rk.com>
Le 13/01/2020 à 21:34, Aleksandar Markovic a écrit :
> From: Aleksandar Markovic <amarkovic@wavecomp.com>
>
> A very specific thing for these two ioctls is that their code
> implies that their third argument is of type 'long', but the
> kernel uses that argument as if it is of type 'int'. This anomaly
> is recognized also in commit 6080723 (linux-user: Implement
> FS_IOC_GETFLAGS and FS_IOC_SETFLAGS ioctls).
>
> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
> ---
> linux-user/ioctls.h | 2 ++
> linux-user/syscall_defs.h | 8 +++++---
> 2 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h
> index c6b9d6a..c44f42e 100644
> --- a/linux-user/ioctls.h
> +++ b/linux-user/ioctls.h
> @@ -138,6 +138,8 @@
>
> IOCTL(FS_IOC_GETFLAGS, IOC_R, MK_PTR(TYPE_INT))
> IOCTL(FS_IOC_SETFLAGS, IOC_W, MK_PTR(TYPE_INT))
> + IOCTL(FS_IOC_GETVERSION, IOC_R, MK_PTR(TYPE_INT))
> + IOCTL(FS_IOC_SETVERSION, IOC_W, MK_PTR(TYPE_INT))
>
> #ifdef CONFIG_USBFS
> /* USB ioctls */
> diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
> index 98c2119..f68a8b6 100644
> --- a/linux-user/syscall_defs.h
> +++ b/linux-user/syscall_defs.h
> @@ -911,12 +911,14 @@ struct target_pollfd {
> #define TARGET_FICLONE TARGET_IOW(0x94, 9, int)
> #define TARGET_FICLONERANGE TARGET_IOW(0x94, 13, struct file_clone_range)
>
> -/* Note that the ioctl numbers claim type "long" but the actual type
> - * used by the kernel is "int".
> +/*
> + * Note that the ioctl numbers for FS_IOC_<GET|SET><FLAGS|VERSION>
> + * claim type "long" but the actual type used by the kernel is "int".
> */
> #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_GETVERSION TARGET_IOR('v', 1, abi_long)
> +#define TARGET_FS_IOC_SETVERSION TARGET_IOW('v', 2, abi_long)
> #define TARGET_FS_IOC_FIEMAP TARGET_IOWR('f',11,struct fiemap)
>
> /* usb ioctls */
>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
next prev parent reply other threads:[~2020-01-14 14:22 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-13 20:34 [PATCH v5 00/20] linux-user: Misc patches for 5.0 Aleksandar Markovic
2020-01-13 20:34 ` [PATCH v5 01/20] linux-user: Fix some constants in termbits.h Aleksandar Markovic
2020-01-14 14:16 ` Laurent Vivier
2020-01-13 20:34 ` [PATCH v5 02/20] linux-user: alpha: Update syscall numbers to kernel 5.5 rc3 level Aleksandar Markovic
2020-01-14 15:12 ` Laurent Vivier
2020-01-13 20:34 ` [PATCH v5 03/20] linux-user: m68k: " Aleksandar Markovic
2020-01-14 15:03 ` Laurent Vivier
2020-01-13 20:34 ` [PATCH v5 04/20] linux-user: microblaze: " Aleksandar Markovic
2020-01-14 15:06 ` Laurent Vivier
2020-01-13 20:34 ` [PATCH v5 05/20] linux-user: mips: " Aleksandar Markovic
2020-01-14 16:39 ` Laurent Vivier
2020-02-04 11:56 ` Aleksandar Markovic
2020-02-04 22:34 ` Laurent Vivier
2020-02-04 22:53 ` Aleksandar Markovic
2020-01-13 20:34 ` [PATCH v5 06/20] linux-user: x86_64: " Aleksandar Markovic
2020-01-14 15:16 ` Laurent Vivier
2020-01-13 20:34 ` [PATCH v5 07/20] linux-user: xtensa: " Aleksandar Markovic
2020-01-14 15:08 ` Laurent Vivier
2020-01-13 20:34 ` [PATCH v5 08/20] linux-user: xtensa: Remove unused constant TARGET_NR_syscall_count Aleksandar Markovic
2020-01-14 14:59 ` Laurent Vivier
2020-01-13 20:34 ` [PATCH v5 09/20] linux-user: Add support for FS_IOC_<GET|SET>VERSION ioctls Aleksandar Markovic
2020-01-14 14:21 ` Laurent Vivier [this message]
2020-01-13 20:34 ` [PATCH v5 10/20] linux-user: Add support for FS_IOC32_<GET|SET>FLAGS ioctls Aleksandar Markovic
2020-01-14 14:24 ` Laurent Vivier
2020-01-13 20:34 ` [PATCH v5 11/20] linux-user: Add support for FS_IOC32_<GET|SET>VERSION ioctls Aleksandar Markovic
2020-01-14 14:24 ` Laurent Vivier
2020-01-13 20:34 ` [PATCH v5 12/20] linux-user: Add support for FS_IOC_FS<GET|SET>XATTR ioctls Aleksandar Markovic
2020-01-14 14:29 ` Laurent Vivier
2020-01-13 20:34 ` [PATCH v5 13/20] linux-user: Add support for FITRIM ioctl Aleksandar Markovic
2020-01-14 14:32 ` Laurent Vivier
2020-01-13 20:34 ` [PATCH v5 14/20] linux-user: Add support for FIFREEZE and FITHAW ioctls Aleksandar Markovic
2020-01-14 14:34 ` Laurent Vivier
2020-01-13 20:34 ` [PATCH v5 15/20] linux-user: Add support for FD<SETEMSGTRESH|SETMAXERRS|GETMAXERRS> ioctls Aleksandar Markovic
2020-01-14 14:36 ` Laurent Vivier
2020-01-13 20:34 ` [PATCH v5 16/20] linux-user: Add support for FDFMT<BEG|TRK|END> ioctls Aleksandar Markovic
2020-01-14 14:38 ` Laurent Vivier
2020-01-13 20:34 ` [PATCH v5 17/20] linux-user: Add support for FDGETFDCSTAT ioctl Aleksandar Markovic
2020-01-14 14:42 ` Laurent Vivier
2020-01-13 20:34 ` [PATCH v5 18/20] configure: Detect kcov support and introduce CONFIG_KCOV Aleksandar Markovic
2020-01-14 14:48 ` Laurent Vivier
2020-01-13 20:34 ` [PATCH v5 19/20] linux-user: Add support for KCOV_<ENABLE|DISABLE> ioctls Aleksandar Markovic
2020-01-14 14:49 ` Laurent Vivier
2020-01-13 20:34 ` [PATCH v5 20/20] linux-user: Add support for KCOV_INIT_TRACE ioctl Aleksandar Markovic
2020-01-14 14:53 ` Laurent Vivier
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=6606362f-0dec-056c-30af-e61d7a9bdcb4@vivier.eu \
--to=laurent@vivier.eu \
--cc=aleksandar.markovic@rt-rk.com \
--cc=amarkovic@wavecomp.com \
--cc=qemu-devel@nongnu.org \
/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).