From owner-dev-commits-src-main@freebsd.org Thu Jun 10 11:53:25 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5D5146498E8; Thu, 10 Jun 2021 11:53:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G12Rn1myFz4YJK; Thu, 10 Jun 2021 11:53:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 131DD6FE2; Thu, 10 Jun 2021 11:53:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15ABrOfm018910; Thu, 10 Jun 2021 11:53:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15ABrOPX018909; Thu, 10 Jun 2021 11:53:24 GMT (envelope-from git) Date: Thu, 10 Jun 2021 11:53:24 GMT Message-Id: <202106101153.15ABrOPX018909@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: c00252900060 - main - linux(4): Regen for rt_sigtimedwait_time64 system call. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c0025290006044d2dd7e3b1b52c04d796dddc374 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 11:53:25 -0000 The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=c0025290006044d2dd7e3b1b52c04d796dddc374 commit c0025290006044d2dd7e3b1b52c04d796dddc374 Author: Dmitry Chagin AuthorDate: 2021-06-10 11:52:43 +0000 Commit: Dmitry Chagin CommitDate: 2021-06-10 11:52:43 +0000 linux(4): Regen for rt_sigtimedwait_time64 system call. MFC after: 2 weeks --- sys/amd64/linux32/linux32_proto.h | 5 ++++- sys/amd64/linux32/linux32_sysent.c | 2 +- sys/amd64/linux32/linux32_systrace_args.c | 26 +++++++++++++++++++++++++- sys/i386/linux/linux_proto.h | 5 ++++- sys/i386/linux/linux_sysent.c | 2 +- sys/i386/linux/linux_systrace_args.c | 26 +++++++++++++++++++++++++- 6 files changed, 60 insertions(+), 6 deletions(-) diff --git a/sys/amd64/linux32/linux32_proto.h b/sys/amd64/linux32/linux32_proto.h index 5379aaf9c4f6..6d23a13ca4c3 100644 --- a/sys/amd64/linux32/linux32_proto.h +++ b/sys/amd64/linux32/linux32_proto.h @@ -1579,7 +1579,10 @@ struct linux_semtimedop_time64_args { register_t dummy; }; struct linux_rt_sigtimedwait_time64_args { - register_t dummy; + char mask_l_[PADL_(l_sigset_t *)]; l_sigset_t * mask; char mask_r_[PADR_(l_sigset_t *)]; + char ptr_l_[PADL_(l_siginfo_t *)]; l_siginfo_t * ptr; char ptr_r_[PADR_(l_siginfo_t *)]; + char timeout_l_[PADL_(struct l_timespec64 *)]; struct l_timespec64 * timeout; char timeout_r_[PADR_(struct l_timespec64 *)]; + char sigsetsize_l_[PADL_(l_size_t)]; l_size_t sigsetsize; char sigsetsize_r_[PADR_(l_size_t)]; }; struct linux_sys_futex_time64_args { char uaddr_l_[PADL_(uint32_t *)]; uint32_t * uaddr; char uaddr_r_[PADR_(uint32_t *)]; diff --git a/sys/amd64/linux32/linux32_sysent.c b/sys/amd64/linux32/linux32_sysent.c index f84844d58e20..d131db0a570c 100644 --- a/sys/amd64/linux32/linux32_sysent.c +++ b/sys/amd64/linux32/linux32_sysent.c @@ -438,7 +438,7 @@ struct sysent linux32_sysent[] = { { .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 */ - { .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 = AS(linux_rt_sigtimedwait_time64_args), .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 = 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 */ diff --git a/sys/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c index 10a400677f07..e31c309800e5 100644 --- a/sys/amd64/linux32/linux32_systrace_args.c +++ b/sys/amd64/linux32/linux32_systrace_args.c @@ -3066,7 +3066,12 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) } /* linux_rt_sigtimedwait_time64 */ case 421: { - *n_args = 0; + struct linux_rt_sigtimedwait_time64_args *p = params; + uarg[0] = (intptr_t)p->mask; /* l_sigset_t * */ + uarg[1] = (intptr_t)p->ptr; /* l_siginfo_t * */ + uarg[2] = (intptr_t)p->timeout; /* struct l_timespec64 * */ + iarg[3] = p->sigsetsize; /* l_size_t */ + *n_args = 4; break; } /* linux_sys_futex_time64 */ @@ -8125,6 +8130,22 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_rt_sigtimedwait_time64 */ case 421: + switch (ndx) { + case 0: + p = "userland l_sigset_t *"; + break; + case 1: + p = "userland l_siginfo_t *"; + break; + case 2: + p = "userland struct l_timespec64 *"; + break; + case 3: + p = "l_size_t"; + break; + default: + break; + }; break; /* linux_sys_futex_time64 */ case 422: @@ -9915,6 +9936,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 420: /* linux_rt_sigtimedwait_time64 */ case 421: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_sys_futex_time64 */ case 422: if (ndx == 0 || ndx == 1) diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h index 42e8d0a17f85..8ba444340fea 100644 --- a/sys/i386/linux/linux_proto.h +++ b/sys/i386/linux/linux_proto.h @@ -1572,7 +1572,10 @@ struct linux_semtimedop_time64_args { register_t dummy; }; struct linux_rt_sigtimedwait_time64_args { - register_t dummy; + char mask_l_[PADL_(l_sigset_t *)]; l_sigset_t * mask; char mask_r_[PADR_(l_sigset_t *)]; + char ptr_l_[PADL_(l_siginfo_t *)]; l_siginfo_t * ptr; char ptr_r_[PADR_(l_siginfo_t *)]; + char timeout_l_[PADL_(struct l_timespec64 *)]; struct l_timespec64 * timeout; char timeout_r_[PADR_(struct l_timespec64 *)]; + char sigsetsize_l_[PADL_(l_size_t)]; l_size_t sigsetsize; char sigsetsize_r_[PADR_(l_size_t)]; }; struct linux_sys_futex_time64_args { char uaddr_l_[PADL_(uint32_t *)]; uint32_t * uaddr; char uaddr_r_[PADR_(uint32_t *)]; diff --git a/sys/i386/linux/linux_sysent.c b/sys/i386/linux/linux_sysent.c index d5435b99e51b..722fe27ca8cb 100644 --- a/sys/i386/linux/linux_sysent.c +++ b/sys/i386/linux/linux_sysent.c @@ -438,7 +438,7 @@ struct sysent linux_sysent[] = { { .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 */ - { .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 = AS(linux_rt_sigtimedwait_time64_args), .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 = 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 */ diff --git a/sys/i386/linux/linux_systrace_args.c b/sys/i386/linux/linux_systrace_args.c index 3355d72448e3..7d2189734252 100644 --- a/sys/i386/linux/linux_systrace_args.c +++ b/sys/i386/linux/linux_systrace_args.c @@ -3105,7 +3105,12 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) } /* linux_rt_sigtimedwait_time64 */ case 421: { - *n_args = 0; + struct linux_rt_sigtimedwait_time64_args *p = params; + uarg[0] = (intptr_t)p->mask; /* l_sigset_t * */ + uarg[1] = (intptr_t)p->ptr; /* l_siginfo_t * */ + uarg[2] = (intptr_t)p->timeout; /* struct l_timespec64 * */ + iarg[3] = p->sigsetsize; /* l_size_t */ + *n_args = 4; break; } /* linux_sys_futex_time64 */ @@ -8202,6 +8207,22 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_rt_sigtimedwait_time64 */ case 421: + switch (ndx) { + case 0: + p = "userland l_sigset_t *"; + break; + case 1: + p = "userland l_siginfo_t *"; + break; + case 2: + p = "userland struct l_timespec64 *"; + break; + case 3: + p = "l_size_t"; + break; + default: + break; + }; break; /* linux_sys_futex_time64 */ case 422: @@ -10021,6 +10042,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 420: /* linux_rt_sigtimedwait_time64 */ case 421: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_sys_futex_time64 */ case 422: if (ndx == 0 || ndx == 1)