From: Shu-Chun Weng <scw@google.com>
To: qemu-devel@nongnu.org
Cc: Shu-Chun Weng <scw@google.com>, laurent@vivier.eu
Subject: [PATCH 1/6] linux-user: Support F_ADD_SEALS and F_GET_SEALS fcntls
Date: Wed, 22 Jul 2020 17:19:10 -0700 [thread overview]
Message-ID: <827d9ab425cb0c580722c48fe7471b14cbb1a57d.1595461447.git.scw@google.com> (raw)
In-Reply-To: <cover.1595461447.git.scw@google.com>
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"
--
2.28.0.rc0.105.gf9edc3c819-goog
next prev parent reply other threads:[~2020-07-23 0:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-23 0:19 [PATCH 0/6] fcntl, sockopt, and ioctl options Shu-Chun Weng
2020-07-23 0:19 ` Shu-Chun Weng [this message]
2020-08-07 11:44 ` [PATCH 1/6] linux-user: Support F_ADD_SEALS and F_GET_SEALS fcntls Laurent Vivier
2020-07-23 0:19 ` [PATCH 2/6] linux-user: add missing UDP and IPv6 get/setsockopt options Shu-Chun Weng
2020-08-07 11:54 ` Laurent Vivier
2020-07-23 0:19 ` [PATCH 3/6] linux-user: Update SO_TIMESTAMP to SO_TIMESTAMP_OLD/NEW Shu-Chun Weng
2020-08-07 12:07 ` Laurent Vivier
2020-07-23 0:19 ` [PATCH 4/6] linux-user: setsockopt() SO_TIMESTAMPNS and SO_TIMESTAMPING Shu-Chun Weng
2020-07-23 0:19 ` [PATCH 5/6] thunk: supports flexible arrays Shu-Chun Weng
2020-07-23 0:19 ` [PATCH 6/6] linux-user: Add support for SIOCETHTOOL ioctl Shu-Chun Weng
2020-08-05 23:22 ` [PATCH 0/6] fcntl, sockopt, and ioctl options Shu-Chun Weng
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=827d9ab425cb0c580722c48fe7471b14cbb1a57d.1595461447.git.scw@google.com \
--to=scw@google.com \
--cc=laurent@vivier.eu \
--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).