git: f83465c2e765 - stable/13 - linux(4): Regen for futex_time64 system call.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 17 Jun 2022 19:31:50 UTC
The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=f83465c2e765f0bf135f376bf524b01a1ad2bedb commit f83465c2e765f0bf135f376bf524b01a1ad2bedb Author: Dmitry Chagin <dchagin@FreeBSD.org> AuthorDate: 2021-06-10 11:28:25 +0000 Commit: Dmitry Chagin <dchagin@FreeBSD.org> CommitDate: 2022-06-17 19:30:15 +0000 linux(4): Regen for futex_time64 system call. MFC after: 2 weeks (cherry picked from commit 985978806e21073c5578198fedfdd414290c3e64) --- sys/amd64/linux32/linux32_proto.h | 13 ++++++---- sys/amd64/linux32/linux32_syscall.h | 2 +- sys/amd64/linux32/linux32_syscalls.c | 2 +- sys/amd64/linux32/linux32_sysent.c | 2 +- sys/amd64/linux32/linux32_systrace_args.c | 40 +++++++++++++++++++++++++++---- sys/i386/linux/linux_proto.h | 13 ++++++---- sys/i386/linux/linux_syscall.h | 2 +- sys/i386/linux/linux_syscalls.c | 2 +- sys/i386/linux/linux_sysent.c | 2 +- sys/i386/linux/linux_systrace_args.c | 40 +++++++++++++++++++++++++++---- 10 files changed, 96 insertions(+), 22 deletions(-) diff --git a/sys/amd64/linux32/linux32_proto.h b/sys/amd64/linux32/linux32_proto.h index aa48b0b50b89..5379aaf9c4f6 100644 --- a/sys/amd64/linux32/linux32_proto.h +++ b/sys/amd64/linux32/linux32_proto.h @@ -1581,8 +1581,13 @@ struct linux_semtimedop_time64_args { struct linux_rt_sigtimedwait_time64_args { register_t dummy; }; -struct linux_futex_time64_args { - register_t dummy; +struct linux_sys_futex_time64_args { + char uaddr_l_[PADL_(uint32_t *)]; uint32_t * uaddr; char uaddr_r_[PADR_(uint32_t *)]; + char op_l_[PADL_(l_int)]; l_int op; char op_r_[PADR_(l_int)]; + char val_l_[PADL_(uint32_t)]; uint32_t val; char val_r_[PADR_(uint32_t)]; + char timeout_l_[PADL_(struct l_timespec64 *)]; struct l_timespec64 * timeout; char timeout_r_[PADR_(struct l_timespec64 *)]; + char uaddr2_l_[PADL_(uint32_t *)]; uint32_t * uaddr2; char uaddr2_r_[PADR_(uint32_t *)]; + char val3_l_[PADL_(uint32_t)]; uint32_t val3; char val3_r_[PADR_(uint32_t)]; }; struct linux_sched_rr_get_interval_time64_args { register_t dummy; @@ -1989,7 +1994,7 @@ int linux_mq_timedsend_time64(struct thread *, struct linux_mq_timedsend_time64_ int linux_mq_timedreceive_time64(struct thread *, struct linux_mq_timedreceive_time64_args *); int linux_semtimedop_time64(struct thread *, struct linux_semtimedop_time64_args *); int linux_rt_sigtimedwait_time64(struct thread *, struct linux_rt_sigtimedwait_time64_args *); -int linux_futex_time64(struct thread *, struct linux_futex_time64_args *); +int linux_sys_futex_time64(struct thread *, struct linux_sys_futex_time64_args *); int linux_sched_rr_get_interval_time64(struct thread *, struct linux_sched_rr_get_interval_time64_args *); int linux_pidfd_send_signal(struct thread *, struct linux_pidfd_send_signal_args *); int linux_io_uring_setup(struct thread *, struct linux_io_uring_setup_args *); @@ -2400,7 +2405,7 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX32_SYS_AUE_linux_mq_timedreceive_time64 AUE_NULL #define LINUX32_SYS_AUE_linux_semtimedop_time64 AUE_NULL #define LINUX32_SYS_AUE_linux_rt_sigtimedwait_time64 AUE_NULL -#define LINUX32_SYS_AUE_linux_futex_time64 AUE_NULL +#define LINUX32_SYS_AUE_linux_sys_futex_time64 AUE_NULL #define LINUX32_SYS_AUE_linux_sched_rr_get_interval_time64 AUE_NULL #define LINUX32_SYS_AUE_linux_pidfd_send_signal AUE_NULL #define LINUX32_SYS_AUE_linux_io_uring_setup AUE_NULL diff --git a/sys/amd64/linux32/linux32_syscall.h b/sys/amd64/linux32/linux32_syscall.h index e82029ce6705..4c9db70621d3 100644 --- a/sys/amd64/linux32/linux32_syscall.h +++ b/sys/amd64/linux32/linux32_syscall.h @@ -383,7 +383,7 @@ #define LINUX32_SYS_linux_mq_timedreceive_time64 419 #define LINUX32_SYS_linux_semtimedop_time64 420 #define LINUX32_SYS_linux_rt_sigtimedwait_time64 421 -#define LINUX32_SYS_linux_futex_time64 422 +#define LINUX32_SYS_linux_sys_futex_time64 422 #define LINUX32_SYS_linux_sched_rr_get_interval_time64 423 #define LINUX32_SYS_linux_pidfd_send_signal 424 #define LINUX32_SYS_linux_io_uring_setup 425 diff --git a/sys/amd64/linux32/linux32_syscalls.c b/sys/amd64/linux32/linux32_syscalls.c index c60e40452d35..b427a94c87a0 100644 --- a/sys/amd64/linux32/linux32_syscalls.c +++ b/sys/amd64/linux32/linux32_syscalls.c @@ -429,7 +429,7 @@ const char *linux32_syscallnames[] = { "linux_mq_timedreceive_time64", /* 419 = linux_mq_timedreceive_time64 */ "linux_semtimedop_time64", /* 420 = linux_semtimedop_time64 */ "linux_rt_sigtimedwait_time64", /* 421 = linux_rt_sigtimedwait_time64 */ - "linux_futex_time64", /* 422 = linux_futex_time64 */ + "linux_sys_futex_time64", /* 422 = linux_sys_futex_time64 */ "linux_sched_rr_get_interval_time64", /* 423 = linux_sched_rr_get_interval_time64 */ "linux_pidfd_send_signal", /* 424 = linux_pidfd_send_signal */ "linux_io_uring_setup", /* 425 = linux_io_uring_setup */ diff --git a/sys/amd64/linux32/linux32_sysent.c b/sys/amd64/linux32/linux32_sysent.c index dd59369c7fe4..f84844d58e20 100644 --- a/sys/amd64/linux32/linux32_sysent.c +++ b/sys/amd64/linux32/linux32_sysent.c @@ -439,7 +439,7 @@ struct sysent linux32_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_mq_timedreceive_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 419 = linux_mq_timedreceive_time64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_semtimedop_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 420 = linux_semtimedop_time64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_rt_sigtimedwait_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 421 = linux_rt_sigtimedwait_time64 */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_futex_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 422 = linux_futex_time64 */ + { .sy_narg = AS(linux_sys_futex_time64_args), .sy_call = (sy_call_t *)linux_sys_futex_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 422 = linux_sys_futex_time64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_sched_rr_get_interval_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 423 = linux_sched_rr_get_interval_time64 */ { .sy_narg = AS(linux_pidfd_send_signal_args), .sy_call = (sy_call_t *)linux_pidfd_send_signal, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 424 = linux_pidfd_send_signal */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_io_uring_setup, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 425 = linux_io_uring_setup */ diff --git a/sys/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c index bd6201cf4469..10a400677f07 100644 --- a/sys/amd64/linux32/linux32_systrace_args.c +++ b/sys/amd64/linux32/linux32_systrace_args.c @@ -3069,9 +3069,16 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 0; break; } - /* linux_futex_time64 */ + /* linux_sys_futex_time64 */ case 422: { - *n_args = 0; + struct linux_sys_futex_time64_args *p = params; + uarg[0] = (intptr_t)p->uaddr; /* uint32_t * */ + iarg[1] = p->op; /* l_int */ + uarg[2] = p->val; /* uint32_t */ + uarg[3] = (intptr_t)p->timeout; /* struct l_timespec64 * */ + uarg[4] = (intptr_t)p->uaddr2; /* uint32_t * */ + uarg[5] = p->val3; /* uint32_t */ + *n_args = 6; break; } /* linux_sched_rr_get_interval_time64 */ @@ -8119,8 +8126,30 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) /* linux_rt_sigtimedwait_time64 */ case 421: break; - /* linux_futex_time64 */ + /* linux_sys_futex_time64 */ case 422: + switch (ndx) { + case 0: + p = "userland uint32_t *"; + break; + case 1: + p = "l_int"; + break; + case 2: + p = "uint32_t"; + break; + case 3: + p = "userland struct l_timespec64 *"; + break; + case 4: + p = "userland uint32_t *"; + break; + case 5: + p = "uint32_t"; + break; + default: + break; + }; break; /* linux_sched_rr_get_interval_time64 */ case 423: @@ -9886,8 +9915,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 420: /* linux_rt_sigtimedwait_time64 */ case 421: - /* linux_futex_time64 */ + /* linux_sys_futex_time64 */ case 422: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_sched_rr_get_interval_time64 */ case 423: /* linux_pidfd_send_signal */ diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h index a417f7804c3b..42e8d0a17f85 100644 --- a/sys/i386/linux/linux_proto.h +++ b/sys/i386/linux/linux_proto.h @@ -1574,8 +1574,13 @@ struct linux_semtimedop_time64_args { struct linux_rt_sigtimedwait_time64_args { register_t dummy; }; -struct linux_futex_time64_args { - register_t dummy; +struct linux_sys_futex_time64_args { + char uaddr_l_[PADL_(uint32_t *)]; uint32_t * uaddr; char uaddr_r_[PADR_(uint32_t *)]; + char op_l_[PADL_(l_int)]; l_int op; char op_r_[PADR_(l_int)]; + char val_l_[PADL_(uint32_t)]; uint32_t val; char val_r_[PADR_(uint32_t)]; + char timeout_l_[PADL_(struct l_timespec64 *)]; struct l_timespec64 * timeout; char timeout_r_[PADR_(struct l_timespec64 *)]; + char uaddr2_l_[PADL_(uint32_t *)]; uint32_t * uaddr2; char uaddr2_r_[PADR_(uint32_t *)]; + char val3_l_[PADL_(uint32_t)]; uint32_t val3; char val3_r_[PADR_(uint32_t)]; }; struct linux_sched_rr_get_interval_time64_args { register_t dummy; @@ -1984,7 +1989,7 @@ int linux_mq_timedsend_time64(struct thread *, struct linux_mq_timedsend_time64_ int linux_mq_timedreceive_time64(struct thread *, struct linux_mq_timedreceive_time64_args *); int linux_semtimedop_time64(struct thread *, struct linux_semtimedop_time64_args *); int linux_rt_sigtimedwait_time64(struct thread *, struct linux_rt_sigtimedwait_time64_args *); -int linux_futex_time64(struct thread *, struct linux_futex_time64_args *); +int linux_sys_futex_time64(struct thread *, struct linux_sys_futex_time64_args *); int linux_sched_rr_get_interval_time64(struct thread *, struct linux_sched_rr_get_interval_time64_args *); int linux_pidfd_send_signal(struct thread *, struct linux_pidfd_send_signal_args *); int linux_io_uring_setup(struct thread *, struct linux_io_uring_setup_args *); @@ -2397,7 +2402,7 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX_SYS_AUE_linux_mq_timedreceive_time64 AUE_NULL #define LINUX_SYS_AUE_linux_semtimedop_time64 AUE_NULL #define LINUX_SYS_AUE_linux_rt_sigtimedwait_time64 AUE_NULL -#define LINUX_SYS_AUE_linux_futex_time64 AUE_NULL +#define LINUX_SYS_AUE_linux_sys_futex_time64 AUE_NULL #define LINUX_SYS_AUE_linux_sched_rr_get_interval_time64 AUE_NULL #define LINUX_SYS_AUE_linux_pidfd_send_signal AUE_NULL #define LINUX_SYS_AUE_linux_io_uring_setup AUE_NULL diff --git a/sys/i386/linux/linux_syscall.h b/sys/i386/linux/linux_syscall.h index 49ce9295642b..9488c637fff0 100644 --- a/sys/i386/linux/linux_syscall.h +++ b/sys/i386/linux/linux_syscall.h @@ -390,7 +390,7 @@ #define LINUX_SYS_linux_mq_timedreceive_time64 419 #define LINUX_SYS_linux_semtimedop_time64 420 #define LINUX_SYS_linux_rt_sigtimedwait_time64 421 -#define LINUX_SYS_linux_futex_time64 422 +#define LINUX_SYS_linux_sys_futex_time64 422 #define LINUX_SYS_linux_sched_rr_get_interval_time64 423 #define LINUX_SYS_linux_pidfd_send_signal 424 #define LINUX_SYS_linux_io_uring_setup 425 diff --git a/sys/i386/linux/linux_syscalls.c b/sys/i386/linux/linux_syscalls.c index 71a7312aa7ee..748d2eb18fc1 100644 --- a/sys/i386/linux/linux_syscalls.c +++ b/sys/i386/linux/linux_syscalls.c @@ -429,7 +429,7 @@ const char *linux_syscallnames[] = { "linux_mq_timedreceive_time64", /* 419 = linux_mq_timedreceive_time64 */ "linux_semtimedop_time64", /* 420 = linux_semtimedop_time64 */ "linux_rt_sigtimedwait_time64", /* 421 = linux_rt_sigtimedwait_time64 */ - "linux_futex_time64", /* 422 = linux_futex_time64 */ + "linux_sys_futex_time64", /* 422 = linux_sys_futex_time64 */ "linux_sched_rr_get_interval_time64", /* 423 = linux_sched_rr_get_interval_time64 */ "linux_pidfd_send_signal", /* 424 = linux_pidfd_send_signal */ "linux_io_uring_setup", /* 425 = linux_io_uring_setup */ diff --git a/sys/i386/linux/linux_sysent.c b/sys/i386/linux/linux_sysent.c index c905daebd9d6..d5435b99e51b 100644 --- a/sys/i386/linux/linux_sysent.c +++ b/sys/i386/linux/linux_sysent.c @@ -439,7 +439,7 @@ struct sysent linux_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_mq_timedreceive_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 419 = linux_mq_timedreceive_time64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_semtimedop_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 420 = linux_semtimedop_time64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_rt_sigtimedwait_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 421 = linux_rt_sigtimedwait_time64 */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_futex_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 422 = linux_futex_time64 */ + { .sy_narg = AS(linux_sys_futex_time64_args), .sy_call = (sy_call_t *)linux_sys_futex_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 422 = linux_sys_futex_time64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_sched_rr_get_interval_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 423 = linux_sched_rr_get_interval_time64 */ { .sy_narg = AS(linux_pidfd_send_signal_args), .sy_call = (sy_call_t *)linux_pidfd_send_signal, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 424 = linux_pidfd_send_signal */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_io_uring_setup, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 425 = linux_io_uring_setup */ diff --git a/sys/i386/linux/linux_systrace_args.c b/sys/i386/linux/linux_systrace_args.c index 37dcd1db59d8..3355d72448e3 100644 --- a/sys/i386/linux/linux_systrace_args.c +++ b/sys/i386/linux/linux_systrace_args.c @@ -3108,9 +3108,16 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 0; break; } - /* linux_futex_time64 */ + /* linux_sys_futex_time64 */ case 422: { - *n_args = 0; + struct linux_sys_futex_time64_args *p = params; + uarg[0] = (intptr_t)p->uaddr; /* uint32_t * */ + iarg[1] = p->op; /* l_int */ + uarg[2] = p->val; /* uint32_t */ + uarg[3] = (intptr_t)p->timeout; /* struct l_timespec64 * */ + uarg[4] = (intptr_t)p->uaddr2; /* uint32_t * */ + uarg[5] = p->val3; /* uint32_t */ + *n_args = 6; break; } /* linux_sched_rr_get_interval_time64 */ @@ -8196,8 +8203,30 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) /* linux_rt_sigtimedwait_time64 */ case 421: break; - /* linux_futex_time64 */ + /* linux_sys_futex_time64 */ case 422: + switch (ndx) { + case 0: + p = "userland uint32_t *"; + break; + case 1: + p = "l_int"; + break; + case 2: + p = "uint32_t"; + break; + case 3: + p = "userland struct l_timespec64 *"; + break; + case 4: + p = "userland uint32_t *"; + break; + case 5: + p = "uint32_t"; + break; + default: + break; + }; break; /* linux_sched_rr_get_interval_time64 */ case 423: @@ -9992,8 +10021,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 420: /* linux_rt_sigtimedwait_time64 */ case 421: - /* linux_futex_time64 */ + /* linux_sys_futex_time64 */ case 422: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_sched_rr_get_interval_time64 */ case 423: /* linux_pidfd_send_signal */