From nobody Tue Apr 26 16:37:19 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A420A199B60D; Tue, 26 Apr 2022 16:37:20 +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 4Knnbh1JH6z4hZ2; Tue, 26 Apr 2022 16:37:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650991040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vjl1vPvcGhEPNpvoM9+m/LfavJXhi5leyVy3D3mKYAo=; b=fMLfK33JUHptckMVs2FHSwiKPh0jPQg9HOdeHFXE+u6txRmJtF2BuLKFa5gwClq1jgo9OC Qv0I2X91ybLOzdvLJaNZ7IlQyHZ6VYIgqhat+ziFVv62p2G+Xefl+d4gQV5wwFuh2OiZem NEXHa+7tTTDtQZJKdS/919oSy4Joz1kjYBD0q6Ql7BYT9GMyzwSX8K2n9cJKwXIcwRcwQZ ZQuGvlaTLlrKn+gw5IicdyUizU5v5t0yurrgplGGXAyPgi9XghrqEDMLTQ/d4rcfhWQuxE +MoSthEKUrL0ADH99I8fSm93Bzzb/lh6sPlas/HNE77c4UR832sYSp+yQa28nw== 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 0273712FA7; Tue, 26 Apr 2022 16:37:20 +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 23QGbJsp065538; Tue, 26 Apr 2022 16:37:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23QGbJVM065537; Tue, 26 Apr 2022 16:37:19 GMT (envelope-from git) Date: Tue, 26 Apr 2022 16:37:19 GMT Message-Id: <202204261637.23QGbJVM065537@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: df377f1fb8dd - main - linux(4): Regen for epoll_pwait2 syscall. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org 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: df377f1fb8dd92a1839bc578aac46d2cdf1b5b84 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650991040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vjl1vPvcGhEPNpvoM9+m/LfavJXhi5leyVy3D3mKYAo=; b=fjQPLfIaIbO/+6fReo9kQ0gFzqNeaT041keAaVrQNDr5F8RM5G8XF7Hqumx32VyHW9/Pzg Y9CaQ+phhrztJqTWZ3KdEZ0OykUEgDC/kzUN4smsjWjtyZqkm6PeOW04ColypEhZyyk3V6 c5u3BIoV465E6HMmA5F3ggLw9b8GBr6rx2og7OAg9m1u4DZmYfxa0VWFEO4eFMfJukRcvE DsgTmO9aTwj6/M7T/0rbvusn5LFFoSRoujzBrWmf74yY4jlIUdrBzkqS2xe8H16hx0drHX 1xEMNdIciOXATy4/OlFKZLzASZE9a0Q1I2FpBN1zbDX19QehaXpzFwrKsnku7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650991040; a=rsa-sha256; cv=none; b=m07pqUMUY0UXSOXeTfphx7bSr39T71pM9EklIp6Mu8j8SSDwEnAe7U0kr20GgaQQprDlsR N+9br1rTOTjXHl7RUndGy64RM6i90yEKVw71HX4jjWhgWtOFmqWsHZjDbvD1WTWzOun2hN FmWVJ7vGTdIxOGcIH+Z1Klf+Jb1BvknITUYG9WnJPLxJGlgelQNoVleqNhg03AwHB3bOzu pyphBl2Ki4Ma2rt9TcE+ZJvSHgomOWyMfoSlH0QFPO79KnJiJBEOBs+wxNia8rgggll1vF 1fLdipu88o5hFNoDoyIdaO1SKCOdzmucmmGlL7jfCJATZslEsZo6swBpgz/I+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=df377f1fb8dd92a1839bc578aac46d2cdf1b5b84 commit df377f1fb8dd92a1839bc578aac46d2cdf1b5b84 Author: Dmitry Chagin AuthorDate: 2022-04-26 16:35:58 +0000 Commit: Dmitry Chagin CommitDate: 2022-04-26 16:35:58 +0000 linux(4): Regen for epoll_pwait2 syscall. --- sys/amd64/linux/linux_proto.h | 7 +++++- sys/amd64/linux/linux_sysent.c | 2 +- sys/amd64/linux/linux_systrace_args.c | 34 +++++++++++++++++++++++++- 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/arm64/linux/linux_proto.h | 7 +++++- sys/arm64/linux/linux_sysent.c | 2 +- sys/arm64/linux/linux_systrace_args.c | 34 +++++++++++++++++++++++++- 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 +++++++++++++++++++++++++++---- 16 files changed, 176 insertions(+), 28 deletions(-) diff --git a/sys/amd64/linux/linux_proto.h b/sys/amd64/linux/linux_proto.h index 5df0a4cf7686..85f066411f0e 100644 --- a/sys/amd64/linux/linux_proto.h +++ b/sys/amd64/linux/linux_proto.h @@ -1383,7 +1383,12 @@ struct linux_process_madvise_args { syscallarg_t dummy; }; struct linux_epoll_pwait2_args { - syscallarg_t dummy; + char epfd_l_[PADL_(l_int)]; l_int epfd; char epfd_r_[PADR_(l_int)]; + char events_l_[PADL_(struct epoll_event *)]; struct epoll_event * events; char events_r_[PADR_(struct epoll_event *)]; + char maxevents_l_[PADL_(l_int)]; l_int maxevents; char maxevents_r_[PADR_(l_int)]; + char timeout_l_[PADL_(struct l_timespec *)]; struct l_timespec * timeout; char timeout_r_[PADR_(struct l_timespec *)]; + char mask_l_[PADL_(l_sigset_t *)]; l_sigset_t * mask; char mask_r_[PADR_(l_sigset_t *)]; + char sigsetsize_l_[PADL_(l_size_t)]; l_size_t sigsetsize; char sigsetsize_r_[PADR_(l_size_t)]; }; struct linux_mount_setattr_args { syscallarg_t dummy; diff --git a/sys/amd64/linux/linux_sysent.c b/sys/amd64/linux/linux_sysent.c index be053dc920c2..ab22300ae25f 100644 --- a/sys/amd64/linux/linux_sysent.c +++ b/sys/amd64/linux/linux_sysent.c @@ -458,7 +458,7 @@ struct sysent linux_sysent[] = { { .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 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_process_madvise, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 440 = linux_process_madvise */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_epoll_pwait2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 441 = linux_epoll_pwait2 */ + { .sy_narg = AS(linux_epoll_pwait2_args), .sy_call = (sy_call_t *)linux_epoll_pwait2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 441 = linux_epoll_pwait2 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_mount_setattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 442 = linux_mount_setattr */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 443 = nosys */ }; diff --git a/sys/amd64/linux/linux_systrace_args.c b/sys/amd64/linux/linux_systrace_args.c index 2b6f872fb539..d75083ffe47c 100644 --- a/sys/amd64/linux/linux_systrace_args.c +++ b/sys/amd64/linux/linux_systrace_args.c @@ -2721,7 +2721,14 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) } /* linux_epoll_pwait2 */ case 441: { - *n_args = 0; + struct linux_epoll_pwait2_args *p = params; + iarg[a++] = p->epfd; /* l_int */ + uarg[a++] = (intptr_t)p->events; /* struct epoll_event * */ + iarg[a++] = p->maxevents; /* l_int */ + uarg[a++] = (intptr_t)p->timeout; /* struct l_timespec * */ + uarg[a++] = (intptr_t)p->mask; /* l_sigset_t * */ + iarg[a++] = p->sigsetsize; /* l_size_t */ + *n_args = 6; break; } /* linux_mount_setattr */ @@ -7081,6 +7088,28 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_epoll_pwait2 */ case 441: + switch (ndx) { + case 0: + p = "l_int"; + break; + case 1: + p = "userland struct epoll_event *"; + break; + case 2: + p = "l_int"; + break; + case 3: + p = "userland struct l_timespec *"; + break; + case 4: + p = "userland l_sigset_t *"; + break; + case 5: + p = "l_size_t"; + break; + default: + break; + }; break; /* linux_mount_setattr */ case 442: @@ -8568,6 +8597,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 440: /* linux_epoll_pwait2 */ case 441: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_mount_setattr */ case 442: default: diff --git a/sys/amd64/linux32/linux32_proto.h b/sys/amd64/linux32/linux32_proto.h index dd3ea44a7f0a..58dcfc6eaff8 100644 --- a/sys/amd64/linux32/linux32_proto.h +++ b/sys/amd64/linux32/linux32_proto.h @@ -1670,8 +1670,13 @@ struct linux_faccessat2_args { struct linux_process_madvise_args { syscallarg_t dummy; }; -struct linux_epoll_pwait2_args { - syscallarg_t dummy; +struct linux_epoll_pwait2_64_args { + char epfd_l_[PADL_(l_int)]; l_int epfd; char epfd_r_[PADR_(l_int)]; + char events_l_[PADL_(struct epoll_event *)]; struct epoll_event * events; char events_r_[PADR_(struct epoll_event *)]; + char maxevents_l_[PADL_(l_int)]; l_int maxevents; char maxevents_r_[PADR_(l_int)]; + char timeout_l_[PADL_(struct l_timespec64 *)]; struct l_timespec64 * timeout; char timeout_r_[PADR_(struct l_timespec64 *)]; + char mask_l_[PADL_(l_sigset_t *)]; l_sigset_t * mask; char mask_r_[PADR_(l_sigset_t *)]; + char sigsetsize_l_[PADL_(l_size_t)]; l_size_t sigsetsize; char sigsetsize_r_[PADR_(l_size_t)]; }; struct linux_mount_setattr_args { syscallarg_t dummy; @@ -2038,7 +2043,7 @@ int linux_openat2(struct thread *, struct linux_openat2_args *); int linux_pidfd_getfd(struct thread *, struct linux_pidfd_getfd_args *); int linux_faccessat2(struct thread *, struct linux_faccessat2_args *); int linux_process_madvise(struct thread *, struct linux_process_madvise_args *); -int linux_epoll_pwait2(struct thread *, struct linux_epoll_pwait2_args *); +int linux_epoll_pwait2_64(struct thread *, struct linux_epoll_pwait2_64_args *); int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX32_SYS_AUE_linux_exit AUE_EXIT #define LINUX32_SYS_AUE_linux_fork AUE_FORK @@ -2401,7 +2406,7 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX32_SYS_AUE_linux_pidfd_getfd AUE_NULL #define LINUX32_SYS_AUE_linux_faccessat2 AUE_NULL #define LINUX32_SYS_AUE_linux_process_madvise AUE_NULL -#define LINUX32_SYS_AUE_linux_epoll_pwait2 AUE_NULL +#define LINUX32_SYS_AUE_linux_epoll_pwait2_64 AUE_NULL #define LINUX32_SYS_AUE_linux_mount_setattr AUE_NULL #undef PAD_ diff --git a/sys/amd64/linux32/linux32_syscall.h b/sys/amd64/linux32/linux32_syscall.h index b2724c50d6a0..c8b497710470 100644 --- a/sys/amd64/linux32/linux32_syscall.h +++ b/sys/amd64/linux32/linux32_syscall.h @@ -402,6 +402,6 @@ #define LINUX32_SYS_linux_pidfd_getfd 438 #define LINUX32_SYS_linux_faccessat2 439 #define LINUX32_SYS_linux_process_madvise 440 -#define LINUX32_SYS_linux_epoll_pwait2 441 +#define LINUX32_SYS_linux_epoll_pwait2_64 441 #define LINUX32_SYS_linux_mount_setattr 442 #define LINUX32_SYS_MAXSYSCALL 444 diff --git a/sys/amd64/linux32/linux32_syscalls.c b/sys/amd64/linux32/linux32_syscalls.c index 3ee1639b5971..f44eef1f589a 100644 --- a/sys/amd64/linux32/linux32_syscalls.c +++ b/sys/amd64/linux32/linux32_syscalls.c @@ -448,7 +448,7 @@ const char *linux32_syscallnames[] = { "linux_pidfd_getfd", /* 438 = linux_pidfd_getfd */ "linux_faccessat2", /* 439 = linux_faccessat2 */ "linux_process_madvise", /* 440 = linux_process_madvise */ - "linux_epoll_pwait2", /* 441 = linux_epoll_pwait2 */ + "linux_epoll_pwait2_64", /* 441 = linux_epoll_pwait2_64 */ "linux_mount_setattr", /* 442 = linux_mount_setattr */ "#443", /* 443 = nosys */ }; diff --git a/sys/amd64/linux32/linux32_sysent.c b/sys/amd64/linux32/linux32_sysent.c index f4f67821be15..9954e369ce98 100644 --- a/sys/amd64/linux32/linux32_sysent.c +++ b/sys/amd64/linux32/linux32_sysent.c @@ -458,7 +458,7 @@ struct sysent linux32_sysent[] = { { .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 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_process_madvise, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 440 = linux_process_madvise */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_epoll_pwait2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 441 = linux_epoll_pwait2 */ + { .sy_narg = AS(linux_epoll_pwait2_64_args), .sy_call = (sy_call_t *)linux_epoll_pwait2_64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 441 = linux_epoll_pwait2_64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_mount_setattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 442 = linux_mount_setattr */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 443 = nosys */ }; diff --git a/sys/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c index 82c402dc679a..a0f4c1699d06 100644 --- a/sys/amd64/linux32/linux32_systrace_args.c +++ b/sys/amd64/linux32/linux32_systrace_args.c @@ -3208,9 +3208,16 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 0; break; } - /* linux_epoll_pwait2 */ + /* linux_epoll_pwait2_64 */ case 441: { - *n_args = 0; + struct linux_epoll_pwait2_64_args *p = params; + iarg[a++] = p->epfd; /* l_int */ + uarg[a++] = (intptr_t)p->events; /* struct epoll_event * */ + iarg[a++] = p->maxevents; /* l_int */ + uarg[a++] = (intptr_t)p->timeout; /* struct l_timespec64 * */ + uarg[a++] = (intptr_t)p->mask; /* l_sigset_t * */ + iarg[a++] = p->sigsetsize; /* l_size_t */ + *n_args = 6; break; } /* linux_mount_setattr */ @@ -8352,8 +8359,30 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) /* linux_process_madvise */ case 440: break; - /* linux_epoll_pwait2 */ + /* linux_epoll_pwait2_64 */ case 441: + switch (ndx) { + case 0: + p = "l_int"; + break; + case 1: + p = "userland struct epoll_event *"; + break; + case 2: + p = "l_int"; + break; + case 3: + p = "userland struct l_timespec64 *"; + break; + case 4: + p = "userland l_sigset_t *"; + break; + case 5: + p = "l_size_t"; + break; + default: + break; + }; break; /* linux_mount_setattr */ case 442: @@ -10108,8 +10137,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_process_madvise */ case 440: - /* linux_epoll_pwait2 */ + /* linux_epoll_pwait2_64 */ case 441: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_mount_setattr */ case 442: default: diff --git a/sys/arm64/linux/linux_proto.h b/sys/arm64/linux/linux_proto.h index f4943e19522e..f75422c9e8c3 100644 --- a/sys/arm64/linux/linux_proto.h +++ b/sys/arm64/linux/linux_proto.h @@ -1193,7 +1193,12 @@ struct linux_process_madvise_args { syscallarg_t dummy; }; struct linux_epoll_pwait2_args { - syscallarg_t dummy; + char epfd_l_[PADL_(l_int)]; l_int epfd; char epfd_r_[PADR_(l_int)]; + char events_l_[PADL_(struct epoll_event *)]; struct epoll_event * events; char events_r_[PADR_(struct epoll_event *)]; + char maxevents_l_[PADL_(l_int)]; l_int maxevents; char maxevents_r_[PADR_(l_int)]; + char timeout_l_[PADL_(struct l_timespec *)]; struct l_timespec * timeout; char timeout_r_[PADR_(struct l_timespec *)]; + char mask_l_[PADL_(l_sigset_t *)]; l_sigset_t * mask; char mask_r_[PADR_(l_sigset_t *)]; + char sigsetsize_l_[PADL_(l_size_t)]; l_size_t sigsetsize; char sigsetsize_r_[PADR_(l_size_t)]; }; struct linux_mount_setattr_args { syscallarg_t dummy; diff --git a/sys/arm64/linux/linux_sysent.c b/sys/arm64/linux/linux_sysent.c index a20724b85952..c3e19723f442 100644 --- a/sys/arm64/linux/linux_sysent.c +++ b/sys/arm64/linux/linux_sysent.c @@ -458,7 +458,7 @@ struct sysent linux_sysent[] = { { .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 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_process_madvise, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 440 = linux_process_madvise */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_epoll_pwait2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 441 = linux_epoll_pwait2 */ + { .sy_narg = AS(linux_epoll_pwait2_args), .sy_call = (sy_call_t *)linux_epoll_pwait2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 441 = linux_epoll_pwait2 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_mount_setattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 442 = linux_mount_setattr */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 443 = nosys */ }; diff --git a/sys/arm64/linux/linux_systrace_args.c b/sys/arm64/linux/linux_systrace_args.c index 50eb78bc6b44..c6410add7f80 100644 --- a/sys/arm64/linux/linux_systrace_args.c +++ b/sys/arm64/linux/linux_systrace_args.c @@ -2343,7 +2343,14 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) } /* linux_epoll_pwait2 */ case 441: { - *n_args = 0; + struct linux_epoll_pwait2_args *p = params; + iarg[a++] = p->epfd; /* l_int */ + uarg[a++] = (intptr_t)p->events; /* struct epoll_event * */ + iarg[a++] = p->maxevents; /* l_int */ + uarg[a++] = (intptr_t)p->timeout; /* struct l_timespec * */ + uarg[a++] = (intptr_t)p->mask; /* l_sigset_t * */ + iarg[a++] = p->sigsetsize; /* l_size_t */ + *n_args = 6; break; } /* linux_mount_setattr */ @@ -6156,6 +6163,28 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_epoll_pwait2 */ case 441: + switch (ndx) { + case 0: + p = "l_int"; + break; + case 1: + p = "userland struct epoll_event *"; + break; + case 2: + p = "l_int"; + break; + case 3: + p = "userland struct l_timespec *"; + break; + case 4: + p = "userland l_sigset_t *"; + break; + case 5: + p = "l_size_t"; + break; + default: + break; + }; break; /* linux_mount_setattr */ case 442: @@ -7428,6 +7457,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 440: /* linux_epoll_pwait2 */ case 441: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_mount_setattr */ case 442: default: diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h index e926267cb0e1..c3ab9a6dfc64 100644 --- a/sys/i386/linux/linux_proto.h +++ b/sys/i386/linux/linux_proto.h @@ -1663,8 +1663,13 @@ struct linux_faccessat2_args { struct linux_process_madvise_args { syscallarg_t dummy; }; -struct linux_epoll_pwait2_args { - syscallarg_t dummy; +struct linux_epoll_pwait2_64_args { + char epfd_l_[PADL_(l_int)]; l_int epfd; char epfd_r_[PADR_(l_int)]; + char events_l_[PADL_(struct epoll_event *)]; struct epoll_event * events; char events_r_[PADR_(struct epoll_event *)]; + char maxevents_l_[PADL_(l_int)]; l_int maxevents; char maxevents_r_[PADR_(l_int)]; + char timeout_l_[PADL_(struct l_timespec64 *)]; struct l_timespec64 * timeout; char timeout_r_[PADR_(struct l_timespec64 *)]; + char mask_l_[PADL_(l_sigset_t *)]; l_sigset_t * mask; char mask_r_[PADR_(l_sigset_t *)]; + char sigsetsize_l_[PADL_(l_size_t)]; l_size_t sigsetsize; char sigsetsize_r_[PADR_(l_size_t)]; }; struct linux_mount_setattr_args { syscallarg_t dummy; @@ -2033,7 +2038,7 @@ int linux_openat2(struct thread *, struct linux_openat2_args *); int linux_pidfd_getfd(struct thread *, struct linux_pidfd_getfd_args *); int linux_faccessat2(struct thread *, struct linux_faccessat2_args *); int linux_process_madvise(struct thread *, struct linux_process_madvise_args *); -int linux_epoll_pwait2(struct thread *, struct linux_epoll_pwait2_args *); +int linux_epoll_pwait2_64(struct thread *, struct linux_epoll_pwait2_64_args *); int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX_SYS_AUE_linux_exit AUE_EXIT #define LINUX_SYS_AUE_linux_fork AUE_FORK @@ -2398,7 +2403,7 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX_SYS_AUE_linux_pidfd_getfd AUE_NULL #define LINUX_SYS_AUE_linux_faccessat2 AUE_NULL #define LINUX_SYS_AUE_linux_process_madvise AUE_NULL -#define LINUX_SYS_AUE_linux_epoll_pwait2 AUE_NULL +#define LINUX_SYS_AUE_linux_epoll_pwait2_64 AUE_NULL #define LINUX_SYS_AUE_linux_mount_setattr AUE_NULL #undef PAD_ diff --git a/sys/i386/linux/linux_syscall.h b/sys/i386/linux/linux_syscall.h index d8d5b20238ae..a3a6fe680a7c 100644 --- a/sys/i386/linux/linux_syscall.h +++ b/sys/i386/linux/linux_syscall.h @@ -409,6 +409,6 @@ #define LINUX_SYS_linux_pidfd_getfd 438 #define LINUX_SYS_linux_faccessat2 439 #define LINUX_SYS_linux_process_madvise 440 -#define LINUX_SYS_linux_epoll_pwait2 441 +#define LINUX_SYS_linux_epoll_pwait2_64 441 #define LINUX_SYS_linux_mount_setattr 442 #define LINUX_SYS_MAXSYSCALL 444 diff --git a/sys/i386/linux/linux_syscalls.c b/sys/i386/linux/linux_syscalls.c index a1e54e20400f..95e44584ef2c 100644 --- a/sys/i386/linux/linux_syscalls.c +++ b/sys/i386/linux/linux_syscalls.c @@ -448,7 +448,7 @@ const char *linux_syscallnames[] = { "linux_pidfd_getfd", /* 438 = linux_pidfd_getfd */ "linux_faccessat2", /* 439 = linux_faccessat2 */ "linux_process_madvise", /* 440 = linux_process_madvise */ - "linux_epoll_pwait2", /* 441 = linux_epoll_pwait2 */ + "linux_epoll_pwait2_64", /* 441 = linux_epoll_pwait2_64 */ "linux_mount_setattr", /* 442 = linux_mount_setattr */ "#443", /* 443 = nosys */ }; diff --git a/sys/i386/linux/linux_sysent.c b/sys/i386/linux/linux_sysent.c index 2d1c44761a94..6ef4a556d9a2 100644 --- a/sys/i386/linux/linux_sysent.c +++ b/sys/i386/linux/linux_sysent.c @@ -458,7 +458,7 @@ struct sysent linux_sysent[] = { { .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 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_process_madvise, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 440 = linux_process_madvise */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_epoll_pwait2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 441 = linux_epoll_pwait2 */ + { .sy_narg = AS(linux_epoll_pwait2_64_args), .sy_call = (sy_call_t *)linux_epoll_pwait2_64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 441 = linux_epoll_pwait2_64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_mount_setattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 442 = linux_mount_setattr */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 443 = nosys */ }; diff --git a/sys/i386/linux/linux_systrace_args.c b/sys/i386/linux/linux_systrace_args.c index c2c12901d87d..0f1848600a32 100644 --- a/sys/i386/linux/linux_systrace_args.c +++ b/sys/i386/linux/linux_systrace_args.c @@ -3247,9 +3247,16 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 0; break; } - /* linux_epoll_pwait2 */ + /* linux_epoll_pwait2_64 */ case 441: { - *n_args = 0; + struct linux_epoll_pwait2_64_args *p = params; + iarg[a++] = p->epfd; /* l_int */ + uarg[a++] = (intptr_t)p->events; /* struct epoll_event * */ + iarg[a++] = p->maxevents; /* l_int */ + uarg[a++] = (intptr_t)p->timeout; /* struct l_timespec64 * */ + uarg[a++] = (intptr_t)p->mask; /* l_sigset_t * */ + iarg[a++] = p->sigsetsize; /* l_size_t */ + *n_args = 6; break; } /* linux_mount_setattr */ @@ -8429,8 +8436,30 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) /* linux_process_madvise */ case 440: break; - /* linux_epoll_pwait2 */ + /* linux_epoll_pwait2_64 */ case 441: + switch (ndx) { + case 0: + p = "l_int"; + break; + case 1: + p = "userland struct epoll_event *"; + break; + case 2: + p = "l_int"; + break; + case 3: + p = "userland struct l_timespec64 *"; + break; + case 4: + p = "userland l_sigset_t *"; + break; + case 5: + p = "l_size_t"; + break; + default: + break; + }; break; /* linux_mount_setattr */ case 442: @@ -10214,8 +10243,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_process_madvise */ case 440: - /* linux_epoll_pwait2 */ + /* linux_epoll_pwait2_64 */ case 441: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_mount_setattr */ case 442: default: