git: 416e0455c488 - stable/13 - linux(4): Regen for close_range syscall
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 29 Jun 2023 08:20:02 UTC
The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=416e0455c488d500537911c4e54f356036de7cba commit 416e0455c488d500537911c4e54f356036de7cba Author: Dmitry Chagin <dchagin@FreeBSD.org> AuthorDate: 2023-04-04 20:23:37 +0000 Commit: Dmitry Chagin <dchagin@FreeBSD.org> CommitDate: 2023-06-29 08:15:22 +0000 linux(4): Regen for close_range syscall MFC after: 2 weeks (cherry picked from commit 50111714f5a46add66264d48456c32b7d3d0036a) --- sys/amd64/linux/linux_proto.h | 6 ++++-- sys/amd64/linux/linux_sysent.c | 2 +- sys/amd64/linux/linux_systrace_args.c | 22 +++++++++++++++++++++- sys/amd64/linux32/linux32_proto.h | 6 ++++-- sys/amd64/linux32/linux32_sysent.c | 2 +- sys/amd64/linux32/linux32_systrace_args.c | 22 +++++++++++++++++++++- sys/arm64/linux/linux_proto.h | 6 ++++-- sys/arm64/linux/linux_sysent.c | 2 +- sys/arm64/linux/linux_systrace_args.c | 22 +++++++++++++++++++++- sys/i386/linux/linux_proto.h | 6 ++++-- sys/i386/linux/linux_sysent.c | 2 +- sys/i386/linux/linux_systrace_args.c | 22 +++++++++++++++++++++- 12 files changed, 104 insertions(+), 16 deletions(-) diff --git a/sys/amd64/linux/linux_proto.h b/sys/amd64/linux/linux_proto.h index de8456e16562..fcb4a718a665 100644 --- a/sys/amd64/linux/linux_proto.h +++ b/sys/amd64/linux/linux_proto.h @@ -1363,7 +1363,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 { - register_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 { register_t dummy; @@ -2028,7 +2030,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/amd64/linux/linux_sysent.c b/sys/amd64/linux/linux_sysent.c index 708ae7e50c72..23f923402f9d 100644 --- a/sys/amd64/linux/linux_sysent.c +++ b/sys/amd64/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/amd64/linux/linux_systrace_args.c b/sys/amd64/linux/linux_systrace_args.c index 44d2b92b066c..d03f99f10f26 100644 --- a/sys/amd64/linux/linux_systrace_args.c +++ b/sys/amd64/linux/linux_systrace_args.c @@ -2695,7 +2695,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[0] = p->first; /* l_uint */ + iarg[1] = p->last; /* l_uint */ + iarg[2] = p->flags; /* l_uint */ + *n_args = 3; break; } /* linux_openat2 */ @@ -7077,6 +7081,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: @@ -8607,6 +8624,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 */ diff --git a/sys/amd64/linux32/linux32_proto.h b/sys/amd64/linux32/linux32_proto.h index a03ae004ff7d..d76b685b17e6 100644 --- a/sys/amd64/linux32/linux32_proto.h +++ b/sys/amd64/linux32/linux32_proto.h @@ -1669,7 +1669,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 { - register_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 { register_t dummy; @@ -2466,7 +2468,7 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX32_SYS_AUE_linux_fspick AUE_NULL #define LINUX32_SYS_AUE_linux_pidfd_open AUE_NULL #define LINUX32_SYS_AUE_linux_clone3 AUE_NULL -#define LINUX32_SYS_AUE_linux_close_range AUE_NULL +#define LINUX32_SYS_AUE_linux_close_range AUE_CLOSERANGE #define LINUX32_SYS_AUE_linux_openat2 AUE_NULL #define LINUX32_SYS_AUE_linux_pidfd_getfd AUE_NULL #define LINUX32_SYS_AUE_linux_faccessat2 AUE_NULL diff --git a/sys/amd64/linux32/linux32_sysent.c b/sys/amd64/linux32/linux32_sysent.c index 9e24074d30ed..51697f74d360 100644 --- a/sys/amd64/linux32/linux32_sysent.c +++ b/sys/amd64/linux32/linux32_sysent.c @@ -453,7 +453,7 @@ struct sysent linux32_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/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c index 8fc22b1910b3..8dd85ea9720a 100644 --- a/sys/amd64/linux32/linux32_systrace_args.c +++ b/sys/amd64/linux32/linux32_systrace_args.c @@ -3209,7 +3209,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[0] = p->first; /* l_uint */ + iarg[1] = p->last; /* l_uint */ + iarg[2] = p->flags; /* l_uint */ + *n_args = 3; break; } /* linux_openat2 */ @@ -8456,6 +8460,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: @@ -10273,6 +10290,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 */ diff --git a/sys/arm64/linux/linux_proto.h b/sys/arm64/linux/linux_proto.h index 1bff7e30c71f..edfd1d088654 100644 --- a/sys/arm64/linux/linux_proto.h +++ b/sys/arm64/linux/linux_proto.h @@ -1173,7 +1173,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 { - register_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 { register_t dummy; @@ -1740,7 +1742,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/arm64/linux/linux_sysent.c b/sys/arm64/linux/linux_sysent.c index 45cf61a5a6e2..5f6124b83c97 100644 --- a/sys/arm64/linux/linux_sysent.c +++ b/sys/arm64/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/arm64/linux/linux_systrace_args.c b/sys/arm64/linux/linux_systrace_args.c index 3e87921a99a4..d57ad97796cd 100644 --- a/sys/arm64/linux/linux_systrace_args.c +++ b/sys/arm64/linux/linux_systrace_args.c @@ -2317,7 +2317,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[0] = p->first; /* l_uint */ + iarg[1] = p->last; /* l_uint */ + iarg[2] = p->flags; /* l_uint */ + *n_args = 3; break; } /* linux_openat2 */ @@ -6152,6 +6156,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: @@ -7467,6 +7484,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 */ diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h index f86a5a0bb136..f877c94a73fb 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 { - register_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 { register_t dummy; @@ -2463,7 +2465,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 4328cae47f0c..de0493a6dda6 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 419c067199c0..27d277e98aa3 100644 --- a/sys/i386/linux/linux_systrace_args.c +++ b/sys/i386/linux/linux_systrace_args.c @@ -3248,7 +3248,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[0] = p->first; /* l_uint */ + iarg[1] = p->last; /* l_uint */ + iarg[2] = p->flags; /* l_uint */ + *n_args = 3; break; } /* linux_openat2 */ @@ -8533,6 +8537,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: @@ -10379,6 +10396,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 */