aboutsummaryrefslogtreecommitdiff
path: root/sys/i386
diff options
context:
space:
mode:
authorDmitry Chagin <dchagin@FreeBSD.org>2023-04-04 20:23:37 +0000
committerDmitry Chagin <dchagin@FreeBSD.org>2023-04-04 20:23:37 +0000
commit50111714f5a46add66264d48456c32b7d3d0036a (patch)
tree9b9d5d95472ab694054024f7d4842cacd1a79ff6 /sys/i386
parent1c27dce1f8979e7bbe3ca51f4f2db38b202042a0 (diff)
downloadsrc-50111714f5a46add66264d48456c32b7d3d0036a.tar.gz
src-50111714f5a46add66264d48456c32b7d3d0036a.zip
linux(4): Regen for close_range syscall
MFC after: 2 weeks
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/linux/linux_proto.h6
-rw-r--r--sys/i386/linux/linux_sysent.c2
-rw-r--r--sys/i386/linux/linux_systrace_args.c22
3 files changed, 26 insertions, 4 deletions
diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h
index 2e243d463a13..8b603f2de1ca 100644
--- a/sys/i386/linux/linux_proto.h
+++ b/sys/i386/linux/linux_proto.h
@@ -1662,7 +1662,9 @@ struct linux_clone3_args {
char usize_l_[PADL_(l_size_t)]; l_size_t usize; char usize_r_[PADR_(l_size_t)];
};
struct linux_close_range_args {
- syscallarg_t dummy;
+ char first_l_[PADL_(l_uint)]; l_uint first; char first_r_[PADR_(l_uint)];
+ char last_l_[PADL_(l_uint)]; l_uint last; char last_r_[PADR_(l_uint)];
+ char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)];
};
struct linux_openat2_args {
syscallarg_t dummy;
@@ -2414,7 +2416,7 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *);
#define LINUX_SYS_AUE_linux_fspick AUE_NULL
#define LINUX_SYS_AUE_linux_pidfd_open AUE_NULL
#define LINUX_SYS_AUE_linux_clone3 AUE_NULL
-#define LINUX_SYS_AUE_linux_close_range AUE_NULL
+#define LINUX_SYS_AUE_linux_close_range AUE_CLOSERANGE
#define LINUX_SYS_AUE_linux_openat2 AUE_NULL
#define LINUX_SYS_AUE_linux_pidfd_getfd AUE_NULL
#define LINUX_SYS_AUE_linux_faccessat2 AUE_NULL
diff --git a/sys/i386/linux/linux_sysent.c b/sys/i386/linux/linux_sysent.c
index 5a39c9369a7d..6aa759f22f90 100644
--- a/sys/i386/linux/linux_sysent.c
+++ b/sys/i386/linux/linux_sysent.c
@@ -453,7 +453,7 @@ struct sysent linux_sysent[] = {
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_fspick, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 433 = linux_fspick */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_pidfd_open, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 434 = linux_pidfd_open */
{ .sy_narg = AS(linux_clone3_args), .sy_call = (sy_call_t *)linux_clone3, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 435 = linux_clone3 */
- { .sy_narg = 0, .sy_call = (sy_call_t *)linux_close_range, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 436 = linux_close_range */
+ { .sy_narg = AS(linux_close_range_args), .sy_call = (sy_call_t *)linux_close_range, .sy_auevent = AUE_CLOSERANGE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 436 = linux_close_range */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_openat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 437 = linux_openat2 */
{ .sy_narg = 0, .sy_call = (sy_call_t *)linux_pidfd_getfd, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 438 = linux_pidfd_getfd */
{ .sy_narg = AS(linux_faccessat2_args), .sy_call = (sy_call_t *)linux_faccessat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 439 = linux_faccessat2 */
diff --git a/sys/i386/linux/linux_systrace_args.c b/sys/i386/linux/linux_systrace_args.c
index 613d1ada1b3f..e773e8f58064 100644
--- a/sys/i386/linux/linux_systrace_args.c
+++ b/sys/i386/linux/linux_systrace_args.c
@@ -3249,7 +3249,11 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
}
/* linux_close_range */
case 436: {
- *n_args = 0;
+ struct linux_close_range_args *p = params;
+ iarg[a++] = p->first; /* l_uint */
+ iarg[a++] = p->last; /* l_uint */
+ iarg[a++] = p->flags; /* l_uint */
+ *n_args = 3;
break;
}
/* linux_openat2 */
@@ -8534,6 +8538,19 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
/* linux_close_range */
case 436:
+ switch (ndx) {
+ case 0:
+ p = "l_uint";
+ break;
+ case 1:
+ p = "l_uint";
+ break;
+ case 2:
+ p = "l_uint";
+ break;
+ default:
+ break;
+ };
break;
/* linux_openat2 */
case 437:
@@ -10380,6 +10397,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
/* linux_close_range */
case 436:
+ if (ndx == 0 || ndx == 1)
+ p = "int";
+ break;
/* linux_openat2 */
case 437:
/* linux_pidfd_getfd */