Module Name: src Committed By: christos Date: Sat Jun 29 13:46:32 UTC 2024
Modified Files: src/sys/compat/linux/arch/aarch64: linux_syscall.h linux_syscallargs.h linux_syscalls.c linux_sysent.c linux_systrace_args.c src/sys/compat/linux/arch/alpha: linux_syscall.h linux_syscallargs.h linux_syscalls.c linux_sysent.c src/sys/compat/linux/arch/amd64: linux_syscall.h linux_syscallargs.h linux_syscalls.c linux_sysent.c linux_systrace_args.c src/sys/compat/linux/arch/arm: linux_syscall.h linux_syscallargs.h linux_syscalls.c linux_sysent.c linux_systrace_args.c src/sys/compat/linux/arch/i386: linux_syscall.h linux_syscallargs.h linux_syscalls.c linux_sysent.c linux_systrace_args.c src/sys/compat/linux/arch/m68k: linux_syscall.h linux_syscallargs.h linux_syscalls.c linux_sysent.c src/sys/compat/linux/arch/mips: linux_syscall.h linux_syscallargs.h linux_syscalls.c linux_sysent.c src/sys/compat/linux/arch/powerpc: linux_syscall.h linux_syscallargs.h linux_syscalls.c linux_sysent.c Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/compat/linux/arch/aarch64/linux_syscall.h \ src/sys/compat/linux/arch/aarch64/linux_syscallargs.h \ src/sys/compat/linux/arch/aarch64/linux_syscalls.c \ src/sys/compat/linux/arch/aarch64/linux_sysent.c \ src/sys/compat/linux/arch/aarch64/linux_systrace_args.c cvs rdiff -u -r1.119 -r1.120 src/sys/compat/linux/arch/alpha/linux_syscall.h \ src/sys/compat/linux/arch/alpha/linux_sysent.c cvs rdiff -u -r1.118 -r1.119 \ src/sys/compat/linux/arch/alpha/linux_syscallargs.h cvs rdiff -u -r1.120 -r1.121 src/sys/compat/linux/arch/alpha/linux_syscalls.c cvs rdiff -u -r1.81 -r1.82 src/sys/compat/linux/arch/amd64/linux_syscall.h \ src/sys/compat/linux/arch/amd64/linux_syscallargs.h \ src/sys/compat/linux/arch/amd64/linux_syscalls.c \ src/sys/compat/linux/arch/amd64/linux_sysent.c cvs rdiff -u -r1.25 -r1.26 \ src/sys/compat/linux/arch/amd64/linux_systrace_args.c cvs rdiff -u -r1.92 -r1.93 src/sys/compat/linux/arch/arm/linux_syscall.h \ src/sys/compat/linux/arch/arm/linux_syscallargs.h \ src/sys/compat/linux/arch/arm/linux_syscalls.c \ src/sys/compat/linux/arch/arm/linux_sysent.c cvs rdiff -u -r1.25 -r1.26 \ src/sys/compat/linux/arch/arm/linux_systrace_args.c cvs rdiff -u -r1.126 -r1.127 src/sys/compat/linux/arch/i386/linux_syscall.h \ src/sys/compat/linux/arch/i386/linux_syscallargs.h \ src/sys/compat/linux/arch/i386/linux_sysent.c cvs rdiff -u -r1.127 -r1.128 src/sys/compat/linux/arch/i386/linux_syscalls.c cvs rdiff -u -r1.21 -r1.22 \ src/sys/compat/linux/arch/i386/linux_systrace_args.c cvs rdiff -u -r1.117 -r1.118 src/sys/compat/linux/arch/m68k/linux_syscall.h \ src/sys/compat/linux/arch/m68k/linux_syscalls.c \ src/sys/compat/linux/arch/m68k/linux_sysent.c cvs rdiff -u -r1.116 -r1.117 \ src/sys/compat/linux/arch/m68k/linux_syscallargs.h cvs rdiff -u -r1.90 -r1.91 src/sys/compat/linux/arch/mips/linux_syscall.h cvs rdiff -u -r1.89 -r1.90 src/sys/compat/linux/arch/mips/linux_syscallargs.h \ src/sys/compat/linux/arch/mips/linux_syscalls.c \ src/sys/compat/linux/arch/mips/linux_sysent.c cvs rdiff -u -r1.96 -r1.97 src/sys/compat/linux/arch/powerpc/linux_syscall.h \ src/sys/compat/linux/arch/powerpc/linux_sysent.c cvs rdiff -u -r1.95 -r1.96 \ src/sys/compat/linux/arch/powerpc/linux_syscallargs.h \ src/sys/compat/linux/arch/powerpc/linux_syscalls.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/compat/linux/arch/aarch64/linux_syscall.h diff -u src/sys/compat/linux/arch/aarch64/linux_syscall.h:1.10 src/sys/compat/linux/arch/aarch64/linux_syscall.h:1.11 --- src/sys/compat/linux/arch/aarch64/linux_syscall.h:1.10 Sat Aug 19 13:50:24 2023 +++ src/sys/compat/linux/arch/aarch64/linux_syscall.h Sat Jun 29 09:46:31 2024 @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscall.h,v 1.10 2023/08/19 17:50:24 christos Exp $ */ +/* $NetBSD: linux_syscall.h,v 1.11 2024/06/29 13:46:31 christos Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.11 2023/08/19 17:49:49 christos Exp + * created from NetBSD: syscalls.master,v 1.12 2024/06/29 13:46:09 christos Exp */ #ifndef _LINUX_SYS_SYSCALL_H_ @@ -423,6 +423,9 @@ /* syscall: "umask" ret: "int" args: "int" */ #define LINUX_SYS_umask 166 +/* syscall: "getcpu" ret: "int" args: "unsigned int *" "unsigned int *" "struct linux_getcpu_cache *" */ +#define LINUX_SYS_getcpu 168 + /* syscall: "gettimeofday" ret: "int" args: "struct timeval50 *" "struct timezone *" */ #define LINUX_SYS_gettimeofday 169 @@ -621,6 +624,9 @@ /* syscall: "close_range" ret: "int" args: "unsigned int" "unsigned int" "unsigned int" */ #define LINUX_SYS_close_range 436 +/* syscall: "faccessat2" ret: "int" args: "int" "const char *" "int" "int" */ +#define LINUX_SYS_faccessat2 439 + /* syscall: "nosys" ret: "int" args: */ #define LINUX_SYS_nosys 440 Index: src/sys/compat/linux/arch/aarch64/linux_syscallargs.h diff -u src/sys/compat/linux/arch/aarch64/linux_syscallargs.h:1.10 src/sys/compat/linux/arch/aarch64/linux_syscallargs.h:1.11 --- src/sys/compat/linux/arch/aarch64/linux_syscallargs.h:1.10 Sat Aug 19 13:50:24 2023 +++ src/sys/compat/linux/arch/aarch64/linux_syscallargs.h Sat Jun 29 09:46:31 2024 @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscallargs.h,v 1.10 2023/08/19 17:50:24 christos Exp $ */ +/* $NetBSD: linux_syscallargs.h,v 1.11 2024/06/29 13:46:31 christos Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.11 2023/08/19 17:49:49 christos Exp + * created from NetBSD: syscalls.master,v 1.12 2024/06/29 13:46:09 christos Exp */ #ifndef _LINUX_SYS_SYSCALLARGS_H_ @@ -756,6 +756,13 @@ struct compat_50_sys_getrusage_args; struct sys_umask_args; +struct linux_sys_getcpu_args { + syscallarg(unsigned int *) cpu; + syscallarg(unsigned int *) node; + syscallarg(struct linux_getcpu_cache *) tcache; +}; +check_syscall_args(linux_sys_getcpu) + struct linux_sys_gettimeofday_args { syscallarg(struct timeval50 *) tp; syscallarg(struct timezone *) tzp; @@ -1053,6 +1060,14 @@ struct linux_sys_close_range_args { }; check_syscall_args(linux_sys_close_range) +struct linux_sys_faccessat2_args { + syscallarg(int) fd; + syscallarg(const char *) path; + syscallarg(int) amode; + syscallarg(int) flags; +}; +check_syscall_args(linux_sys_faccessat2) + struct linux_sys_epoll_pwait2_args { syscallarg(int) epfd; syscallarg(struct linux_epoll_event *) events; @@ -1340,6 +1355,8 @@ int compat_50_sys_getrusage(struct lwp * int sys_umask(struct lwp *, const struct sys_umask_args *, register_t *); +int linux_sys_getcpu(struct lwp *, const struct linux_sys_getcpu_args *, register_t *); + int linux_sys_gettimeofday(struct lwp *, const struct linux_sys_gettimeofday_args *, register_t *); int linux_sys_settimeofday(struct lwp *, const struct linux_sys_settimeofday_args *, register_t *); @@ -1475,6 +1492,8 @@ int linux_sys_statx(struct lwp *, const int linux_sys_close_range(struct lwp *, const struct linux_sys_close_range_args *, register_t *); +int linux_sys_faccessat2(struct lwp *, const struct linux_sys_faccessat2_args *, register_t *); + int linux_sys_nosys(struct lwp *, const void *, register_t *); int linux_sys_epoll_pwait2(struct lwp *, const struct linux_sys_epoll_pwait2_args *, register_t *); Index: src/sys/compat/linux/arch/aarch64/linux_syscalls.c diff -u src/sys/compat/linux/arch/aarch64/linux_syscalls.c:1.10 src/sys/compat/linux/arch/aarch64/linux_syscalls.c:1.11 --- src/sys/compat/linux/arch/aarch64/linux_syscalls.c:1.10 Sat Aug 19 13:50:24 2023 +++ src/sys/compat/linux/arch/aarch64/linux_syscalls.c Sat Jun 29 09:46:31 2024 @@ -1,14 +1,14 @@ -/* $NetBSD: linux_syscalls.c,v 1.10 2023/08/19 17:50:24 christos Exp $ */ +/* $NetBSD: linux_syscalls.c,v 1.11 2024/06/29 13:46:31 christos Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.11 2023/08/19 17:49:49 christos Exp + * created from NetBSD: syscalls.master,v 1.12 2024/06/29 13:46:09 christos Exp */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.10 2023/08/19 17:50:24 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.11 2024/06/29 13:46:31 christos Exp $"); #if defined(_KERNEL_OPT) #if defined(_KERNEL_OPT) @@ -30,6 +30,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_syscal #include <compat/linux/common/linux_misc.h> #include <compat/linux/common/linux_mmap.h> #include <compat/linux/common/linux_msg.h> +#include <compat/linux/common/linux_sched.h> #include <compat/linux/common/linux_sem.h> #include <compat/linux/common/linux_shm.h> #include <compat/linux/common/linux_siginfo.h> @@ -208,7 +209,7 @@ const char *const linux_syscallnames[] = /* 165 */ "getrusage", /* 166 */ "umask", /* 167 */ "#167 (unimplemented prctl)", - /* 168 */ "#168 (unimplemented getcpu)", + /* 168 */ "getcpu", /* 169 */ "gettimeofday", /* 170 */ "settimeofday", /* 171 */ "#171 (unimplemented adjtimex)", @@ -500,7 +501,7 @@ const char *const linux_syscallnames[] = /* 436 */ "close_range", /* 437 */ "#437 (unimplemented openat2)", /* 438 */ "#438 (unimplemented pidfd_getfd)", - /* 439 */ "#439 (unimplemented faccessat2)", + /* 439 */ "faccessat2", /* 440 */ "nosys", /* 441 */ "epoll_pwait2", /* 442 */ "# filler", @@ -746,7 +747,7 @@ const char *const altlinux_syscallnames[ /* 165 */ NULL, /* getrusage */ /* 166 */ NULL, /* umask */ /* 167 */ NULL, /* unimplemented prctl */ - /* 168 */ NULL, /* unimplemented getcpu */ + /* 168 */ NULL, /* getcpu */ /* 169 */ NULL, /* gettimeofday */ /* 170 */ NULL, /* settimeofday */ /* 171 */ NULL, /* unimplemented adjtimex */ @@ -1038,7 +1039,7 @@ const char *const altlinux_syscallnames[ /* 436 */ NULL, /* close_range */ /* 437 */ NULL, /* unimplemented openat2 */ /* 438 */ NULL, /* unimplemented pidfd_getfd */ - /* 439 */ NULL, /* unimplemented faccessat2 */ + /* 439 */ NULL, /* faccessat2 */ /* 440 */ NULL, /* nosys */ /* 441 */ NULL, /* epoll_pwait2 */ /* 442 */ NULL, /* filler */ Index: src/sys/compat/linux/arch/aarch64/linux_sysent.c diff -u src/sys/compat/linux/arch/aarch64/linux_sysent.c:1.10 src/sys/compat/linux/arch/aarch64/linux_sysent.c:1.11 --- src/sys/compat/linux/arch/aarch64/linux_sysent.c:1.10 Sat Aug 19 13:50:24 2023 +++ src/sys/compat/linux/arch/aarch64/linux_sysent.c Sat Jun 29 09:46:31 2024 @@ -1,14 +1,14 @@ -/* $NetBSD: linux_sysent.c,v 1.10 2023/08/19 17:50:24 christos Exp $ */ +/* $NetBSD: linux_sysent.c,v 1.11 2024/06/29 13:46:31 christos Exp $ */ /* * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.11 2023/08/19 17:49:49 christos Exp + * created from NetBSD: syscalls.master,v 1.12 2024/06/29 13:46:09 christos Exp */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.10 2023/08/19 17:50:24 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.11 2024/06/29 13:46:31 christos Exp $"); #if defined(_KERNEL_OPT) #include "opt_sysv.h" @@ -29,6 +29,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sysent #include <compat/linux/common/linux_misc.h> #include <compat/linux/common/linux_mmap.h> #include <compat/linux/common/linux_msg.h> +#include <compat/linux/common/linux_sched.h> #include <compat/linux/common/linux_sem.h> #include <compat/linux/common/linux_shm.h> #include <compat/linux/common/linux_siginfo.h> @@ -770,8 +771,10 @@ struct sysent linux_sysent[] = { .sy_call = linux_sys_nosys, }, /* 167 = filler */ { - .sy_call = linux_sys_nosys, - }, /* 168 = filler */ + ns(struct linux_sys_getcpu_args), + .sy_flags = SYCALL_ARG_PTR, + .sy_call = (sy_call_t *)linux_sys_getcpu + }, /* 168 = getcpu */ { ns(struct linux_sys_gettimeofday_args), .sy_flags = SYCALL_ARG_PTR, @@ -1728,8 +1731,10 @@ struct sysent linux_sysent[] = { .sy_call = linux_sys_nosys, }, /* 438 = filler */ { - .sy_call = linux_sys_nosys, - }, /* 439 = filler */ + ns(struct linux_sys_faccessat2_args), + .sy_flags = SYCALL_ARG_PTR, + .sy_call = (sy_call_t *)linux_sys_faccessat2 + }, /* 439 = faccessat2 */ { .sy_call = (sy_call_t *)linux_sys_nosys }, /* 440 = nosys */ Index: src/sys/compat/linux/arch/aarch64/linux_systrace_args.c diff -u src/sys/compat/linux/arch/aarch64/linux_systrace_args.c:1.10 src/sys/compat/linux/arch/aarch64/linux_systrace_args.c:1.11 --- src/sys/compat/linux/arch/aarch64/linux_systrace_args.c:1.10 Sat Aug 19 13:50:24 2023 +++ src/sys/compat/linux/arch/aarch64/linux_systrace_args.c Sat Jun 29 09:46:31 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_systrace_args.c,v 1.10 2023/08/19 17:50:24 christos Exp $ */ +/* $NetBSD: linux_systrace_args.c,v 1.11 2024/06/29 13:46:31 christos Exp $ */ /* * System call argument to DTrace register array conversion. @@ -1177,6 +1177,15 @@ systrace_args(register_t sysnum, const v *n_args = 1; break; } + /* linux_sys_getcpu */ + case 168: { + const struct linux_sys_getcpu_args *p = params; + uarg[0] = (intptr_t) SCARG(p, cpu); /* unsigned int * */ + uarg[1] = (intptr_t) SCARG(p, node); /* unsigned int * */ + uarg[2] = (intptr_t) SCARG(p, tcache); /* struct linux_getcpu_cache * */ + *n_args = 3; + break; + } /* linux_sys_gettimeofday */ case 169: { const struct linux_sys_gettimeofday_args *p = params; @@ -1730,6 +1739,16 @@ systrace_args(register_t sysnum, const v *n_args = 3; break; } + /* linux_sys_faccessat2 */ + case 439: { + const struct linux_sys_faccessat2_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, path); /* const char * */ + iarg[2] = SCARG(p, amode); /* int */ + iarg[3] = SCARG(p, flags); /* int */ + *n_args = 4; + break; + } /* linux_sys_nosys */ case 440: { *n_args = 0; @@ -3740,6 +3759,22 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; + /* linux_sys_getcpu */ + case 168: + switch(ndx) { + case 0: + p = "unsigned int *"; + break; + case 1: + p = "unsigned int *"; + break; + case 2: + p = "struct linux_getcpu_cache *"; + break; + default: + break; + }; + break; /* linux_sys_gettimeofday */ case 169: switch(ndx) { @@ -4680,6 +4715,25 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; + /* linux_sys_faccessat2 */ + case 439: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "const char *"; + break; + case 2: + p = "int"; + break; + case 3: + p = "int"; + break; + default: + break; + }; + break; /* linux_sys_nosys */ case 440: break; @@ -5389,6 +5443,11 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; + /* linux_sys_getcpu */ + case 168: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_sys_gettimeofday */ case 169: if (ndx == 0 || ndx == 1) @@ -5689,6 +5748,11 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; + /* linux_sys_faccessat2 */ + case 439: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_sys_nosys */ case 440: /* linux_sys_epoll_pwait2 */ Index: src/sys/compat/linux/arch/alpha/linux_syscall.h diff -u src/sys/compat/linux/arch/alpha/linux_syscall.h:1.119 src/sys/compat/linux/arch/alpha/linux_syscall.h:1.120 --- src/sys/compat/linux/arch/alpha/linux_syscall.h:1.119 Sat Aug 19 13:50:24 2023 +++ src/sys/compat/linux/arch/alpha/linux_syscall.h Sat Jun 29 09:46:31 2024 @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscall.h,v 1.119 2023/08/19 17:50:24 christos Exp $ */ +/* $NetBSD: linux_syscall.h,v 1.120 2024/06/29 13:46:31 christos Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.106 2023/08/19 17:49:49 christos Exp + * created from NetBSD: syscalls.master,v 1.107 2024/06/29 13:46:09 christos Exp */ #ifndef _LINUX_SYS_SYSCALL_H_ @@ -735,6 +735,9 @@ /* syscall: "__futex_get_robust_list" ret: "int" args: "lwpid_t" "void **" "size_t *" */ #define LINUX_SYS___futex_get_robust_list 467 +/* syscall: "getcpu" ret: "int" args: "unsigned int *" "unsigned int *" "struct linux_getcpu_cache *" */ +#define LINUX_SYS_getcpu 473 + /* syscall: "epoll_pwait" ret: "int" args: "int" "struct linux_epoll_event *" "int" "int" "const linux_sigset_t *" */ #define LINUX_SYS_epoll_pwait 474 @@ -795,6 +798,9 @@ /* syscall: "close_range" ret: "int" args: "unsigned int" "unsigned int" "unsigned int" */ #define LINUX_SYS_close_range 546 +/* syscall: "faccessat2" ret: "int" args: "int" "const char *" "int" "int" */ +#define LINUX_SYS_faccessat2 549 + /* syscall: "epoll_pwait2" ret: "int" args: "int" "struct linux_epoll_event *" "int" "const struct linux_timespec *" "const linux_sigset_t *" */ #define LINUX_SYS_epoll_pwait2 551 Index: src/sys/compat/linux/arch/alpha/linux_sysent.c diff -u src/sys/compat/linux/arch/alpha/linux_sysent.c:1.119 src/sys/compat/linux/arch/alpha/linux_sysent.c:1.120 --- src/sys/compat/linux/arch/alpha/linux_sysent.c:1.119 Sat Aug 19 13:50:24 2023 +++ src/sys/compat/linux/arch/alpha/linux_sysent.c Sat Jun 29 09:46:32 2024 @@ -1,14 +1,14 @@ -/* $NetBSD: linux_sysent.c,v 1.119 2023/08/19 17:50:24 christos Exp $ */ +/* $NetBSD: linux_sysent.c,v 1.120 2024/06/29 13:46:32 christos Exp $ */ /* * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.106 2023/08/19 17:49:49 christos Exp + * created from NetBSD: syscalls.master,v 1.107 2024/06/29 13:46:09 christos Exp */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.119 2023/08/19 17:50:24 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.120 2024/06/29 13:46:32 christos Exp $"); #if defined(_KERNEL_OPT) #include "opt_sysv.h" @@ -24,6 +24,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sysent #include <compat/linux/common/linux_siginfo.h> #include <compat/linux/common/linux_ipc.h> #include <compat/linux/common/linux_msg.h> +#include <compat/linux/common/linux_sched.h> #include <compat/linux/common/linux_sem.h> #include <compat/linux/common/linux_shm.h> #include <compat/linux/common/linux_mmap.h> @@ -1899,8 +1900,10 @@ struct sysent linux_sysent[] = { .sy_call = linux_sys_nosys, }, /* 472 = filler */ { - .sy_call = linux_sys_nosys, - }, /* 473 = filler */ + ns(struct linux_sys_getcpu_args), + .sy_flags = SYCALL_ARG_PTR, + .sy_call = (sy_call_t *)linux_sys_getcpu + }, /* 473 = getcpu */ { ns(struct linux_sys_epoll_pwait_args), .sy_flags = SYCALL_ARG_PTR, @@ -2160,8 +2163,10 @@ struct sysent linux_sysent[] = { .sy_call = linux_sys_nosys, }, /* 548 = filler */ { - .sy_call = linux_sys_nosys, - }, /* 549 = filler */ + ns(struct linux_sys_faccessat2_args), + .sy_flags = SYCALL_ARG_PTR, + .sy_call = (sy_call_t *)linux_sys_faccessat2 + }, /* 549 = faccessat2 */ { .sy_call = linux_sys_nosys, }, /* 550 = filler */ Index: src/sys/compat/linux/arch/alpha/linux_syscallargs.h diff -u src/sys/compat/linux/arch/alpha/linux_syscallargs.h:1.118 src/sys/compat/linux/arch/alpha/linux_syscallargs.h:1.119 --- src/sys/compat/linux/arch/alpha/linux_syscallargs.h:1.118 Sat Aug 19 13:50:24 2023 +++ src/sys/compat/linux/arch/alpha/linux_syscallargs.h Sat Jun 29 09:46:31 2024 @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscallargs.h,v 1.118 2023/08/19 17:50:24 christos Exp $ */ +/* $NetBSD: linux_syscallargs.h,v 1.119 2024/06/29 13:46:31 christos Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.106 2023/08/19 17:49:49 christos Exp + * created from NetBSD: syscalls.master,v 1.107 2024/06/29 13:46:09 christos Exp */ #ifndef _LINUX_SYS_SYSCALLARGS_H_ @@ -1175,6 +1175,13 @@ struct sys___futex_set_robust_list_args; struct sys___futex_get_robust_list_args; +struct linux_sys_getcpu_args { + syscallarg(unsigned int *) cpu; + syscallarg(unsigned int *) node; + syscallarg(struct linux_getcpu_cache *) tcache; +}; +check_syscall_args(linux_sys_getcpu) + struct linux_sys_epoll_pwait_args { syscallarg(int) epfd; syscallarg(struct linux_epoll_event *) events; @@ -1321,6 +1328,14 @@ struct linux_sys_close_range_args { }; check_syscall_args(linux_sys_close_range) +struct linux_sys_faccessat2_args { + syscallarg(int) fd; + syscallarg(const char *) path; + syscallarg(int) amode; + syscallarg(int) flags; +}; +check_syscall_args(linux_sys_faccessat2) + struct linux_sys_epoll_pwait2_args { syscallarg(int) epfd; syscallarg(struct linux_epoll_event *) events; @@ -1820,6 +1835,8 @@ int sys___futex_set_robust_list(struct l int sys___futex_get_robust_list(struct lwp *, const struct sys___futex_get_robust_list_args *, register_t *); +int linux_sys_getcpu(struct lwp *, const struct linux_sys_getcpu_args *, register_t *); + int linux_sys_epoll_pwait(struct lwp *, const struct linux_sys_epoll_pwait_args *, register_t *); int linux_sys_utimensat(struct lwp *, const struct linux_sys_utimensat_args *, register_t *); @@ -1860,6 +1877,8 @@ int linux_sys_statx(struct lwp *, const int linux_sys_close_range(struct lwp *, const struct linux_sys_close_range_args *, register_t *); +int linux_sys_faccessat2(struct lwp *, const struct linux_sys_faccessat2_args *, register_t *); + int linux_sys_epoll_pwait2(struct lwp *, const struct linux_sys_epoll_pwait2_args *, register_t *); #endif /* _LINUX_SYS_SYSCALLARGS_H_ */ Index: src/sys/compat/linux/arch/alpha/linux_syscalls.c diff -u src/sys/compat/linux/arch/alpha/linux_syscalls.c:1.120 src/sys/compat/linux/arch/alpha/linux_syscalls.c:1.121 --- src/sys/compat/linux/arch/alpha/linux_syscalls.c:1.120 Sat Aug 19 13:50:24 2023 +++ src/sys/compat/linux/arch/alpha/linux_syscalls.c Sat Jun 29 09:46:32 2024 @@ -1,14 +1,14 @@ -/* $NetBSD: linux_syscalls.c,v 1.120 2023/08/19 17:50:24 christos Exp $ */ +/* $NetBSD: linux_syscalls.c,v 1.121 2024/06/29 13:46:32 christos Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.106 2023/08/19 17:49:49 christos Exp + * created from NetBSD: syscalls.master,v 1.107 2024/06/29 13:46:09 christos Exp */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.120 2023/08/19 17:50:24 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.121 2024/06/29 13:46:32 christos Exp $"); #if defined(_KERNEL_OPT) #if defined(_KERNEL_OPT) @@ -25,6 +25,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_syscal #include <compat/linux/common/linux_siginfo.h> #include <compat/linux/common/linux_ipc.h> #include <compat/linux/common/linux_msg.h> +#include <compat/linux/common/linux_sched.h> #include <compat/linux/common/linux_sem.h> #include <compat/linux/common/linux_shm.h> #include <compat/linux/common/linux_mmap.h> @@ -532,7 +533,7 @@ const char *const linux_syscallnames[] = /* 470 */ "#470 (unimplemented tee)", /* 471 */ "#471 (unimplemented vmsplice)", /* 472 */ "#472 (unimplemented move_pages)", - /* 473 */ "#473 (unimplemented getcpu)", + /* 473 */ "getcpu", /* 474 */ "epoll_pwait", /* 475 */ "utimensat", /* 476 */ "#476 (unimplemented signalfd)", @@ -608,7 +609,7 @@ const char *const linux_syscallnames[] = /* 546 */ "close_range", /* 547 */ "#547 (unimplemented)", /* 548 */ "#548 (unimplemented)", - /* 549 */ "#549 (unimplemented)", + /* 549 */ "faccessat2", /* 550 */ "#550 (unimplemented)", /* 551 */ "epoll_pwait2", /* 552 */ "# filler", @@ -1585,7 +1586,7 @@ const char *const altlinux_syscallnames[ /* 470 */ NULL, /* unimplemented tee */ /* 471 */ NULL, /* unimplemented vmsplice */ /* 472 */ NULL, /* unimplemented move_pages */ - /* 473 */ NULL, /* unimplemented getcpu */ + /* 473 */ NULL, /* getcpu */ /* 474 */ NULL, /* epoll_pwait */ /* 475 */ NULL, /* utimensat */ /* 476 */ NULL, /* unimplemented signalfd */ @@ -1661,7 +1662,7 @@ const char *const altlinux_syscallnames[ /* 546 */ NULL, /* close_range */ /* 547 */ NULL, /* unimplemented */ /* 548 */ NULL, /* unimplemented */ - /* 549 */ NULL, /* unimplemented */ + /* 549 */ NULL, /* faccessat2 */ /* 550 */ NULL, /* unimplemented */ /* 551 */ NULL, /* epoll_pwait2 */ /* 552 */ NULL, /* filler */ Index: src/sys/compat/linux/arch/amd64/linux_syscall.h diff -u src/sys/compat/linux/arch/amd64/linux_syscall.h:1.81 src/sys/compat/linux/arch/amd64/linux_syscall.h:1.82 --- src/sys/compat/linux/arch/amd64/linux_syscall.h:1.81 Sat Aug 19 13:50:24 2023 +++ src/sys/compat/linux/arch/amd64/linux_syscall.h Sat Jun 29 09:46:32 2024 @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscall.h,v 1.81 2023/08/19 17:50:24 christos Exp $ */ +/* $NetBSD: linux_syscall.h,v 1.82 2024/06/29 13:46:32 christos Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.72 2023/08/19 17:49:49 christos Exp + * created from NetBSD: syscalls.master,v 1.73 2024/06/29 13:46:09 christos Exp */ #ifndef _LINUX_SYS_SYSCALL_H_ @@ -735,6 +735,9 @@ /* syscall: "sendmmsg" ret: "int" args: "int" "struct linux_mmsghdr *" "unsigned int" "unsigned int" */ #define LINUX_SYS_sendmmsg 307 +/* syscall: "getcpu" ret: "int" args: "unsigned int *" "unsigned int *" "struct linux_getcpu_cache *" */ +#define LINUX_SYS_getcpu 309 + /* syscall: "getrandom" ret: "ssize_t" args: "void *" "size_t" "unsigned int" */ #define LINUX_SYS_getrandom 318 @@ -747,6 +750,9 @@ /* syscall: "close_range" ret: "int" args: "unsigned int" "unsigned int" "unsigned int" */ #define LINUX_SYS_close_range 436 +/* syscall: "faccessat2" ret: "int" args: "int" "const char *" "int" "int" */ +#define LINUX_SYS_faccessat2 439 + /* syscall: "epoll_pwait2" ret: "int" args: "int" "struct linux_epoll_event *" "int" "const struct linux_timespec *" "const linux_sigset_t *" */ #define LINUX_SYS_epoll_pwait2 441 Index: src/sys/compat/linux/arch/amd64/linux_syscallargs.h diff -u src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.81 src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.82 --- src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.81 Sat Aug 19 13:50:24 2023 +++ src/sys/compat/linux/arch/amd64/linux_syscallargs.h Sat Jun 29 09:46:32 2024 @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscallargs.h,v 1.81 2023/08/19 17:50:24 christos Exp $ */ +/* $NetBSD: linux_syscallargs.h,v 1.82 2024/06/29 13:46:32 christos Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.72 2023/08/19 17:49:49 christos Exp + * created from NetBSD: syscalls.master,v 1.73 2024/06/29 13:46:09 christos Exp */ #ifndef _LINUX_SYS_SYSCALLARGS_H_ @@ -1195,6 +1195,13 @@ struct linux_sys_sendmmsg_args { }; check_syscall_args(linux_sys_sendmmsg) +struct linux_sys_getcpu_args { + syscallarg(unsigned int *) cpu; + syscallarg(unsigned int *) node; + syscallarg(struct linux_getcpu_cache *) tcache; +}; +check_syscall_args(linux_sys_getcpu) + struct sys_getrandom_args; struct linux_sys_memfd_create_args { @@ -1219,6 +1226,14 @@ struct linux_sys_close_range_args { }; check_syscall_args(linux_sys_close_range) +struct linux_sys_faccessat2_args { + syscallarg(int) fd; + syscallarg(const char *) path; + syscallarg(int) amode; + syscallarg(int) flags; +}; +check_syscall_args(linux_sys_faccessat2) + struct linux_sys_epoll_pwait2_args { syscallarg(int) epfd; syscallarg(struct linux_epoll_event *) events; @@ -1719,6 +1734,8 @@ int linux_sys_prlimit64(struct lwp *, co int linux_sys_sendmmsg(struct lwp *, const struct linux_sys_sendmmsg_args *, register_t *); +int linux_sys_getcpu(struct lwp *, const struct linux_sys_getcpu_args *, register_t *); + int sys_getrandom(struct lwp *, const struct sys_getrandom_args *, register_t *); int linux_sys_memfd_create(struct lwp *, const struct linux_sys_memfd_create_args *, register_t *); @@ -1727,6 +1744,8 @@ int linux_sys_statx(struct lwp *, const int linux_sys_close_range(struct lwp *, const struct linux_sys_close_range_args *, register_t *); +int linux_sys_faccessat2(struct lwp *, const struct linux_sys_faccessat2_args *, register_t *); + int linux_sys_epoll_pwait2(struct lwp *, const struct linux_sys_epoll_pwait2_args *, register_t *); int linux_sys_nosys(struct lwp *, const void *, register_t *); Index: src/sys/compat/linux/arch/amd64/linux_syscalls.c diff -u src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.81 src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.82 --- src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.81 Sat Aug 19 13:50:24 2023 +++ src/sys/compat/linux/arch/amd64/linux_syscalls.c Sat Jun 29 09:46:32 2024 @@ -1,14 +1,14 @@ -/* $NetBSD: linux_syscalls.c,v 1.81 2023/08/19 17:50:24 christos Exp $ */ +/* $NetBSD: linux_syscalls.c,v 1.82 2024/06/29 13:46:32 christos Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.72 2023/08/19 17:49:49 christos Exp + * created from NetBSD: syscalls.master,v 1.73 2024/06/29 13:46:09 christos Exp */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.81 2023/08/19 17:50:24 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.82 2024/06/29 13:46:32 christos Exp $"); #if defined(_KERNEL_OPT) #if defined(_KERNEL_OPT) @@ -29,6 +29,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_syscal #include <compat/linux/common/linux_mmap.h> #include <compat/linux/common/linux_ipc.h> #include <compat/linux/common/linux_msg.h> +#include <compat/linux/common/linux_sched.h> #include <compat/linux/common/linux_sem.h> #include <compat/linux/common/linux_shm.h> #include <compat/linux/common/linux_signal.h> @@ -376,7 +377,7 @@ const char *const linux_syscallnames[] = /* 306 */ "#306 (unimplemented syncfs)", /* 307 */ "sendmmsg", /* 308 */ "#308 (unimplemented setns)", - /* 309 */ "#309 (unimplemented getcpu)", + /* 309 */ "getcpu", /* 310 */ "#310 (unimplemented process_vm_readv)", /* 311 */ "#311 (unimplemented process_vm_writev)", /* 312 */ "#312 (unimplemented kcmp)", @@ -506,7 +507,7 @@ const char *const linux_syscallnames[] = /* 436 */ "close_range", /* 437 */ "#437 (unimplemented openat2)", /* 438 */ "#438 (unimplemented pidfd_getfd)", - /* 439 */ "#439 (unimplemented faccessat2)", + /* 439 */ "faccessat2", /* 440 */ "#440 (unimplemented process_madvise)", /* 441 */ "epoll_pwait2", /* 442 */ "#442 (unimplemented mount_setattr)", @@ -920,7 +921,7 @@ const char *const altlinux_syscallnames[ /* 306 */ NULL, /* unimplemented syncfs */ /* 307 */ NULL, /* sendmmsg */ /* 308 */ NULL, /* unimplemented setns */ - /* 309 */ NULL, /* unimplemented getcpu */ + /* 309 */ NULL, /* getcpu */ /* 310 */ NULL, /* unimplemented process_vm_readv */ /* 311 */ NULL, /* unimplemented process_vm_writev */ /* 312 */ NULL, /* unimplemented kcmp */ @@ -1050,7 +1051,7 @@ const char *const altlinux_syscallnames[ /* 436 */ NULL, /* close_range */ /* 437 */ NULL, /* unimplemented openat2 */ /* 438 */ NULL, /* unimplemented pidfd_getfd */ - /* 439 */ NULL, /* unimplemented faccessat2 */ + /* 439 */ NULL, /* faccessat2 */ /* 440 */ NULL, /* unimplemented process_madvise */ /* 441 */ NULL, /* epoll_pwait2 */ /* 442 */ NULL, /* unimplemented mount_setattr */ Index: src/sys/compat/linux/arch/amd64/linux_sysent.c diff -u src/sys/compat/linux/arch/amd64/linux_sysent.c:1.81 src/sys/compat/linux/arch/amd64/linux_sysent.c:1.82 --- src/sys/compat/linux/arch/amd64/linux_sysent.c:1.81 Sat Aug 19 13:50:24 2023 +++ src/sys/compat/linux/arch/amd64/linux_sysent.c Sat Jun 29 09:46:32 2024 @@ -1,14 +1,14 @@ -/* $NetBSD: linux_sysent.c,v 1.81 2023/08/19 17:50:24 christos Exp $ */ +/* $NetBSD: linux_sysent.c,v 1.82 2024/06/29 13:46:32 christos Exp $ */ /* * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.72 2023/08/19 17:49:49 christos Exp + * created from NetBSD: syscalls.master,v 1.73 2024/06/29 13:46:09 christos Exp */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.81 2023/08/19 17:50:24 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.82 2024/06/29 13:46:32 christos Exp $"); #if defined(_KERNEL_OPT) #include "opt_sysv.h" @@ -28,6 +28,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sysent #include <compat/linux/common/linux_mmap.h> #include <compat/linux/common/linux_ipc.h> #include <compat/linux/common/linux_msg.h> +#include <compat/linux/common/linux_sched.h> #include <compat/linux/common/linux_sem.h> #include <compat/linux/common/linux_shm.h> #include <compat/linux/common/linux_signal.h> @@ -1400,8 +1401,10 @@ struct sysent linux_sysent[] = { .sy_call = linux_sys_nosys, }, /* 308 = filler */ { - .sy_call = linux_sys_nosys, - }, /* 309 = filler */ + ns(struct linux_sys_getcpu_args), + .sy_flags = SYCALL_ARG_PTR, + .sy_call = (sy_call_t *)linux_sys_getcpu + }, /* 309 = getcpu */ { .sy_call = linux_sys_nosys, }, /* 310 = filler */ @@ -1797,8 +1800,10 @@ struct sysent linux_sysent[] = { .sy_call = linux_sys_nosys, }, /* 438 = filler */ { - .sy_call = linux_sys_nosys, - }, /* 439 = filler */ + ns(struct linux_sys_faccessat2_args), + .sy_flags = SYCALL_ARG_PTR, + .sy_call = (sy_call_t *)linux_sys_faccessat2 + }, /* 439 = faccessat2 */ { .sy_call = linux_sys_nosys, }, /* 440 = filler */ Index: src/sys/compat/linux/arch/amd64/linux_systrace_args.c diff -u src/sys/compat/linux/arch/amd64/linux_systrace_args.c:1.25 src/sys/compat/linux/arch/amd64/linux_systrace_args.c:1.26 --- src/sys/compat/linux/arch/amd64/linux_systrace_args.c:1.25 Sat Aug 19 13:50:24 2023 +++ src/sys/compat/linux/arch/amd64/linux_systrace_args.c Sat Jun 29 09:46:32 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_systrace_args.c,v 1.25 2023/08/19 17:50:24 christos Exp $ */ +/* $NetBSD: linux_systrace_args.c,v 1.26 2024/06/29 13:46:32 christos Exp $ */ /* * System call argument to DTrace register array conversion. @@ -2009,6 +2009,15 @@ systrace_args(register_t sysnum, const v *n_args = 4; break; } + /* linux_sys_getcpu */ + case 309: { + const struct linux_sys_getcpu_args *p = params; + uarg[0] = (intptr_t) SCARG(p, cpu); /* unsigned int * */ + uarg[1] = (intptr_t) SCARG(p, node); /* unsigned int * */ + uarg[2] = (intptr_t) SCARG(p, tcache); /* struct linux_getcpu_cache * */ + *n_args = 3; + break; + } /* sys_getrandom */ case 318: { const struct sys_getrandom_args *p = params; @@ -2046,6 +2055,16 @@ systrace_args(register_t sysnum, const v *n_args = 3; break; } + /* linux_sys_faccessat2 */ + case 439: { + const struct linux_sys_faccessat2_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, path); /* const char * */ + iarg[2] = SCARG(p, amode); /* int */ + iarg[3] = SCARG(p, flags); /* int */ + *n_args = 4; + break; + } /* linux_sys_epoll_pwait2 */ case 441: { const struct linux_sys_epoll_pwait2_args *p = params; @@ -5420,6 +5439,22 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; + /* linux_sys_getcpu */ + case 309: + switch(ndx) { + case 0: + p = "unsigned int *"; + break; + case 1: + p = "unsigned int *"; + break; + case 2: + p = "struct linux_getcpu_cache *"; + break; + default: + break; + }; + break; /* sys_getrandom */ case 318: switch(ndx) { @@ -5487,6 +5522,25 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; + /* linux_sys_faccessat2 */ + case 439: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "const char *"; + break; + case 2: + p = "int"; + break; + case 3: + p = "int"; + break; + default: + break; + }; + break; /* linux_sys_epoll_pwait2 */ case 441: switch(ndx) { @@ -6667,6 +6721,11 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; + /* linux_sys_getcpu */ + case 309: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* sys_getrandom */ case 318: if (ndx == 0 || ndx == 1) @@ -6687,6 +6746,11 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; + /* linux_sys_faccessat2 */ + case 439: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_sys_epoll_pwait2 */ case 441: if (ndx == 0 || ndx == 1) Index: src/sys/compat/linux/arch/arm/linux_syscall.h diff -u src/sys/compat/linux/arch/arm/linux_syscall.h:1.92 src/sys/compat/linux/arch/arm/linux_syscall.h:1.93 --- src/sys/compat/linux/arch/arm/linux_syscall.h:1.92 Sat Aug 19 13:50:24 2023 +++ src/sys/compat/linux/arch/arm/linux_syscall.h Sat Jun 29 09:46:32 2024 @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscall.h,v 1.92 2023/08/19 17:50:24 christos Exp $ */ +/* $NetBSD: linux_syscall.h,v 1.93 2024/06/29 13:46:32 christos Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.79 2023/08/19 17:49:49 christos Exp + * created from NetBSD: syscalls.master,v 1.80 2024/06/29 13:46:09 christos Exp */ #ifndef _LINUX_SYS_SYSCALL_H_ @@ -739,6 +739,9 @@ /* syscall: "__futex_get_robust_list" ret: "int" args: "lwpid_t" "void **" "size_t *" */ #define LINUX_SYS___futex_get_robust_list 339 +/* syscall: "getcpu" ret: "int" args: "unsigned int *" "unsigned int *" "struct linux_getcpu_cache *" */ +#define LINUX_SYS_getcpu 345 + /* syscall: "epoll_pwait" ret: "int" args: "int" "struct linux_epoll_event *" "int" "int" "const linux_sigset_t *" */ #define LINUX_SYS_epoll_pwait 346 @@ -808,6 +811,9 @@ /* syscall: "close_range" ret: "int" args: "unsigned int" "unsigned int" "unsigned int" */ #define LINUX_SYS_close_range 436 +/* syscall: "faccessat2" ret: "int" args: "int" "const char *" "int" "int" */ +#define LINUX_SYS_faccessat2 439 + /* syscall: "epoll_pwait2" ret: "int" args: "int" "struct linux_epoll_event *" "int" "const struct linux_timespec *" "const linux_sigset_t *" */ #define LINUX_SYS_epoll_pwait2 441 Index: src/sys/compat/linux/arch/arm/linux_syscallargs.h diff -u src/sys/compat/linux/arch/arm/linux_syscallargs.h:1.92 src/sys/compat/linux/arch/arm/linux_syscallargs.h:1.93 --- src/sys/compat/linux/arch/arm/linux_syscallargs.h:1.92 Sat Aug 19 13:50:24 2023 +++ src/sys/compat/linux/arch/arm/linux_syscallargs.h Sat Jun 29 09:46:32 2024 @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscallargs.h,v 1.92 2023/08/19 17:50:24 christos Exp $ */ +/* $NetBSD: linux_syscallargs.h,v 1.93 2024/06/29 13:46:32 christos Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.79 2023/08/19 17:49:49 christos Exp + * created from NetBSD: syscalls.master,v 1.80 2024/06/29 13:46:09 christos Exp */ #ifndef _LINUX_SYS_SYSCALLARGS_H_ @@ -1139,6 +1139,13 @@ struct sys___futex_set_robust_list_args; struct sys___futex_get_robust_list_args; +struct linux_sys_getcpu_args { + syscallarg(unsigned int *) cpu; + syscallarg(unsigned int *) node; + syscallarg(struct linux_getcpu_cache *) tcache; +}; +check_syscall_args(linux_sys_getcpu) + struct linux_sys_epoll_pwait_args { syscallarg(int) epfd; syscallarg(struct linux_epoll_event *) events; @@ -1297,6 +1304,14 @@ struct linux_sys_close_range_args { }; check_syscall_args(linux_sys_close_range) +struct linux_sys_faccessat2_args { + syscallarg(int) fd; + syscallarg(const char *) path; + syscallarg(int) amode; + syscallarg(int) flags; +}; +check_syscall_args(linux_sys_faccessat2) + struct linux_sys_epoll_pwait2_args { syscallarg(int) epfd; syscallarg(struct linux_epoll_event *) events; @@ -1772,6 +1787,8 @@ int sys___futex_set_robust_list(struct l int sys___futex_get_robust_list(struct lwp *, const struct sys___futex_get_robust_list_args *, register_t *); +int linux_sys_getcpu(struct lwp *, const struct linux_sys_getcpu_args *, register_t *); + int linux_sys_epoll_pwait(struct lwp *, const struct linux_sys_epoll_pwait_args *, register_t *); int linux_sys_utimensat(struct lwp *, const struct linux_sys_utimensat_args *, register_t *); @@ -1818,6 +1835,8 @@ int linux_sys_statx(struct lwp *, const int linux_sys_close_range(struct lwp *, const struct linux_sys_close_range_args *, register_t *); +int linux_sys_faccessat2(struct lwp *, const struct linux_sys_faccessat2_args *, register_t *); + int linux_sys_epoll_pwait2(struct lwp *, const struct linux_sys_epoll_pwait2_args *, register_t *); #endif /* _LINUX_SYS_SYSCALLARGS_H_ */ Index: src/sys/compat/linux/arch/arm/linux_syscalls.c diff -u src/sys/compat/linux/arch/arm/linux_syscalls.c:1.92 src/sys/compat/linux/arch/arm/linux_syscalls.c:1.93 --- src/sys/compat/linux/arch/arm/linux_syscalls.c:1.92 Sat Aug 19 13:50:24 2023 +++ src/sys/compat/linux/arch/arm/linux_syscalls.c Sat Jun 29 09:46:32 2024 @@ -1,14 +1,14 @@ -/* $NetBSD: linux_syscalls.c,v 1.92 2023/08/19 17:50:24 christos Exp $ */ +/* $NetBSD: linux_syscalls.c,v 1.93 2024/06/29 13:46:32 christos Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.79 2023/08/19 17:49:49 christos Exp + * created from NetBSD: syscalls.master,v 1.80 2024/06/29 13:46:09 christos Exp */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.92 2023/08/19 17:50:24 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.93 2024/06/29 13:46:32 christos Exp $"); #if defined(_KERNEL_OPT) #include <sys/param.h> @@ -24,6 +24,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_syscal #include <compat/linux/common/linux_signal.h> #include <compat/linux/common/linux_siginfo.h> #include <compat/linux/common/linux_machdep.h> +#include <compat/linux/common/linux_sched.h> #include <compat/linux/linux_syscallargs.h> #else /* _KERNEL_OPT */ #include <sys/null.h> @@ -380,7 +381,7 @@ const char *const linux_syscallnames[] = /* 342 */ "#342 (unimplemented tee)", /* 343 */ "#343 (unimplemented vmsplice)", /* 344 */ "#344 (unimplemented move_pages)", - /* 345 */ "#345 (unimplemented getcpu)", + /* 345 */ "getcpu", /* 346 */ "epoll_pwait", /* 347 */ "#347 (unimplemented kexec_load)", /* 348 */ "utimensat", @@ -474,7 +475,7 @@ const char *const linux_syscallnames[] = /* 436 */ "close_range", /* 437 */ "#437 (unimplemented)", /* 438 */ "#438 (unimplemented)", - /* 439 */ "#439 (unimplemented)", + /* 439 */ "faccessat2", /* 440 */ "#440 (unimplemented)", /* 441 */ "epoll_pwait2", /* 442 */ "# filler", @@ -902,7 +903,7 @@ const char *const altlinux_syscallnames[ /* 342 */ NULL, /* unimplemented tee */ /* 343 */ NULL, /* unimplemented vmsplice */ /* 344 */ NULL, /* unimplemented move_pages */ - /* 345 */ NULL, /* unimplemented getcpu */ + /* 345 */ NULL, /* getcpu */ /* 346 */ NULL, /* epoll_pwait */ /* 347 */ NULL, /* unimplemented kexec_load */ /* 348 */ NULL, /* utimensat */ @@ -996,7 +997,7 @@ const char *const altlinux_syscallnames[ /* 436 */ NULL, /* close_range */ /* 437 */ NULL, /* unimplemented */ /* 438 */ NULL, /* unimplemented */ - /* 439 */ NULL, /* unimplemented */ + /* 439 */ NULL, /* faccessat2 */ /* 440 */ NULL, /* unimplemented */ /* 441 */ NULL, /* epoll_pwait2 */ /* 442 */ NULL, /* filler */ Index: src/sys/compat/linux/arch/arm/linux_sysent.c diff -u src/sys/compat/linux/arch/arm/linux_sysent.c:1.92 src/sys/compat/linux/arch/arm/linux_sysent.c:1.93 --- src/sys/compat/linux/arch/arm/linux_sysent.c:1.92 Sat Aug 19 13:50:24 2023 +++ src/sys/compat/linux/arch/arm/linux_sysent.c Sat Jun 29 09:46:32 2024 @@ -1,14 +1,14 @@ -/* $NetBSD: linux_sysent.c,v 1.92 2023/08/19 17:50:24 christos Exp $ */ +/* $NetBSD: linux_sysent.c,v 1.93 2024/06/29 13:46:32 christos Exp $ */ /* * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.79 2023/08/19 17:49:49 christos Exp + * created from NetBSD: syscalls.master,v 1.80 2024/06/29 13:46:09 christos Exp */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.92 2023/08/19 17:50:24 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.93 2024/06/29 13:46:32 christos Exp $"); #include <sys/param.h> #include <sys/poll.h> @@ -23,6 +23,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sysent #include <compat/linux/common/linux_signal.h> #include <compat/linux/common/linux_siginfo.h> #include <compat/linux/common/linux_machdep.h> +#include <compat/linux/common/linux_sched.h> #include <compat/linux/linux_syscallargs.h> #define s(type) sizeof(type) @@ -1449,8 +1450,10 @@ struct sysent linux_sysent[] = { .sy_call = linux_sys_nosys, }, /* 344 = filler */ { - .sy_call = linux_sys_nosys, - }, /* 345 = filler */ + ns(struct linux_sys_getcpu_args), + .sy_flags = SYCALL_ARG_PTR, + .sy_call = (sy_call_t *)linux_sys_getcpu + }, /* 345 = getcpu */ { ns(struct linux_sys_epoll_pwait_args), .sy_flags = SYCALL_ARG_PTR, @@ -1767,8 +1770,10 @@ struct sysent linux_sysent[] = { .sy_call = linux_sys_nosys, }, /* 438 = filler */ { - .sy_call = linux_sys_nosys, - }, /* 439 = filler */ + ns(struct linux_sys_faccessat2_args), + .sy_flags = SYCALL_ARG_PTR, + .sy_call = (sy_call_t *)linux_sys_faccessat2 + }, /* 439 = faccessat2 */ { .sy_call = linux_sys_nosys, }, /* 440 = filler */ Index: src/sys/compat/linux/arch/arm/linux_systrace_args.c diff -u src/sys/compat/linux/arch/arm/linux_systrace_args.c:1.25 src/sys/compat/linux/arch/arm/linux_systrace_args.c:1.26 --- src/sys/compat/linux/arch/arm/linux_systrace_args.c:1.25 Sat Aug 19 13:50:24 2023 +++ src/sys/compat/linux/arch/arm/linux_systrace_args.c Sat Jun 29 09:46:32 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_systrace_args.c,v 1.25 2023/08/19 17:50:24 christos Exp $ */ +/* $NetBSD: linux_systrace_args.c,v 1.26 2024/06/29 13:46:32 christos Exp $ */ /* * System call argument to DTrace register array conversion. @@ -1942,6 +1942,15 @@ systrace_args(register_t sysnum, const v *n_args = 3; break; } + /* linux_sys_getcpu */ + case 345: { + const struct linux_sys_getcpu_args *p = params; + uarg[0] = (intptr_t) SCARG(p, cpu); /* unsigned int * */ + uarg[1] = (intptr_t) SCARG(p, node); /* unsigned int * */ + uarg[2] = (intptr_t) SCARG(p, tcache); /* struct linux_getcpu_cache * */ + *n_args = 3; + break; + } /* linux_sys_epoll_pwait */ case 346: { const struct linux_sys_epoll_pwait_args *p = params; @@ -2149,6 +2158,16 @@ systrace_args(register_t sysnum, const v *n_args = 3; break; } + /* linux_sys_faccessat2 */ + case 439: { + const struct linux_sys_faccessat2_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, path); /* const char * */ + iarg[2] = SCARG(p, amode); /* int */ + iarg[3] = SCARG(p, flags); /* int */ + *n_args = 4; + break; + } /* linux_sys_epoll_pwait2 */ case 441: { const struct linux_sys_epoll_pwait2_args *p = params; @@ -5323,6 +5342,22 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; + /* linux_sys_getcpu */ + case 345: + switch(ndx) { + case 0: + p = "unsigned int *"; + break; + case 1: + p = "unsigned int *"; + break; + case 2: + p = "struct linux_getcpu_cache *"; + break; + default: + break; + }; + break; /* linux_sys_epoll_pwait */ case 346: switch(ndx) { @@ -5690,6 +5725,25 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; + /* linux_sys_faccessat2 */ + case 439: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "const char *"; + break; + case 2: + p = "int"; + break; + case 3: + p = "int"; + break; + default: + break; + }; + break; /* linux_sys_epoll_pwait2 */ case 441: switch(ndx) { @@ -6846,6 +6900,11 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; + /* linux_sys_getcpu */ + case 345: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_sys_epoll_pwait */ case 346: if (ndx == 0 || ndx == 1) @@ -6958,6 +7017,11 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; + /* linux_sys_faccessat2 */ + case 439: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_sys_epoll_pwait2 */ case 441: if (ndx == 0 || ndx == 1) Index: src/sys/compat/linux/arch/i386/linux_syscall.h diff -u src/sys/compat/linux/arch/i386/linux_syscall.h:1.126 src/sys/compat/linux/arch/i386/linux_syscall.h:1.127 --- src/sys/compat/linux/arch/i386/linux_syscall.h:1.126 Sat Aug 19 13:50:24 2023 +++ src/sys/compat/linux/arch/i386/linux_syscall.h Sat Jun 29 09:46:32 2024 @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscall.h,v 1.126 2023/08/19 17:50:24 christos Exp $ */ +/* $NetBSD: linux_syscall.h,v 1.127 2024/06/29 13:46:32 christos Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.134 2023/08/19 17:49:49 christos Exp + * created from NetBSD: syscalls.master,v 1.135 2024/06/29 13:46:09 christos Exp */ #ifndef _LINUX_SYS_SYSCALL_H_ @@ -761,6 +761,9 @@ /* syscall: "__futex_get_robust_list" ret: "int" args: "lwpid_t" "void **" "size_t *" */ #define LINUX_SYS___futex_get_robust_list 312 +/* syscall: "getcpu" ret: "int" args: "unsigned int *" "unsigned int *" "struct linux_getcpu_cache *" */ +#define LINUX_SYS_getcpu 318 + /* syscall: "epoll_pwait" ret: "int" args: "int" "struct linux_epoll_event *" "int" "int" "const linux_sigset_t *" */ #define LINUX_SYS_epoll_pwait 319 @@ -818,6 +821,9 @@ /* syscall: "close_range" ret: "int" args: "unsigned int" "unsigned int" "unsigned int" */ #define LINUX_SYS_close_range 436 +/* syscall: "faccessat2" ret: "int" args: "int" "const char *" "int" "int" */ +#define LINUX_SYS_faccessat2 439 + /* syscall: "epoll_pwait2" ret: "int" args: "int" "struct linux_epoll_event *" "int" "const struct linux_timespec *" "const linux_sigset_t *" */ #define LINUX_SYS_epoll_pwait2 441 Index: src/sys/compat/linux/arch/i386/linux_syscallargs.h diff -u src/sys/compat/linux/arch/i386/linux_syscallargs.h:1.126 src/sys/compat/linux/arch/i386/linux_syscallargs.h:1.127 --- src/sys/compat/linux/arch/i386/linux_syscallargs.h:1.126 Sat Aug 19 13:50:24 2023 +++ src/sys/compat/linux/arch/i386/linux_syscallargs.h Sat Jun 29 09:46:32 2024 @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscallargs.h,v 1.126 2023/08/19 17:50:24 christos Exp $ */ +/* $NetBSD: linux_syscallargs.h,v 1.127 2024/06/29 13:46:32 christos Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.134 2023/08/19 17:49:49 christos Exp + * created from NetBSD: syscalls.master,v 1.135 2024/06/29 13:46:09 christos Exp */ #ifndef _LINUX_SYS_SYSCALLARGS_H_ @@ -1186,6 +1186,13 @@ struct sys___futex_set_robust_list_args; struct sys___futex_get_robust_list_args; +struct linux_sys_getcpu_args { + syscallarg(unsigned int *) cpu; + syscallarg(unsigned int *) node; + syscallarg(struct linux_getcpu_cache *) tcache; +}; +check_syscall_args(linux_sys_getcpu) + struct linux_sys_epoll_pwait_args { syscallarg(int) epfd; syscallarg(struct linux_epoll_event *) events; @@ -1315,6 +1322,14 @@ struct linux_sys_close_range_args { }; check_syscall_args(linux_sys_close_range) +struct linux_sys_faccessat2_args { + syscallarg(int) fd; + syscallarg(const char *) path; + syscallarg(int) amode; + syscallarg(int) flags; +}; +check_syscall_args(linux_sys_faccessat2) + struct linux_sys_epoll_pwait2_args { syscallarg(int) epfd; syscallarg(struct linux_epoll_event *) events; @@ -1806,6 +1821,8 @@ int sys___futex_set_robust_list(struct l int sys___futex_get_robust_list(struct lwp *, const struct sys___futex_get_robust_list_args *, register_t *); +int linux_sys_getcpu(struct lwp *, const struct linux_sys_getcpu_args *, register_t *); + int linux_sys_epoll_pwait(struct lwp *, const struct linux_sys_epoll_pwait_args *, register_t *); int linux_sys_utimensat(struct lwp *, const struct linux_sys_utimensat_args *, register_t *); @@ -1844,6 +1861,8 @@ int linux_sys_statx(struct lwp *, const int linux_sys_close_range(struct lwp *, const struct linux_sys_close_range_args *, register_t *); +int linux_sys_faccessat2(struct lwp *, const struct linux_sys_faccessat2_args *, register_t *); + int linux_sys_epoll_pwait2(struct lwp *, const struct linux_sys_epoll_pwait2_args *, register_t *); #endif /* _LINUX_SYS_SYSCALLARGS_H_ */ Index: src/sys/compat/linux/arch/i386/linux_sysent.c diff -u src/sys/compat/linux/arch/i386/linux_sysent.c:1.126 src/sys/compat/linux/arch/i386/linux_sysent.c:1.127 --- src/sys/compat/linux/arch/i386/linux_sysent.c:1.126 Sat Aug 19 13:50:24 2023 +++ src/sys/compat/linux/arch/i386/linux_sysent.c Sat Jun 29 09:46:32 2024 @@ -1,14 +1,14 @@ -/* $NetBSD: linux_sysent.c,v 1.126 2023/08/19 17:50:24 christos Exp $ */ +/* $NetBSD: linux_sysent.c,v 1.127 2024/06/29 13:46:32 christos Exp $ */ /* * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.134 2023/08/19 17:49:49 christos Exp + * created from NetBSD: syscalls.master,v 1.135 2024/06/29 13:46:09 christos Exp */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.126 2023/08/19 17:50:24 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.127 2024/06/29 13:46:32 christos Exp $"); #include <sys/param.h> #include <sys/poll.h> @@ -22,6 +22,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sysent #include <compat/linux/common/linux_signal.h> #include <compat/linux/common/linux_siginfo.h> #include <compat/linux/common/linux_machdep.h> +#include <compat/linux/common/linux_sched.h> #include <compat/linux/linux_syscallargs.h> #define s(type) sizeof(type) @@ -1381,8 +1382,10 @@ struct sysent linux_sysent[] = { .sy_call = linux_sys_nosys, }, /* 317 = filler */ { - .sy_call = linux_sys_nosys, - }, /* 318 = filler */ + ns(struct linux_sys_getcpu_args), + .sy_flags = SYCALL_ARG_PTR, + .sy_call = (sy_call_t *)linux_sys_getcpu + }, /* 318 = getcpu */ { ns(struct linux_sys_epoll_pwait_args), .sy_flags = SYCALL_ARG_PTR, @@ -1775,8 +1778,10 @@ struct sysent linux_sysent[] = { .sy_call = linux_sys_nosys, }, /* 438 = filler */ { - .sy_call = linux_sys_nosys, - }, /* 439 = filler */ + ns(struct linux_sys_faccessat2_args), + .sy_flags = SYCALL_ARG_PTR, + .sy_call = (sy_call_t *)linux_sys_faccessat2 + }, /* 439 = faccessat2 */ { .sy_call = linux_sys_nosys, }, /* 440 = filler */ Index: src/sys/compat/linux/arch/i386/linux_syscalls.c diff -u src/sys/compat/linux/arch/i386/linux_syscalls.c:1.127 src/sys/compat/linux/arch/i386/linux_syscalls.c:1.128 --- src/sys/compat/linux/arch/i386/linux_syscalls.c:1.127 Sat Aug 19 13:50:24 2023 +++ src/sys/compat/linux/arch/i386/linux_syscalls.c Sat Jun 29 09:46:32 2024 @@ -1,14 +1,14 @@ -/* $NetBSD: linux_syscalls.c,v 1.127 2023/08/19 17:50:24 christos Exp $ */ +/* $NetBSD: linux_syscalls.c,v 1.128 2024/06/29 13:46:32 christos Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.134 2023/08/19 17:49:49 christos Exp + * created from NetBSD: syscalls.master,v 1.135 2024/06/29 13:46:09 christos Exp */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.127 2023/08/19 17:50:24 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.128 2024/06/29 13:46:32 christos Exp $"); #if defined(_KERNEL_OPT) #include <sys/param.h> @@ -23,6 +23,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_syscal #include <compat/linux/common/linux_signal.h> #include <compat/linux/common/linux_siginfo.h> #include <compat/linux/common/linux_machdep.h> +#include <compat/linux/common/linux_sched.h> #include <compat/linux/linux_syscallargs.h> #else /* _KERNEL_OPT */ #include <sys/null.h> @@ -352,7 +353,7 @@ const char *const linux_syscallnames[] = /* 315 */ "#315 (unimplemented tee)", /* 316 */ "#316 (unimplemented vmsplice)", /* 317 */ "#317 (unimplemented move_pages)", - /* 318 */ "#318 (unimplemented getcpu)", + /* 318 */ "getcpu", /* 319 */ "epoll_pwait", /* 320 */ "utimensat", /* 321 */ "#321 (unimplemented signalfd)", @@ -473,7 +474,7 @@ const char *const linux_syscallnames[] = /* 436 */ "close_range", /* 437 */ "#437 (unimplemented openat2)", /* 438 */ "#438 (unimplemented pidfd_getfd)", - /* 439 */ "#439 (unimplemented faccessat2)", + /* 439 */ "faccessat2", /* 440 */ "#440 (unimplemented process_madvise)", /* 441 */ "epoll_pwait2", /* 442 */ "# filler", @@ -874,7 +875,7 @@ const char *const altlinux_syscallnames[ /* 315 */ NULL, /* unimplemented tee */ /* 316 */ NULL, /* unimplemented vmsplice */ /* 317 */ NULL, /* unimplemented move_pages */ - /* 318 */ NULL, /* unimplemented getcpu */ + /* 318 */ NULL, /* getcpu */ /* 319 */ NULL, /* epoll_pwait */ /* 320 */ NULL, /* utimensat */ /* 321 */ NULL, /* unimplemented signalfd */ @@ -995,7 +996,7 @@ const char *const altlinux_syscallnames[ /* 436 */ NULL, /* close_range */ /* 437 */ NULL, /* unimplemented openat2 */ /* 438 */ NULL, /* unimplemented pidfd_getfd */ - /* 439 */ NULL, /* unimplemented faccessat2 */ + /* 439 */ NULL, /* faccessat2 */ /* 440 */ NULL, /* unimplemented process_madvise */ /* 441 */ NULL, /* epoll_pwait2 */ /* 442 */ NULL, /* filler */ Index: src/sys/compat/linux/arch/i386/linux_systrace_args.c diff -u src/sys/compat/linux/arch/i386/linux_systrace_args.c:1.21 src/sys/compat/linux/arch/i386/linux_systrace_args.c:1.22 --- src/sys/compat/linux/arch/i386/linux_systrace_args.c:1.21 Sat Aug 19 13:50:24 2023 +++ src/sys/compat/linux/arch/i386/linux_systrace_args.c Sat Jun 29 09:46:32 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_systrace_args.c,v 1.21 2023/08/19 17:50:24 christos Exp $ */ +/* $NetBSD: linux_systrace_args.c,v 1.22 2024/06/29 13:46:32 christos Exp $ */ /* * System call argument to DTrace register array conversion. @@ -2005,6 +2005,15 @@ systrace_args(register_t sysnum, const v *n_args = 3; break; } + /* linux_sys_getcpu */ + case 318: { + const struct linux_sys_getcpu_args *p = params; + uarg[0] = (intptr_t) SCARG(p, cpu); /* unsigned int * */ + uarg[1] = (intptr_t) SCARG(p, node); /* unsigned int * */ + uarg[2] = (intptr_t) SCARG(p, tcache); /* struct linux_getcpu_cache * */ + *n_args = 3; + break; + } /* linux_sys_epoll_pwait */ case 319: { const struct linux_sys_epoll_pwait_args *p = params; @@ -2177,6 +2186,16 @@ systrace_args(register_t sysnum, const v *n_args = 3; break; } + /* linux_sys_faccessat2 */ + case 439: { + const struct linux_sys_faccessat2_args *p = params; + iarg[0] = SCARG(p, fd); /* int */ + uarg[1] = (intptr_t) SCARG(p, path); /* const char * */ + iarg[2] = SCARG(p, amode); /* int */ + iarg[3] = SCARG(p, flags); /* int */ + *n_args = 4; + break; + } /* linux_sys_epoll_pwait2 */ case 441: { const struct linux_sys_epoll_pwait2_args *p = params; @@ -5452,6 +5471,22 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; + /* linux_sys_getcpu */ + case 318: + switch(ndx) { + case 0: + p = "unsigned int *"; + break; + case 1: + p = "unsigned int *"; + break; + case 2: + p = "struct linux_getcpu_cache *"; + break; + default: + break; + }; + break; /* linux_sys_epoll_pwait */ case 319: switch(ndx) { @@ -5759,6 +5794,25 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; + /* linux_sys_faccessat2 */ + case 439: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "const char *"; + break; + case 2: + p = "int"; + break; + case 3: + p = "int"; + break; + default: + break; + }; + break; /* linux_sys_epoll_pwait2 */ case 441: switch(ndx) { @@ -6955,6 +7009,11 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; + /* linux_sys_getcpu */ + case 318: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_sys_epoll_pwait */ case 319: if (ndx == 0 || ndx == 1) @@ -7050,6 +7109,11 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; + /* linux_sys_faccessat2 */ + case 439: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_sys_epoll_pwait2 */ case 441: if (ndx == 0 || ndx == 1) Index: src/sys/compat/linux/arch/m68k/linux_syscall.h diff -u src/sys/compat/linux/arch/m68k/linux_syscall.h:1.117 src/sys/compat/linux/arch/m68k/linux_syscall.h:1.118 --- src/sys/compat/linux/arch/m68k/linux_syscall.h:1.117 Sat Aug 19 13:50:25 2023 +++ src/sys/compat/linux/arch/m68k/linux_syscall.h Sat Jun 29 09:46:32 2024 @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscall.h,v 1.117 2023/08/19 17:50:25 christos Exp $ */ +/* $NetBSD: linux_syscall.h,v 1.118 2024/06/29 13:46:32 christos Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.104 2023/08/19 17:49:49 christos Exp + * created from NetBSD: syscalls.master,v 1.105 2024/06/29 13:46:10 christos Exp */ #ifndef _LINUX_SYS_SYSCALL_H_ @@ -747,6 +747,9 @@ /* syscall: "sched_getaffinity" ret: "int" args: "pid_t" "unsigned int" "unsigned long *" */ #define LINUX_SYS_sched_getaffinity 312 +/* syscall: "getcpu" ret: "int" args: "unsigned int *" "unsigned int *" "struct linux_getcpu_cache *" */ +#define LINUX_SYS_getcpu 314 + /* syscall: "epoll_pwait" ret: "int" args: "int" "struct linux_epoll_event *" "int" "int" "const linux_sigset_t *" */ #define LINUX_SYS_epoll_pwait 315 @@ -810,6 +813,9 @@ /* syscall: "close_range" ret: "int" args: "unsigned int" "unsigned int" "unsigned int" */ #define LINUX_SYS_close_range 436 +/* syscall: "faccessat2" ret: "int" args: "int" "const char *" "int" "int" */ +#define LINUX_SYS_faccessat2 439 + /* syscall: "epoll_pwait2" ret: "int" args: "int" "struct linux_epoll_event *" "int" "const struct linux_timespec *" "const linux_sigset_t *" */ #define LINUX_SYS_epoll_pwait2 441 Index: src/sys/compat/linux/arch/m68k/linux_syscalls.c diff -u src/sys/compat/linux/arch/m68k/linux_syscalls.c:1.117 src/sys/compat/linux/arch/m68k/linux_syscalls.c:1.118 --- src/sys/compat/linux/arch/m68k/linux_syscalls.c:1.117 Sat Aug 19 13:50:25 2023 +++ src/sys/compat/linux/arch/m68k/linux_syscalls.c Sat Jun 29 09:46:32 2024 @@ -1,14 +1,14 @@ -/* $NetBSD: linux_syscalls.c,v 1.117 2023/08/19 17:50:25 christos Exp $ */ +/* $NetBSD: linux_syscalls.c,v 1.118 2024/06/29 13:46:32 christos Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.104 2023/08/19 17:49:49 christos Exp + * created from NetBSD: syscalls.master,v 1.105 2024/06/29 13:46:10 christos Exp */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.117 2023/08/19 17:50:25 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.118 2024/06/29 13:46:32 christos Exp $"); #if defined(_KERNEL_OPT) #if defined(_KERNEL_OPT) @@ -27,6 +27,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_syscal #include <compat/linux/common/linux_siginfo.h> #include <compat/linux/common/linux_machdep.h> #include <compat/linux/common/linux_mmap.h> +#include <compat/linux/common/linux_sched.h> #include <compat/linux/linux_syscallargs.h> #else /* _KERNEL_OPT */ #include <sys/null.h> @@ -368,7 +369,7 @@ const char *const linux_syscallnames[] = /* 311 */ "sched_setaffinity", /* 312 */ "sched_getaffinity", /* 313 */ "#313 (unimplemented kexec_load)", - /* 314 */ "#314 (unimplemented getcpu)", + /* 314 */ "getcpu", /* 315 */ "epoll_pwait", /* 316 */ "utimensat", /* 317 */ "#317 (unimplemented signalfd)", @@ -493,7 +494,7 @@ const char *const linux_syscallnames[] = /* 436 */ "close_range", /* 437 */ "#437 (unimplemented)", /* 438 */ "#438 (unimplemented)", - /* 439 */ "#439 (unimplemented)", + /* 439 */ "faccessat2", /* 440 */ "#440 (unimplemented)", /* 441 */ "epoll_pwait2", /* 442 */ "# filler", @@ -906,7 +907,7 @@ const char *const altlinux_syscallnames[ /* 311 */ NULL, /* sched_setaffinity */ /* 312 */ NULL, /* sched_getaffinity */ /* 313 */ NULL, /* unimplemented kexec_load */ - /* 314 */ NULL, /* unimplemented getcpu */ + /* 314 */ NULL, /* getcpu */ /* 315 */ NULL, /* epoll_pwait */ /* 316 */ NULL, /* utimensat */ /* 317 */ NULL, /* unimplemented signalfd */ @@ -1031,7 +1032,7 @@ const char *const altlinux_syscallnames[ /* 436 */ NULL, /* close_range */ /* 437 */ NULL, /* unimplemented */ /* 438 */ NULL, /* unimplemented */ - /* 439 */ NULL, /* unimplemented */ + /* 439 */ NULL, /* faccessat2 */ /* 440 */ NULL, /* unimplemented */ /* 441 */ NULL, /* epoll_pwait2 */ /* 442 */ NULL, /* filler */ Index: src/sys/compat/linux/arch/m68k/linux_sysent.c diff -u src/sys/compat/linux/arch/m68k/linux_sysent.c:1.117 src/sys/compat/linux/arch/m68k/linux_sysent.c:1.118 --- src/sys/compat/linux/arch/m68k/linux_sysent.c:1.117 Sat Aug 19 13:50:25 2023 +++ src/sys/compat/linux/arch/m68k/linux_sysent.c Sat Jun 29 09:46:32 2024 @@ -1,14 +1,14 @@ -/* $NetBSD: linux_sysent.c,v 1.117 2023/08/19 17:50:25 christos Exp $ */ +/* $NetBSD: linux_sysent.c,v 1.118 2024/06/29 13:46:32 christos Exp $ */ /* * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.104 2023/08/19 17:49:49 christos Exp + * created from NetBSD: syscalls.master,v 1.105 2024/06/29 13:46:10 christos Exp */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.117 2023/08/19 17:50:25 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.118 2024/06/29 13:46:32 christos Exp $"); #if defined(_KERNEL_OPT) #include "opt_compat_netbsd.h" @@ -26,6 +26,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sysent #include <compat/linux/common/linux_siginfo.h> #include <compat/linux/common/linux_machdep.h> #include <compat/linux/common/linux_mmap.h> +#include <compat/linux/common/linux_sched.h> #include <compat/linux/linux_syscallargs.h> #define s(type) sizeof(type) @@ -1377,8 +1378,10 @@ struct sysent linux_sysent[] = { .sy_call = linux_sys_nosys, }, /* 313 = filler */ { - .sy_call = linux_sys_nosys, - }, /* 314 = filler */ + ns(struct linux_sys_getcpu_args), + .sy_flags = SYCALL_ARG_PTR, + .sy_call = (sy_call_t *)linux_sys_getcpu + }, /* 314 = getcpu */ { ns(struct linux_sys_epoll_pwait_args), .sy_flags = SYCALL_ARG_PTR, @@ -1787,8 +1790,10 @@ struct sysent linux_sysent[] = { .sy_call = linux_sys_nosys, }, /* 438 = filler */ { - .sy_call = linux_sys_nosys, - }, /* 439 = filler */ + ns(struct linux_sys_faccessat2_args), + .sy_flags = SYCALL_ARG_PTR, + .sy_call = (sy_call_t *)linux_sys_faccessat2 + }, /* 439 = faccessat2 */ { .sy_call = linux_sys_nosys, }, /* 440 = filler */ Index: src/sys/compat/linux/arch/m68k/linux_syscallargs.h diff -u src/sys/compat/linux/arch/m68k/linux_syscallargs.h:1.116 src/sys/compat/linux/arch/m68k/linux_syscallargs.h:1.117 --- src/sys/compat/linux/arch/m68k/linux_syscallargs.h:1.116 Sat Aug 19 13:50:25 2023 +++ src/sys/compat/linux/arch/m68k/linux_syscallargs.h Sat Jun 29 09:46:32 2024 @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscallargs.h,v 1.116 2023/08/19 17:50:25 christos Exp $ */ +/* $NetBSD: linux_syscallargs.h,v 1.117 2024/06/29 13:46:32 christos Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.104 2023/08/19 17:49:49 christos Exp + * created from NetBSD: syscalls.master,v 1.105 2024/06/29 13:46:10 christos Exp */ #ifndef _LINUX_SYS_SYSCALLARGS_H_ @@ -1138,6 +1138,13 @@ struct linux_sys_sched_getaffinity_args }; check_syscall_args(linux_sys_sched_getaffinity) +struct linux_sys_getcpu_args { + syscallarg(unsigned int *) cpu; + syscallarg(unsigned int *) node; + syscallarg(struct linux_getcpu_cache *) tcache; +}; +check_syscall_args(linux_sys_getcpu) + struct linux_sys_epoll_pwait_args { syscallarg(int) epfd; syscallarg(struct linux_epoll_event *) events; @@ -1286,6 +1293,14 @@ struct linux_sys_close_range_args { }; check_syscall_args(linux_sys_close_range) +struct linux_sys_faccessat2_args { + syscallarg(int) fd; + syscallarg(const char *) path; + syscallarg(int) amode; + syscallarg(int) flags; +}; +check_syscall_args(linux_sys_faccessat2) + struct linux_sys_epoll_pwait2_args { syscallarg(int) epfd; syscallarg(struct linux_epoll_event *) events; @@ -1771,6 +1786,8 @@ int linux_sys_sched_setaffinity(struct l int linux_sys_sched_getaffinity(struct lwp *, const struct linux_sys_sched_getaffinity_args *, register_t *); +int linux_sys_getcpu(struct lwp *, const struct linux_sys_getcpu_args *, register_t *); + int linux_sys_epoll_pwait(struct lwp *, const struct linux_sys_epoll_pwait_args *, register_t *); int linux_sys_utimensat(struct lwp *, const struct linux_sys_utimensat_args *, register_t *); @@ -1813,6 +1830,8 @@ int linux_sys_statx(struct lwp *, const int linux_sys_close_range(struct lwp *, const struct linux_sys_close_range_args *, register_t *); +int linux_sys_faccessat2(struct lwp *, const struct linux_sys_faccessat2_args *, register_t *); + int linux_sys_epoll_pwait2(struct lwp *, const struct linux_sys_epoll_pwait2_args *, register_t *); #endif /* _LINUX_SYS_SYSCALLARGS_H_ */ Index: src/sys/compat/linux/arch/mips/linux_syscall.h diff -u src/sys/compat/linux/arch/mips/linux_syscall.h:1.90 src/sys/compat/linux/arch/mips/linux_syscall.h:1.91 --- src/sys/compat/linux/arch/mips/linux_syscall.h:1.90 Sat Aug 19 13:50:25 2023 +++ src/sys/compat/linux/arch/mips/linux_syscall.h Sat Jun 29 09:46:32 2024 @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscall.h,v 1.90 2023/08/19 17:50:25 christos Exp $ */ +/* $NetBSD: linux_syscall.h,v 1.91 2024/06/29 13:46:32 christos Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.79 2023/08/19 17:49:49 christos Exp + * created from NetBSD: syscalls.master,v 1.80 2024/06/29 13:46:10 christos Exp */ #ifndef _LINUX_SYS_SYSCALL_H_ @@ -718,6 +718,9 @@ /* syscall: "__futex_get_robust_list" ret: "int" args: "lwpid_t" "void **" "size_t *" */ #define LINUX_SYS___futex_get_robust_list 310 +/* syscall: "getcpu" ret: "int" args: "unsigned int *" "unsigned int *" "struct linux_getcpu_cache *" */ +#define LINUX_SYS_getcpu 312 + /* syscall: "epoll_pwait" ret: "int" args: "int" "struct linux_epoll_event *" "int" "int" "const linux_sigset_t *" */ #define LINUX_SYS_epoll_pwait 313 Index: src/sys/compat/linux/arch/mips/linux_syscallargs.h diff -u src/sys/compat/linux/arch/mips/linux_syscallargs.h:1.89 src/sys/compat/linux/arch/mips/linux_syscallargs.h:1.90 --- src/sys/compat/linux/arch/mips/linux_syscallargs.h:1.89 Sat Aug 19 13:50:25 2023 +++ src/sys/compat/linux/arch/mips/linux_syscallargs.h Sat Jun 29 09:46:32 2024 @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscallargs.h,v 1.89 2023/08/19 17:50:25 christos Exp $ */ +/* $NetBSD: linux_syscallargs.h,v 1.90 2024/06/29 13:46:32 christos Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.79 2023/08/19 17:49:49 christos Exp + * created from NetBSD: syscalls.master,v 1.80 2024/06/29 13:46:10 christos Exp */ #ifndef _LINUX_SYS_SYSCALLARGS_H_ @@ -1185,6 +1185,13 @@ struct sys___futex_set_robust_list_args; struct sys___futex_get_robust_list_args; +struct linux_sys_getcpu_args { + syscallarg(unsigned int *) cpu; + syscallarg(unsigned int *) node; + syscallarg(struct linux_getcpu_cache *) tcache; +}; +check_syscall_args(linux_sys_getcpu) + struct linux_sys_epoll_pwait_args { syscallarg(int) epfd; syscallarg(struct linux_epoll_event *) events; @@ -1820,6 +1827,8 @@ int sys___futex_set_robust_list(struct l int sys___futex_get_robust_list(struct lwp *, const struct sys___futex_get_robust_list_args *, register_t *); +int linux_sys_getcpu(struct lwp *, const struct linux_sys_getcpu_args *, register_t *); + int linux_sys_epoll_pwait(struct lwp *, const struct linux_sys_epoll_pwait_args *, register_t *); int linux_sys_utimensat(struct lwp *, const struct linux_sys_utimensat_args *, register_t *); Index: src/sys/compat/linux/arch/mips/linux_syscalls.c diff -u src/sys/compat/linux/arch/mips/linux_syscalls.c:1.89 src/sys/compat/linux/arch/mips/linux_syscalls.c:1.90 --- src/sys/compat/linux/arch/mips/linux_syscalls.c:1.89 Sat Aug 19 13:50:25 2023 +++ src/sys/compat/linux/arch/mips/linux_syscalls.c Sat Jun 29 09:46:32 2024 @@ -1,14 +1,14 @@ -/* $NetBSD: linux_syscalls.c,v 1.89 2023/08/19 17:50:25 christos Exp $ */ +/* $NetBSD: linux_syscalls.c,v 1.90 2024/06/29 13:46:32 christos Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.79 2023/08/19 17:49:49 christos Exp + * created from NetBSD: syscalls.master,v 1.80 2024/06/29 13:46:10 christos Exp */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.89 2023/08/19 17:50:25 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.90 2024/06/29 13:46:32 christos Exp $"); #if defined(_KERNEL_OPT) #include <sys/param.h> @@ -23,6 +23,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_syscal #include <compat/linux/common/linux_machdep.h> #include <compat/linux/common/linux_mmap.h> #include <compat/linux/common/linux_socketcall.h> +#include <compat/linux/common/linux_sched.h> #include <compat/linux/linux_syscallargs.h> #define linux_sys_mmap2_args linux_sys_mmap_args #else /* _KERNEL_OPT */ @@ -342,7 +343,7 @@ const char *const linux_syscallnames[] = /* 309 */ "__futex_set_robust_list", /* 310 */ "__futex_get_robust_list", /* 311 */ "#311 (unimplemented kexec_load)", - /* 312 */ "#312 (unimplemented getcpu)", + /* 312 */ "getcpu", /* 313 */ "epoll_pwait", /* 314 */ "#314 (unimplemented ioprio_set)", /* 315 */ "#315 (unimplemented ioprio_get)", @@ -859,7 +860,7 @@ const char *const altlinux_syscallnames[ /* 309 */ NULL, /* __futex_set_robust_list */ /* 310 */ NULL, /* __futex_get_robust_list */ /* 311 */ NULL, /* unimplemented kexec_load */ - /* 312 */ NULL, /* unimplemented getcpu */ + /* 312 */ NULL, /* getcpu */ /* 313 */ NULL, /* epoll_pwait */ /* 314 */ NULL, /* unimplemented ioprio_set */ /* 315 */ NULL, /* unimplemented ioprio_get */ Index: src/sys/compat/linux/arch/mips/linux_sysent.c diff -u src/sys/compat/linux/arch/mips/linux_sysent.c:1.89 src/sys/compat/linux/arch/mips/linux_sysent.c:1.90 --- src/sys/compat/linux/arch/mips/linux_sysent.c:1.89 Sat Aug 19 13:50:25 2023 +++ src/sys/compat/linux/arch/mips/linux_sysent.c Sat Jun 29 09:46:32 2024 @@ -1,14 +1,14 @@ -/* $NetBSD: linux_sysent.c,v 1.89 2023/08/19 17:50:25 christos Exp $ */ +/* $NetBSD: linux_sysent.c,v 1.90 2024/06/29 13:46:32 christos Exp $ */ /* * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.79 2023/08/19 17:49:49 christos Exp + * created from NetBSD: syscalls.master,v 1.80 2024/06/29 13:46:10 christos Exp */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.89 2023/08/19 17:50:25 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.90 2024/06/29 13:46:32 christos Exp $"); #include <sys/param.h> #include <sys/poll.h> @@ -22,6 +22,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sysent #include <compat/linux/common/linux_machdep.h> #include <compat/linux/common/linux_mmap.h> #include <compat/linux/common/linux_socketcall.h> +#include <compat/linux/common/linux_sched.h> #include <compat/linux/linux_syscallargs.h> #define linux_sys_mmap2_args linux_sys_mmap_args @@ -1351,8 +1352,10 @@ struct sysent linux_sysent[] = { .sy_call = linux_sys_nosys, }, /* 311 = filler */ { - .sy_call = linux_sys_nosys, - }, /* 312 = filler */ + ns(struct linux_sys_getcpu_args), + .sy_flags = SYCALL_ARG_PTR, + .sy_call = (sy_call_t *)linux_sys_getcpu + }, /* 312 = getcpu */ { ns(struct linux_sys_epoll_pwait_args), .sy_flags = SYCALL_ARG_PTR, Index: src/sys/compat/linux/arch/powerpc/linux_syscall.h diff -u src/sys/compat/linux/arch/powerpc/linux_syscall.h:1.96 src/sys/compat/linux/arch/powerpc/linux_syscall.h:1.97 --- src/sys/compat/linux/arch/powerpc/linux_syscall.h:1.96 Sat Aug 19 13:50:25 2023 +++ src/sys/compat/linux/arch/powerpc/linux_syscall.h Sat Jun 29 09:46:32 2024 @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscall.h,v 1.96 2023/08/19 17:50:25 christos Exp $ */ +/* $NetBSD: linux_syscall.h,v 1.97 2024/06/29 13:46:32 christos Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.84 2023/08/19 17:49:50 christos Exp + * created from NetBSD: syscalls.master,v 1.85 2024/06/29 13:46:10 christos Exp */ #ifndef _LINUX_SYS_SYSCALL_H_ @@ -687,6 +687,9 @@ /* syscall: "__futex_get_robust_list" ret: "int" args: "lwpid_t" "void **" "size_t *" */ #define LINUX_SYS___futex_get_robust_list 300 +/* syscall: "getcpu" ret: "int" args: "unsigned int *" "unsigned int *" "struct linux_getcpu_cache *" */ +#define LINUX_SYS_getcpu 302 + /* syscall: "epoll_pwait" ret: "int" args: "int" "struct linux_epoll_event *" "int" "int" "const linux_sigset_t *" */ #define LINUX_SYS_epoll_pwait 303 @@ -750,6 +753,9 @@ /* syscall: "close_range" ret: "int" args: "unsigned int" "unsigned int" "unsigned int" */ #define LINUX_SYS_close_range 436 +/* syscall: "faccessat2" ret: "int" args: "int" "const char *" "int" "int" */ +#define LINUX_SYS_faccessat2 439 + /* syscall: "epoll_pwait2" ret: "int" args: "int" "struct linux_epoll_event *" "int" "const struct linux_timespec *" "const linux_sigset_t *" */ #define LINUX_SYS_epoll_pwait2 441 Index: src/sys/compat/linux/arch/powerpc/linux_sysent.c diff -u src/sys/compat/linux/arch/powerpc/linux_sysent.c:1.96 src/sys/compat/linux/arch/powerpc/linux_sysent.c:1.97 --- src/sys/compat/linux/arch/powerpc/linux_sysent.c:1.96 Sat Aug 19 13:50:25 2023 +++ src/sys/compat/linux/arch/powerpc/linux_sysent.c Sat Jun 29 09:46:32 2024 @@ -1,14 +1,14 @@ -/* $NetBSD: linux_sysent.c,v 1.96 2023/08/19 17:50:25 christos Exp $ */ +/* $NetBSD: linux_sysent.c,v 1.97 2024/06/29 13:46:32 christos Exp $ */ /* * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.84 2023/08/19 17:49:50 christos Exp + * created from NetBSD: syscalls.master,v 1.85 2024/06/29 13:46:10 christos Exp */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.96 2023/08/19 17:50:25 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.97 2024/06/29 13:46:32 christos Exp $"); #include <sys/param.h> #include <sys/poll.h> @@ -21,6 +21,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sysent #include <compat/linux/common/linux_siginfo.h> #include <compat/linux/common/linux_machdep.h> #include <compat/linux/common/linux_mmap.h> +#include <compat/linux/common/linux_sched.h> #include <compat/linux/linux_syscallargs.h> #define s(type) sizeof(type) @@ -1300,8 +1301,10 @@ struct sysent linux_sysent[] = { .sy_call = linux_sys_nosys, }, /* 301 = filler */ { - .sy_call = linux_sys_nosys, - }, /* 302 = filler */ + ns(struct linux_sys_getcpu_args), + .sy_flags = SYCALL_ARG_PTR, + .sy_call = (sy_call_t *)linux_sys_getcpu + }, /* 302 = getcpu */ { ns(struct linux_sys_epoll_pwait_args), .sy_flags = SYCALL_ARG_PTR, @@ -1746,8 +1749,10 @@ struct sysent linux_sysent[] = { .sy_call = linux_sys_nosys, }, /* 438 = filler */ { - .sy_call = linux_sys_nosys, - }, /* 439 = filler */ + ns(struct linux_sys_faccessat2_args), + .sy_flags = SYCALL_ARG_PTR, + .sy_call = (sy_call_t *)linux_sys_faccessat2 + }, /* 439 = faccessat2 */ { .sy_call = linux_sys_nosys, }, /* 440 = filler */ Index: src/sys/compat/linux/arch/powerpc/linux_syscallargs.h diff -u src/sys/compat/linux/arch/powerpc/linux_syscallargs.h:1.95 src/sys/compat/linux/arch/powerpc/linux_syscallargs.h:1.96 --- src/sys/compat/linux/arch/powerpc/linux_syscallargs.h:1.95 Sat Aug 19 13:50:25 2023 +++ src/sys/compat/linux/arch/powerpc/linux_syscallargs.h Sat Jun 29 09:46:32 2024 @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscallargs.h,v 1.95 2023/08/19 17:50:25 christos Exp $ */ +/* $NetBSD: linux_syscallargs.h,v 1.96 2024/06/29 13:46:32 christos Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.84 2023/08/19 17:49:50 christos Exp + * created from NetBSD: syscalls.master,v 1.85 2024/06/29 13:46:10 christos Exp */ #ifndef _LINUX_SYS_SYSCALLARGS_H_ @@ -1072,6 +1072,13 @@ struct sys___futex_set_robust_list_args; struct sys___futex_get_robust_list_args; +struct linux_sys_getcpu_args { + syscallarg(unsigned int *) cpu; + syscallarg(unsigned int *) node; + syscallarg(struct linux_getcpu_cache *) tcache; +}; +check_syscall_args(linux_sys_getcpu) + struct linux_sys_epoll_pwait_args { syscallarg(int) epfd; syscallarg(struct linux_epoll_event *) events; @@ -1220,6 +1227,14 @@ struct linux_sys_close_range_args { }; check_syscall_args(linux_sys_close_range) +struct linux_sys_faccessat2_args { + syscallarg(int) fd; + syscallarg(const char *) path; + syscallarg(int) amode; + syscallarg(int) flags; +}; +check_syscall_args(linux_sys_faccessat2) + struct linux_sys_epoll_pwait2_args { syscallarg(int) epfd; syscallarg(struct linux_epoll_event *) events; @@ -1677,6 +1692,8 @@ int sys___futex_set_robust_list(struct l int sys___futex_get_robust_list(struct lwp *, const struct sys___futex_get_robust_list_args *, register_t *); +int linux_sys_getcpu(struct lwp *, const struct linux_sys_getcpu_args *, register_t *); + int linux_sys_epoll_pwait(struct lwp *, const struct linux_sys_epoll_pwait_args *, register_t *); int linux_sys_utimensat(struct lwp *, const struct linux_sys_utimensat_args *, register_t *); @@ -1719,6 +1736,8 @@ int linux_sys_statx(struct lwp *, const int linux_sys_close_range(struct lwp *, const struct linux_sys_close_range_args *, register_t *); +int linux_sys_faccessat2(struct lwp *, const struct linux_sys_faccessat2_args *, register_t *); + int linux_sys_epoll_pwait2(struct lwp *, const struct linux_sys_epoll_pwait2_args *, register_t *); #endif /* _LINUX_SYS_SYSCALLARGS_H_ */ Index: src/sys/compat/linux/arch/powerpc/linux_syscalls.c diff -u src/sys/compat/linux/arch/powerpc/linux_syscalls.c:1.95 src/sys/compat/linux/arch/powerpc/linux_syscalls.c:1.96 --- src/sys/compat/linux/arch/powerpc/linux_syscalls.c:1.95 Sat Aug 19 13:50:25 2023 +++ src/sys/compat/linux/arch/powerpc/linux_syscalls.c Sat Jun 29 09:46:32 2024 @@ -1,14 +1,14 @@ -/* $NetBSD: linux_syscalls.c,v 1.95 2023/08/19 17:50:25 christos Exp $ */ +/* $NetBSD: linux_syscalls.c,v 1.96 2024/06/29 13:46:32 christos Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.84 2023/08/19 17:49:50 christos Exp + * created from NetBSD: syscalls.master,v 1.85 2024/06/29 13:46:10 christos Exp */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.95 2023/08/19 17:50:25 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.96 2024/06/29 13:46:32 christos Exp $"); #if defined(_KERNEL_OPT) #include <sys/param.h> @@ -22,6 +22,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_syscal #include <compat/linux/common/linux_siginfo.h> #include <compat/linux/common/linux_machdep.h> #include <compat/linux/common/linux_mmap.h> +#include <compat/linux/common/linux_sched.h> #include <compat/linux/linux_syscallargs.h> #else /* _KERNEL_OPT */ #include <sys/null.h> @@ -335,7 +336,7 @@ const char *const linux_syscallnames[] = /* 299 */ "__futex_set_robust_list", /* 300 */ "__futex_get_robust_list", /* 301 */ "#301 (unimplemented move_pages)", - /* 302 */ "#302 (unimplemented getcpu)", + /* 302 */ "getcpu", /* 303 */ "epoll_pwait", /* 304 */ "utimensat", /* 305 */ "#305 (unimplemented signalfd)", @@ -472,7 +473,7 @@ const char *const linux_syscallnames[] = /* 436 */ "close_range", /* 437 */ "#437 (unimplemented)", /* 438 */ "#438 (unimplemented)", - /* 439 */ "#439 (unimplemented)", + /* 439 */ "faccessat2", /* 440 */ "#440 (unimplemented)", /* 441 */ "epoll_pwait2", /* 442 */ "# filler", @@ -857,7 +858,7 @@ const char *const altlinux_syscallnames[ /* 299 */ NULL, /* __futex_set_robust_list */ /* 300 */ NULL, /* __futex_get_robust_list */ /* 301 */ NULL, /* unimplemented move_pages */ - /* 302 */ NULL, /* unimplemented getcpu */ + /* 302 */ NULL, /* getcpu */ /* 303 */ NULL, /* epoll_pwait */ /* 304 */ NULL, /* utimensat */ /* 305 */ NULL, /* unimplemented signalfd */ @@ -994,7 +995,7 @@ const char *const altlinux_syscallnames[ /* 436 */ NULL, /* close_range */ /* 437 */ NULL, /* unimplemented */ /* 438 */ NULL, /* unimplemented */ - /* 439 */ NULL, /* unimplemented */ + /* 439 */ NULL, /* faccessat2 */ /* 440 */ NULL, /* unimplemented */ /* 441 */ NULL, /* epoll_pwait2 */ /* 442 */ NULL, /* filler */