git: 79695e9585fa - main - linux(4): Regen for recvmmsg_time64 syscall.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 04 May 2022 10:08:22 UTC
The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=79695e9585fafb4fd7240d8183839852f6c5d43a commit 79695e9585fafb4fd7240d8183839852f6c5d43a Author: Dmitry Chagin <dchagin@FreeBSD.org> AuthorDate: 2022-05-04 10:06:52 +0000 Commit: Dmitry Chagin <dchagin@FreeBSD.org> CommitDate: 2022-05-04 10:06:52 +0000 linux(4): Regen for recvmmsg_time64 syscall. MFC after: 2 weeks --- 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 fc40376eea99..70a9f4bbe872 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 { syscallarg_t dummy; }; struct linux_recvmmsg_time64_args { - syscallarg_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 { syscallarg_t dummy; diff --git a/sys/amd64/linux32/linux32_sysent.c b/sys/amd64/linux32/linux32_sysent.c index e2f77bbc7cb3..3160aa060089 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 a719cddbdabb..49173e835be6 100644 --- a/sys/amd64/linux32/linux32_systrace_args.c +++ b/sys/amd64/linux32/linux32_systrace_args.c @@ -3081,7 +3081,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[a++] = p->s; /* l_int */ + uarg[a++] = (intptr_t)p->msg; /* struct l_mmsghdr * */ + iarg[a++] = p->vlen; /* l_uint */ + iarg[a++] = p->flags; /* l_uint */ + uarg[a++] = (intptr_t)p->timeout; /* struct l_timespec64 * */ + *n_args = 5; break; } /* linux_mq_timedsend_time64 */ @@ -8280,6 +8286,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: @@ -10169,6 +10194,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 ed6765b1bd3c..efecc4e7cdf7 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 { syscallarg_t dummy; }; struct linux_recvmmsg_time64_args { - syscallarg_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 { syscallarg_t dummy; diff --git a/sys/i386/linux/linux_sysent.c b/sys/i386/linux/linux_sysent.c index ac71fe2e6b96..56f43e4d94c8 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 72e8564c8b4f..0daf807599a0 100644 --- a/sys/i386/linux/linux_systrace_args.c +++ b/sys/i386/linux/linux_systrace_args.c @@ -3120,7 +3120,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[a++] = p->s; /* l_int */ + uarg[a++] = (intptr_t)p->msg; /* struct l_mmsghdr * */ + iarg[a++] = p->vlen; /* l_uint */ + iarg[a++] = p->flags; /* l_uint */ + uarg[a++] = (intptr_t)p->timeout; /* struct l_timespec64 * */ + *n_args = 5; break; } /* linux_mq_timedsend_time64 */ @@ -8357,6 +8363,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: @@ -10275,6 +10300,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 */