[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/6] linux-user: Support F_ADD_SEALS and F_GET_SEALS fcntls
From: |
Laurent Vivier |
Subject: |
Re: [PATCH 1/6] linux-user: Support F_ADD_SEALS and F_GET_SEALS fcntls |
Date: |
Fri, 7 Aug 2020 13:44:26 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
Le 23/07/2020 à 02:19, Shu-Chun Weng a écrit :
> Signed-off-by: Shu-Chun Weng <scw@google.com>
> ---
> linux-user/syscall.c | 10 ++++++++++
> linux-user/syscall_defs.h | 14 ++++++++------
> 2 files changed, 18 insertions(+), 6 deletions(-)
>
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 1211e759c2..f97337b0b4 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -6312,6 +6312,14 @@ static int target_to_host_fcntl_cmd(int cmd)
> case TARGET_F_GETPIPE_SZ:
> ret = F_GETPIPE_SZ;
> break;
> +#endif
> +#ifdef F_ADD_SEALS
> + case TARGET_F_ADD_SEALS:
> + ret = F_ADD_SEALS;
> + break;
> + case TARGET_F_GET_SEALS:
> + ret = F_GET_SEALS;
> + break;
> #endif
> default:
> ret = -TARGET_EINVAL;
> @@ -6598,6 +6606,8 @@ static abi_long do_fcntl(int fd, int cmd, abi_ulong arg)
> case TARGET_F_GETLEASE:
> case TARGET_F_SETPIPE_SZ:
> case TARGET_F_GETPIPE_SZ:
> + case TARGET_F_ADD_SEALS:
> + case TARGET_F_GET_SEALS:
> ret = get_errno(safe_fcntl(fd, host_cmd, arg));
> break;
>
> diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
> index 3c261cff0e..70df1a94fb 100644
> --- a/linux-user/syscall_defs.h
> +++ b/linux-user/syscall_defs.h
> @@ -2292,12 +2292,14 @@ struct target_statfs64 {
> #endif
>
> #define TARGET_F_LINUX_SPECIFIC_BASE 1024
> -#define TARGET_F_SETLEASE (TARGET_F_LINUX_SPECIFIC_BASE + 0)
> -#define TARGET_F_GETLEASE (TARGET_F_LINUX_SPECIFIC_BASE + 1)
> -#define TARGET_F_DUPFD_CLOEXEC (TARGET_F_LINUX_SPECIFIC_BASE + 6)
> -#define TARGET_F_SETPIPE_SZ (TARGET_F_LINUX_SPECIFIC_BASE + 7)
> -#define TARGET_F_GETPIPE_SZ (TARGET_F_LINUX_SPECIFIC_BASE + 8)
> -#define TARGET_F_NOTIFY (TARGET_F_LINUX_SPECIFIC_BASE+2)
> +#define TARGET_F_SETLEASE (TARGET_F_LINUX_SPECIFIC_BASE + 0)
> +#define TARGET_F_GETLEASE (TARGET_F_LINUX_SPECIFIC_BASE + 1)
> +#define TARGET_F_DUPFD_CLOEXEC (TARGET_F_LINUX_SPECIFIC_BASE + 6)
> +#define TARGET_F_NOTIFY (TARGET_F_LINUX_SPECIFIC_BASE + 2)
> +#define TARGET_F_SETPIPE_SZ (TARGET_F_LINUX_SPECIFIC_BASE + 7)
> +#define TARGET_F_GETPIPE_SZ (TARGET_F_LINUX_SPECIFIC_BASE + 8)
> +#define TARGET_F_ADD_SEALS (TARGET_F_LINUX_SPECIFIC_BASE + 9)
> +#define TARGET_F_GET_SEALS (TARGET_F_LINUX_SPECIFIC_BASE + 10)
>
> #include "target_fcntl.h"
>
>
Looks good. Please also update print_fcntl() in linux-user/strace.c
Thanks,
Laurent
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH 1/6] linux-user: Support F_ADD_SEALS and F_GET_SEALS fcntls,
Laurent Vivier <=