This commit is contained in:
ryo 2021-11-25 02:32:24 +00:00
parent d03f004327
commit 48548c0c63
5 changed files with 69 additions and 15 deletions

View File

@ -1,10 +1,10 @@
/* $NetBSD: linux_syscall.h,v 1.2 2021/11/24 18:57:24 ryo Exp $ */
/* $NetBSD: linux_syscall.h,v 1.3 2021/11/25 02:32:24 ryo Exp $ */
/*
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD: syscalls.master,v 1.1 2021/09/23 06:56:27 ryo Exp
* created from NetBSD: syscalls.master,v 1.3 2021/11/25 02:29:33 ryo Exp
*/
#ifndef _LINUX_SYS_SYSCALL_H_
@ -585,6 +585,9 @@
/* syscall: "getrandom" ret: "ssize_t" args: "void *" "size_t" "unsigned int" */
#define LINUX_SYS_getrandom 278
/* syscall: "statx" ret: "int" args: "int" "const char *" "int" "unsigned int" "struct linux_statx *" */
#define LINUX_SYS_statx 291
/* syscall: "nosys" ret: "int" args: */
#define LINUX_SYS_nosys 440

View File

@ -1,10 +1,10 @@
/* $NetBSD: linux_syscallargs.h,v 1.2 2021/11/24 18:57:24 ryo Exp $ */
/* $NetBSD: linux_syscallargs.h,v 1.3 2021/11/25 02:32:24 ryo Exp $ */
/*
* System call argument lists.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD: syscalls.master,v 1.1 2021/09/23 06:56:27 ryo Exp
* created from NetBSD: syscalls.master,v 1.3 2021/11/25 02:29:33 ryo Exp
*/
#ifndef _LINUX_SYS_SYSCALLARGS_H_
@ -967,6 +967,15 @@ check_syscall_args(linux_sys_sendmmsg)
struct sys_getrandom_args;
struct linux_sys_statx_args {
syscallarg(int) fd;
syscallarg(const char *) path;
syscallarg(int) flag;
syscallarg(unsigned int) mask;
syscallarg(struct linux_statx *) sp;
};
check_syscall_args(linux_sys_statx)
/*
* System call prototypes.
*/
@ -1356,6 +1365,8 @@ int linux_sys_sendmmsg(struct lwp *, const struct linux_sys_sendmmsg_args *, reg
int sys_getrandom(struct lwp *, const struct sys_getrandom_args *, register_t *);
int linux_sys_statx(struct lwp *, const struct linux_sys_statx_args *, register_t *);
int linux_sys_nosys(struct lwp *, const void *, register_t *);
#endif /* _LINUX_SYS_SYSCALLARGS_H_ */

View File

@ -1,14 +1,14 @@
/* $NetBSD: linux_syscalls.c,v 1.2 2021/11/24 18:57:24 ryo Exp $ */
/* $NetBSD: linux_syscalls.c,v 1.3 2021/11/25 02:32:24 ryo Exp $ */
/*
* System call names.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD: syscalls.master,v 1.1 2021/09/23 06:56:27 ryo Exp
* created from NetBSD: syscalls.master,v 1.3 2021/11/25 02:29:33 ryo Exp
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.2 2021/11/24 18:57:24 ryo Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.3 2021/11/25 02:32:24 ryo Exp $");
#if defined(_KERNEL_OPT)
#if defined(_KERNEL_OPT)
@ -352,7 +352,7 @@ const char *const linux_syscallnames[] = {
/* 288 */ "#288 (unimplemented pkey_mprotect)",
/* 289 */ "#289 (unimplemented pkey_alloc)",
/* 290 */ "#290 (unimplemented pkey_free)",
/* 291 */ "#291 (unimplemented statx)",
/* 291 */ "statx",
/* 292 */ "#292 (unimplemented io_pgetevents)",
/* 293 */ "#293 (unimplemented rseq)",
/* 294 */ "#294 (unimplemented kexec_file_load)",
@ -890,7 +890,7 @@ const char *const altlinux_syscallnames[] = {
/* 288 */ NULL, /* unimplemented pkey_mprotect */
/* 289 */ NULL, /* unimplemented pkey_alloc */
/* 290 */ NULL, /* unimplemented pkey_free */
/* 291 */ NULL, /* unimplemented statx */
/* 291 */ NULL, /* statx */
/* 292 */ NULL, /* unimplemented io_pgetevents */
/* 293 */ NULL, /* unimplemented rseq */
/* 294 */ NULL, /* unimplemented kexec_file_load */

View File

@ -1,14 +1,14 @@
/* $NetBSD: linux_sysent.c,v 1.2 2021/11/24 18:57:24 ryo Exp $ */
/* $NetBSD: linux_sysent.c,v 1.3 2021/11/25 02:32:24 ryo Exp $ */
/*
* System call switch table.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD: syscalls.master,v 1.1 2021/09/23 06:56:27 ryo Exp
* created from NetBSD: syscalls.master,v 1.3 2021/11/25 02:29:33 ryo Exp
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.2 2021/11/24 18:57:24 ryo Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.3 2021/11/25 02:32:24 ryo Exp $");
#if defined(_KERNEL_OPT)
#include "opt_sysv.h"
@ -1264,8 +1264,10 @@ struct sysent linux_sysent[] = {
.sy_call = linux_sys_nosys,
}, /* 290 = filler */
{
.sy_call = linux_sys_nosys,
}, /* 291 = filler */
ns(struct linux_sys_statx_args),
.sy_flags = SYCALL_ARG_PTR,
.sy_call = (sy_call_t *)linux_sys_statx
}, /* 291 = statx */
{
.sy_call = linux_sys_nosys,
}, /* 292 = filler */

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_systrace_args.c,v 1.2 2021/11/24 18:57:24 ryo Exp $ */
/* $NetBSD: linux_systrace_args.c,v 1.3 2021/11/25 02:32:24 ryo Exp $ */
/*
* System call argument to DTrace register array conversion.
@ -1620,6 +1620,17 @@ systrace_args(register_t sysnum, const void *params, uintptr_t *uarg, size_t *n_
*n_args = 3;
break;
}
/* linux_sys_statx */
case 291: {
const struct linux_sys_statx_args *p = params;
iarg[0] = SCARG(p, fd); /* int */
uarg[1] = (intptr_t) SCARG(p, path); /* const char * */
iarg[2] = SCARG(p, flag); /* int */
uarg[3] = SCARG(p, mask); /* unsigned int */
uarg[4] = (intptr_t) SCARG(p, sp); /* struct linux_statx * */
*n_args = 5;
break;
}
/* linux_sys_nosys */
case 440: {
*n_args = 0;
@ -4361,6 +4372,28 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
};
break;
/* linux_sys_statx */
case 291:
switch(ndx) {
case 0:
p = "int";
break;
case 1:
p = "const char *";
break;
case 2:
p = "int";
break;
case 3:
p = "unsigned int";
break;
case 4:
p = "struct linux_statx *";
break;
default:
break;
};
break;
/* linux_sys_nosys */
case 440:
break;
@ -5288,6 +5321,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
if (ndx == 0 || ndx == 1)
p = "ssize_t";
break;
/* linux_sys_statx */
case 291:
if (ndx == 0 || ndx == 1)
p = "int";
break;
/* linux_sys_nosys */
case 440:
default: