git: 3f3b7fb1820f - stable/13 - linux(4): Regen for recvmmsg_time64 syscall.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 17 Jun 2022 19:39:50 UTC
The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=3f3b7fb1820f59fea5c2c8614dc9195d4cbe2379 commit 3f3b7fb1820f59fea5c2c8614dc9195d4cbe2379 Author: Dmitry Chagin <dchagin@FreeBSD.org> AuthorDate: 2022-06-17 19:34:42 +0000 Commit: Dmitry Chagin <dchagin@FreeBSD.org> CommitDate: 2022-06-17 19:34:42 +0000 linux(4): Regen for recvmmsg_time64 syscall. MFC after: 2 weeks (cherry picked from commit 79695e9585fafb4fd7240d8183839852f6c5d43a) --- sys/amd64/linux32/linux32_proto.h | 6 +++++- sys/amd64/linux32/linux32_sysent.c | 2 +- sys/amd64/linux32/linux32_systrace_args.c | 30 +++++++++++++++++++++++++++++- sys/i386/linux/linux_proto.h | 6 +++++- sys/i386/linux/linux_sysent.c | 2 +- sys/i386/linux/linux_systrace_args.c | 30 +++++++++++++++++++++++++++++- 6 files changed, 70 insertions(+), 6 deletions(-) diff --git a/sys/amd64/linux32/linux32_proto.h b/sys/amd64/linux32/linux32_proto.h index 1b4e814d6a7a..34cc1f4b8857 100644 --- a/sys/amd64/linux32/linux32_proto.h +++ b/sys/amd64/linux32/linux32_proto.h @@ -1592,7 +1592,11 @@ struct linux_io_pgetevents_time64_args { register_t dummy; }; struct linux_recvmmsg_time64_args { - register_t dummy; + char s_l_[PADL_(l_int)]; l_int s; char s_r_[PADR_(l_int)]; + char msg_l_[PADL_(struct l_mmsghdr *)]; struct l_mmsghdr * msg; char msg_r_[PADR_(struct l_mmsghdr *)]; + char vlen_l_[PADL_(l_uint)]; l_uint vlen; char vlen_r_[PADR_(l_uint)]; + char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; + char timeout_l_[PADL_(struct l_timespec64 *)]; struct l_timespec64 * timeout; char timeout_r_[PADR_(struct l_timespec64 *)]; }; struct linux_mq_timedsend_time64_args { register_t dummy; diff --git a/sys/amd64/linux32/linux32_sysent.c b/sys/amd64/linux32/linux32_sysent.c index e42c9479d6f3..ee4c6296d299 100644 --- a/sys/amd64/linux32/linux32_sysent.c +++ b/sys/amd64/linux32/linux32_sysent.c @@ -434,7 +434,7 @@ struct sysent linux32_sysent[] = { { .sy_narg = AS(linux_ppoll_time64_args), .sy_call = (sy_call_t *)linux_ppoll_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 414 = linux_ppoll_time64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 415 = nosys */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_io_pgetevents_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 416 = linux_io_pgetevents_time64 */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_recvmmsg_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 417 = linux_recvmmsg_time64 */ + { .sy_narg = AS(linux_recvmmsg_time64_args), .sy_call = (sy_call_t *)linux_recvmmsg_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 417 = linux_recvmmsg_time64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_mq_timedsend_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 418 = linux_mq_timedsend_time64 */ { .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 */ diff --git a/sys/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c index f3dead6b423a..1c9ebdca2ea4 100644 --- a/sys/amd64/linux32/linux32_systrace_args.c +++ b/sys/amd64/linux32/linux32_systrace_args.c @@ -3080,7 +3080,13 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) } /* linux_recvmmsg_time64 */ case 417: { - *n_args = 0; + struct linux_recvmmsg_time64_args *p = params; + iarg[0] = p->s; /* l_int */ + uarg[1] = (intptr_t)p->msg; /* struct l_mmsghdr * */ + iarg[2] = p->vlen; /* l_uint */ + iarg[3] = p->flags; /* l_uint */ + uarg[4] = (intptr_t)p->timeout; /* struct l_timespec64 * */ + *n_args = 5; break; } /* linux_mq_timedsend_time64 */ @@ -8279,6 +8285,25 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_recvmmsg_time64 */ case 417: + switch (ndx) { + case 0: + p = "l_int"; + break; + case 1: + p = "userland struct l_mmsghdr *"; + break; + case 2: + p = "l_uint"; + break; + case 3: + p = "l_uint"; + break; + case 4: + p = "userland struct l_timespec64 *"; + break; + default: + break; + }; break; /* linux_mq_timedsend_time64 */ case 418: @@ -10168,6 +10193,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 416: /* linux_recvmmsg_time64 */ case 417: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_mq_timedsend_time64 */ case 418: /* linux_mq_timedreceive_time64 */ diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h index 439dc318f7fe..a123bfebe3e0 100644 --- a/sys/i386/linux/linux_proto.h +++ b/sys/i386/linux/linux_proto.h @@ -1585,7 +1585,11 @@ struct linux_io_pgetevents_time64_args { register_t dummy; }; struct linux_recvmmsg_time64_args { - register_t dummy; + char s_l_[PADL_(l_int)]; l_int s; char s_r_[PADR_(l_int)]; + char msg_l_[PADL_(struct l_mmsghdr *)]; struct l_mmsghdr * msg; char msg_r_[PADR_(struct l_mmsghdr *)]; + char vlen_l_[PADL_(l_uint)]; l_uint vlen; char vlen_r_[PADR_(l_uint)]; + char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; + char timeout_l_[PADL_(struct l_timespec64 *)]; struct l_timespec64 * timeout; char timeout_r_[PADR_(struct l_timespec64 *)]; }; struct linux_mq_timedsend_time64_args { register_t dummy; diff --git a/sys/i386/linux/linux_sysent.c b/sys/i386/linux/linux_sysent.c index 78ceba5e2d62..f7f0691eb50b 100644 --- a/sys/i386/linux/linux_sysent.c +++ b/sys/i386/linux/linux_sysent.c @@ -434,7 +434,7 @@ struct sysent linux_sysent[] = { { .sy_narg = AS(linux_ppoll_time64_args), .sy_call = (sy_call_t *)linux_ppoll_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 414 = linux_ppoll_time64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 415 = nosys */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_io_pgetevents_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 416 = linux_io_pgetevents_time64 */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_recvmmsg_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 417 = linux_recvmmsg_time64 */ + { .sy_narg = AS(linux_recvmmsg_time64_args), .sy_call = (sy_call_t *)linux_recvmmsg_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 417 = linux_recvmmsg_time64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_mq_timedsend_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 418 = linux_mq_timedsend_time64 */ { .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 */ diff --git a/sys/i386/linux/linux_systrace_args.c b/sys/i386/linux/linux_systrace_args.c index 16cc7e47f7b0..fb7f7a9f8b3a 100644 --- a/sys/i386/linux/linux_systrace_args.c +++ b/sys/i386/linux/linux_systrace_args.c @@ -3119,7 +3119,13 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) } /* linux_recvmmsg_time64 */ case 417: { - *n_args = 0; + struct linux_recvmmsg_time64_args *p = params; + iarg[0] = p->s; /* l_int */ + uarg[1] = (intptr_t)p->msg; /* struct l_mmsghdr * */ + iarg[2] = p->vlen; /* l_uint */ + iarg[3] = p->flags; /* l_uint */ + uarg[4] = (intptr_t)p->timeout; /* struct l_timespec64 * */ + *n_args = 5; break; } /* linux_mq_timedsend_time64 */ @@ -8356,6 +8362,25 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_recvmmsg_time64 */ case 417: + switch (ndx) { + case 0: + p = "l_int"; + break; + case 1: + p = "userland struct l_mmsghdr *"; + break; + case 2: + p = "l_uint"; + break; + case 3: + p = "l_uint"; + break; + case 4: + p = "userland struct l_timespec64 *"; + break; + default: + break; + }; break; /* linux_mq_timedsend_time64 */ case 418: @@ -10274,6 +10299,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 416: /* linux_recvmmsg_time64 */ case 417: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_mq_timedsend_time64 */ case 418: /* linux_mq_timedreceive_time64 */