From nobody Fri Jun 17 19:39:28 2022 X-Original-To: dev-commits-src-branches@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 A928385C0F0; Fri, 17 Jun 2022 19:39:29 +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 4LPq9s2VBnz3R5n; Fri, 17 Jun 2022 19:39:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655494769; 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=NlrvkEvc5U5WypjUi6pbljokLCsLAMc2mFOVQT1W4UI=; b=tPKpBTTfAyTdyJ0ku+bxu8sXPcqXsCV+NEIlEP2G1DCjbLq8CK/gsdKcJCDDGH3NJDs1c1 uxifPh4GBlzOqDLYhtuKL0vLBgB3JQzTCo7n8cqSvGjyQ8foY5l/drDMHakzUb2b9jvQqI aQHVlssuH8tlihamb0InGUon90//GLuUth8RIQICDba2rXYeuT/KUYnf5Pw2Wyjpq2d+Dv u080jvlReCIsaTYES1xCyscnpgfds/Oe7maAyJZaewkDWas+pPKU7Jo/Hu1/KGjudLj3Za pSWdpeHyDCgaicy1wzN86wf5pSwJQ8WFnyJv27aUUW7jeWT8ZwdYweeUJ7jQYA== 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 D09AF25AD9; Fri, 17 Jun 2022 19:39:28 +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 25HJdSBL016063; Fri, 17 Jun 2022 19:39:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25HJdSXP016062; Fri, 17 Jun 2022 19:39:28 GMT (envelope-from git) Date: Fri, 17 Jun 2022 19:39:28 GMT Message-Id: <202206171939.25HJdSXP016062@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: 4b4dac6ce80c - stable/13 - linux(4): Regen for epoll_pwait2 syscall. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 4b4dac6ce80c1879532043f11be5e6dc947be7f3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655494769; 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=NlrvkEvc5U5WypjUi6pbljokLCsLAMc2mFOVQT1W4UI=; b=LB/iITv9zf7gFQ8SbLnr793YmXm6ssdc2raQVtD99Qwc+b27qDl4Ot5CXrIyCEz99k1Zp0 9uP+o5B0hgblHoNKbTe2sWaeZ2i4EPCuqxi3HNWMQWKPKru+tPLhbI4k+n5dlPKyiTAFbp burDjfapYHRHGw+VRvep6xl5GYkSVaExEMWUClx7POPGGRW5t7QDKYwIw2xbmt+xd5SH3+ zJu+IKTA14tO3h6hlEfs0dec3Fsk4SfwvZm0yf1zmu+tLUZcm8oye3uM37wPgdw2ZiG1fO D3eGYWOiP/eX2ksKSOPRW5ZuriVwhCNAJambzwe3dNdGkfa9Q0dvB56oh8k0PQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655494769; a=rsa-sha256; cv=none; b=h2s9N+aY38VreMEfNJaRu2iFjnRcYbcuWCu+wand2H0M9e6GNgdrcSjrBB62mIQ3v5rZLc lx6O6D2sXBvF+OptUervSCBE2EOFWWFNkIl+eBNPVk7l3xJf24tbCLNanPQR7F513GJPeH jMcI1gEB+egHLJSEwVglRMcWLOdLbesFqFXlqEItmw6YNxFPyqOtPkr98sIC/RW7HyAYND xq47s5PUnNYjnDnWE6i1LNASHqD8G6decyWVh2LVctTKsv3/Ykv032RNcnufq9qv9UGlyf 4IY9TnRPq6oADPckDMAW9V7uhDHkWrQ0zRffcIE3OlP5/aWA5vV16ZYpbSOdJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=4b4dac6ce80c1879532043f11be5e6dc947be7f3 commit 4b4dac6ce80c1879532043f11be5e6dc947be7f3 Author: Dmitry Chagin AuthorDate: 2022-06-17 19:34:09 +0000 Commit: Dmitry Chagin 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: