Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Jun 2022 19:39:28 GMT
From:      Dmitry Chagin <dchagin@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 4b4dac6ce80c - stable/13 - linux(4): Regen for epoll_pwait2 syscall.
Message-ID:  <202206171939.25HJdSXP016062@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by dchagin:

URL: https://cgit.FreeBSD.org/src/commit/?id=4b4dac6ce80c1879532043f11be5e6dc947be7f3

commit 4b4dac6ce80c1879532043f11be5e6dc947be7f3
Author:     Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2022-06-17 19:34:09 +0000
Commit:     Dmitry Chagin <dchagin@FreeBSD.org>
CommitDate: 2022-06-17 19:34:09 +0000

    linux(4): Regen for epoll_pwait2 syscall.
    
    (cherry picked from commit df377f1fb8dd92a1839bc578aac46d2cdf1b5b84)
---
 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         | 14 +++++++++--
 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              | 14 +++++++++--
 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, 182 insertions(+), 24 deletions(-)

diff --git a/sys/amd64/linux/linux_proto.h b/sys/amd64/linux/linux_proto.h
index 5a71da9083ef..7fdce58d24bd 100644
--- a/sys/amd64/linux/linux_proto.h
+++ b/sys/amd64/linux/linux_proto.h
@@ -1383,7 +1383,12 @@ struct linux_process_madvise_args {
 	register_t dummy;
 };
 struct linux_epoll_pwait2_args {
-	register_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 {
 	register_t dummy;
diff --git a/sys/amd64/linux/linux_sysent.c b/sys/amd64/linux/linux_sysent.c
index c4b18ef74995..418e791facdb 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 9746e3dd83e6..b0927605b027 100644
--- a/sys/amd64/linux/linux_systrace_args.c
+++ b/sys/amd64/linux/linux_systrace_args.c
@@ -2720,7 +2720,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[0] = p->epfd; /* l_int */
+		uarg[1] = (intptr_t)p->events; /* struct epoll_event * */
+		iarg[2] = p->maxevents; /* l_int */
+		uarg[3] = (intptr_t)p->timeout; /* struct l_timespec * */
+		uarg[4] = (intptr_t)p->mask; /* l_sigset_t * */
+		iarg[5] = p->sigsetsize; /* l_size_t */
+		*n_args = 6;
 		break;
 	}
 	/* linux_mount_setattr */
@@ -7080,6 +7087,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:
@@ -8567,6 +8596,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 f0b83563b8df..5edcadb59a2e 100644
--- a/sys/amd64/linux32/linux32_proto.h
+++ b/sys/amd64/linux32/linux32_proto.h
@@ -1670,8 +1670,18 @@ struct linux_faccessat2_args {
 struct linux_process_madvise_args {
 	register_t dummy;
 };
+<<<<<<< HEAD
 struct linux_epoll_pwait2_args {
 	register_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)];
+>>>>>>> df377f1fb8dd (linux(4): Regen for epoll_pwait2 syscall.)
 };
 struct linux_mount_setattr_args {
 	register_t dummy;
@@ -2038,7 +2048,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 *);
 
 #ifdef COMPAT_43
@@ -2450,7 +2460,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 3aa32866427d..c601e8fc6c5d 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 2a31ddc3f7a5..c32f0e382911 100644
--- a/sys/amd64/linux32/linux32_systrace_args.c
+++ b/sys/amd64/linux32/linux32_systrace_args.c
@@ -3207,9 +3207,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 */
@@ -8351,8 +8358,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:
@@ -10107,8 +10136,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 a18c177a494c..6df5364edf81 100644
--- a/sys/arm64/linux/linux_proto.h
+++ b/sys/arm64/linux/linux_proto.h
@@ -1193,7 +1193,12 @@ struct linux_process_madvise_args {
 	register_t dummy;
 };
 struct linux_epoll_pwait2_args {
-	register_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 {
 	register_t dummy;
diff --git a/sys/arm64/linux/linux_sysent.c b/sys/arm64/linux/linux_sysent.c
index aae80f4ed528..5efb01778595 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 e3bdb075bcac..98d4cb860b1c 100644
--- a/sys/arm64/linux/linux_systrace_args.c
+++ b/sys/arm64/linux/linux_systrace_args.c
@@ -2342,7 +2342,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[0] = p->epfd; /* l_int */
+		uarg[1] = (intptr_t)p->events; /* struct epoll_event * */
+		iarg[2] = p->maxevents; /* l_int */
+		uarg[3] = (intptr_t)p->timeout; /* struct l_timespec * */
+		uarg[4] = (intptr_t)p->mask; /* l_sigset_t * */
+		iarg[5] = p->sigsetsize; /* l_size_t */
+		*n_args = 6;
 		break;
 	}
 	/* linux_mount_setattr */
@@ -6155,6 +6162,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:
@@ -7427,6 +7456,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 413804c68b16..ccc194f84425 100644
--- a/sys/i386/linux/linux_proto.h
+++ b/sys/i386/linux/linux_proto.h
@@ -1663,8 +1663,18 @@ struct linux_faccessat2_args {
 struct linux_process_madvise_args {
 	register_t dummy;
 };
+<<<<<<< HEAD
 struct linux_epoll_pwait2_args {
 	register_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)];
+>>>>>>> df377f1fb8dd (linux(4): Regen for epoll_pwait2 syscall.)
 };
 struct linux_mount_setattr_args {
 	register_t dummy;
@@ -2033,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 *);
 
 #ifdef COMPAT_43
@@ -2447,7 +2457,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 7c77d90b5bbd..10d764ee82dc 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 dd62c925ccc2..14379e085fce 100644
--- a/sys/i386/linux/linux_systrace_args.c
+++ b/sys/i386/linux/linux_systrace_args.c
@@ -3246,9 +3246,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 */
@@ -8428,8 +8435,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:
@@ -10213,8 +10242,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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202206171939.25HJdSXP016062>