Regen for writev syscall

This commit is contained in:
Dmitry Chagin 2023-08-20 10:36:31 +03:00
parent aad4b799f7
commit 1f9d71ee32
18 changed files with 46 additions and 24 deletions

View file

@ -114,6 +114,11 @@ struct linux_pwrite_args {
char nbyte_l_[PADL_(l_size_t)]; l_size_t nbyte; char nbyte_r_[PADR_(l_size_t)];
char offset_l_[PADL_(l_loff_t)]; l_loff_t offset; char offset_r_[PADR_(l_loff_t)];
};
struct linux_writev_args {
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
char iovp_l_[PADL_(struct iovec *)]; struct iovec * iovp; char iovp_r_[PADR_(struct iovec *)];
char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)];
};
struct linux_access_args {
char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
char amode_l_[PADL_(l_int)]; l_int amode; char amode_r_[PADR_(l_int)];
@ -1417,6 +1422,7 @@ int linux_rt_sigreturn(struct thread *, struct linux_rt_sigreturn_args *);
int linux_ioctl(struct thread *, struct linux_ioctl_args *);
int linux_pread(struct thread *, struct linux_pread_args *);
int linux_pwrite(struct thread *, struct linux_pwrite_args *);
int linux_writev(struct thread *, struct linux_writev_args *);
int linux_access(struct thread *, struct linux_access_args *);
int linux_pipe(struct thread *, struct linux_pipe_args *);
int linux_select(struct thread *, struct linux_select_args *);
@ -1715,6 +1721,7 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *);
#define LINUX_SYS_AUE_linux_ioctl AUE_IOCTL
#define LINUX_SYS_AUE_linux_pread AUE_PREAD
#define LINUX_SYS_AUE_linux_pwrite AUE_PWRITE
#define LINUX_SYS_AUE_linux_writev AUE_WRITEV
#define LINUX_SYS_AUE_linux_access AUE_ACCESS
#define LINUX_SYS_AUE_linux_pipe AUE_PIPE
#define LINUX_SYS_AUE_linux_select AUE_SELECT

View file

@ -24,7 +24,7 @@
#define LINUX_SYS_linux_pread 17
#define LINUX_SYS_linux_pwrite 18
#define LINUX_SYS_readv 19
#define LINUX_SYS_writev 20
#define LINUX_SYS_linux_writev 20
#define LINUX_SYS_linux_access 21
#define LINUX_SYS_linux_pipe 22
#define LINUX_SYS_linux_select 23

View file

@ -26,7 +26,7 @@ const char *linux_syscallnames[] = {
"linux_pread", /* 17 = linux_pread */
"linux_pwrite", /* 18 = linux_pwrite */
"readv", /* 19 = readv */
"writev", /* 20 = writev */
"linux_writev", /* 20 = linux_writev */
"linux_access", /* 21 = linux_access */
"linux_pipe", /* 22 = linux_pipe */
"linux_select", /* 23 = linux_select */

View file

@ -36,7 +36,7 @@ struct sysent linux_sysent[] = {
{ .sy_narg = AS(linux_pread_args), .sy_call = (sy_call_t *)linux_pread, .sy_auevent = AUE_PREAD, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 17 = linux_pread */
{ .sy_narg = AS(linux_pwrite_args), .sy_call = (sy_call_t *)linux_pwrite, .sy_auevent = AUE_PWRITE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 18 = linux_pwrite */
{ .sy_narg = AS(readv_args), .sy_call = (sy_call_t *)sys_readv, .sy_auevent = AUE_READV, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 19 = readv */
{ .sy_narg = AS(writev_args), .sy_call = (sy_call_t *)sys_writev, .sy_auevent = AUE_WRITEV, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 20 = writev */
{ .sy_narg = AS(linux_writev_args), .sy_call = (sy_call_t *)linux_writev, .sy_auevent = AUE_WRITEV, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 20 = linux_writev */
{ .sy_narg = AS(linux_access_args), .sy_call = (sy_call_t *)linux_access, .sy_auevent = AUE_ACCESS, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 21 = linux_access */
{ .sy_narg = AS(linux_pipe_args), .sy_call = (sy_call_t *)linux_pipe, .sy_auevent = AUE_PIPE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 22 = linux_pipe */
{ .sy_narg = AS(linux_select_args), .sy_call = (sy_call_t *)linux_select, .sy_auevent = AUE_SELECT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 23 = linux_select */

View file

@ -189,9 +189,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
*n_args = 3;
break;
}
/* writev */
/* linux_writev */
case 20: {
struct writev_args *p = params;
struct linux_writev_args *p = params;
iarg[a++] = p->fd; /* int */
uarg[a++] = (intptr_t)p->iovp; /* struct iovec * */
uarg[a++] = p->iovcnt; /* u_int */
@ -3073,7 +3073,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
};
break;
/* writev */
/* linux_writev */
case 20:
switch (ndx) {
case 0:
@ -7293,7 +7293,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
if (ndx == 0 || ndx == 1)
p = "int";
break;
/* writev */
/* linux_writev */
case 20:
if (ndx == 0 || ndx == 1)
p = "int";

View file

@ -464,7 +464,7 @@ struct linux_readv_args {
};
struct linux_writev_args {
char fd_l_[PADL_(l_ulong)]; l_ulong fd; char fd_r_[PADR_(l_ulong)];
char iovp_l_[PADL_(struct l_iovec32 *)]; struct l_iovec32 * iovp; char iovp_r_[PADR_(struct l_iovec32 *)];
char iovp_l_[PADL_(struct iovec32 *)]; struct iovec32 * iovp; char iovp_r_[PADR_(struct iovec32 *)];
char iovcnt_l_[PADL_(l_ulong)]; l_ulong iovcnt; char iovcnt_r_[PADR_(l_ulong)];
};
struct linux_getsid_args {

View file

@ -8,6 +8,7 @@
#include <sys/sysent.h>
#include <sys/sysproto.h>
#include <compat/linux/linux_sysproto.h>
#include <compat/freebsd32/freebsd32_util.h>
#include <amd64/linux32/linux.h>
#include <amd64/linux32/linux32_proto.h>

View file

@ -979,7 +979,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
case 146: {
struct linux_writev_args *p = params;
iarg[a++] = p->fd; /* l_ulong */
uarg[a++] = (intptr_t)p->iovp; /* struct l_iovec32 * */
uarg[a++] = (intptr_t)p->iovp; /* struct iovec32 * */
iarg[a++] = p->iovcnt; /* l_ulong */
*n_args = 3;
break;
@ -4753,7 +4753,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
p = "l_ulong";
break;
case 1:
p = "userland struct l_iovec32 *";
p = "userland struct iovec32 *";
break;
case 2:
p = "l_ulong";

View file

@ -275,6 +275,11 @@ struct linux_write_args {
char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)];
char nbyte_l_[PADL_(l_size_t)]; l_size_t nbyte; char nbyte_r_[PADR_(l_size_t)];
};
struct linux_writev_args {
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
char iovp_l_[PADL_(struct iovec *)]; struct iovec * iovp; char iovp_r_[PADR_(struct iovec *)];
char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)];
};
struct linux_pread_args {
char fd_l_[PADL_(l_uint)]; l_uint fd; char fd_r_[PADR_(l_uint)];
char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)];
@ -1260,6 +1265,7 @@ int linux_pipe2(struct thread *, struct linux_pipe2_args *);
int linux_getdents64(struct thread *, struct linux_getdents64_args *);
int linux_lseek(struct thread *, struct linux_lseek_args *);
int linux_write(struct thread *, struct linux_write_args *);
int linux_writev(struct thread *, struct linux_writev_args *);
int linux_pread(struct thread *, struct linux_pread_args *);
int linux_pwrite(struct thread *, struct linux_pwrite_args *);
int linux_preadv(struct thread *, struct linux_preadv_args *);
@ -1509,6 +1515,7 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *);
#define LINUX_SYS_AUE_linux_getdents64 AUE_GETDIRENTRIES
#define LINUX_SYS_AUE_linux_lseek AUE_LSEEK
#define LINUX_SYS_AUE_linux_write AUE_NULL
#define LINUX_SYS_AUE_linux_writev AUE_WRITEV
#define LINUX_SYS_AUE_linux_pread AUE_PREAD
#define LINUX_SYS_AUE_linux_pwrite AUE_PWRITE
#define LINUX_SYS_AUE_linux_preadv AUE_NULL

View file

@ -62,7 +62,7 @@
#define LINUX_SYS_read 63
#define LINUX_SYS_linux_write 64
#define LINUX_SYS_readv 65
#define LINUX_SYS_writev 66
#define LINUX_SYS_linux_writev 66
#define LINUX_SYS_linux_pread 67
#define LINUX_SYS_linux_pwrite 68
#define LINUX_SYS_linux_preadv 69

View file

@ -72,7 +72,7 @@ const char *linux_syscallnames[] = {
"read", /* 63 = read */
"linux_write", /* 64 = linux_write */
"readv", /* 65 = readv */
"writev", /* 66 = writev */
"linux_writev", /* 66 = linux_writev */
"linux_pread", /* 67 = linux_pread */
"linux_pwrite", /* 68 = linux_pwrite */
"linux_preadv", /* 69 = linux_preadv */

View file

@ -82,7 +82,7 @@ struct sysent linux_sysent[] = {
{ .sy_narg = AS(read_args), .sy_call = (sy_call_t *)sys_read, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 63 = read */
{ .sy_narg = AS(linux_write_args), .sy_call = (sy_call_t *)linux_write, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 64 = linux_write */
{ .sy_narg = AS(readv_args), .sy_call = (sy_call_t *)sys_readv, .sy_auevent = AUE_READV, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 65 = readv */
{ .sy_narg = AS(writev_args), .sy_call = (sy_call_t *)sys_writev, .sy_auevent = AUE_WRITEV, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 66 = writev */
{ .sy_narg = AS(linux_writev_args), .sy_call = (sy_call_t *)linux_writev, .sy_auevent = AUE_WRITEV, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 66 = linux_writev */
{ .sy_narg = AS(linux_pread_args), .sy_call = (sy_call_t *)linux_pread, .sy_auevent = AUE_PREAD, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 67 = linux_pread */
{ .sy_narg = AS(linux_pwrite_args), .sy_call = (sy_call_t *)linux_pwrite, .sy_auevent = AUE_PWRITE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 68 = linux_pwrite */
{ .sy_narg = AS(linux_preadv_args), .sy_call = (sy_call_t *)linux_preadv, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 69 = linux_preadv */

View file

@ -510,9 +510,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
*n_args = 3;
break;
}
/* writev */
/* linux_writev */
case 66: {
struct writev_args *p = params;
struct linux_writev_args *p = params;
iarg[a++] = p->fd; /* int */
uarg[a++] = (intptr_t)p->iovp; /* struct iovec * */
uarg[a++] = p->iovcnt; /* u_int */
@ -3235,7 +3235,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
};
break;
/* writev */
/* linux_writev */
case 66:
switch (ndx) {
case 0:
@ -6543,7 +6543,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
if (ndx == 0 || ndx == 1)
p = "int";
break;
/* writev */
/* linux_writev */
case 66:
if (ndx == 0 || ndx == 1)
p = "int";

View file

@ -461,6 +461,11 @@ struct linux_msync_args {
char len_l_[PADL_(l_size_t)]; l_size_t len; char len_r_[PADR_(l_size_t)];
char fl_l_[PADL_(l_int)]; l_int fl; char fl_r_[PADR_(l_int)];
};
struct linux_writev_args {
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
char iovp_l_[PADL_(struct iovec *)]; struct iovec * iovp; char iovp_r_[PADR_(struct iovec *)];
char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)];
};
struct linux_getsid_args {
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
};
@ -1803,6 +1808,7 @@ int linux_llseek(struct thread *, struct linux_llseek_args *);
int linux_getdents(struct thread *, struct linux_getdents_args *);
int linux_select(struct thread *, struct linux_select_args *);
int linux_msync(struct thread *, struct linux_msync_args *);
int linux_writev(struct thread *, struct linux_writev_args *);
int linux_getsid(struct thread *, struct linux_getsid_args *);
int linux_fdatasync(struct thread *, struct linux_fdatasync_args *);
int linux_sysctl(struct thread *, struct linux_sysctl_args *);
@ -2168,6 +2174,7 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *);
#define LINUX_SYS_AUE_linux_getdents AUE_GETDIRENTRIES
#define LINUX_SYS_AUE_linux_select AUE_SELECT
#define LINUX_SYS_AUE_linux_msync AUE_MSYNC
#define LINUX_SYS_AUE_linux_writev AUE_WRITEV
#define LINUX_SYS_AUE_linux_getsid AUE_GETSID
#define LINUX_SYS_AUE_linux_fdatasync AUE_NULL
#define LINUX_SYS_AUE_linux_sysctl AUE_SYSCTL

View file

@ -135,7 +135,7 @@
#define LINUX_SYS_flock 143
#define LINUX_SYS_linux_msync 144
#define LINUX_SYS_readv 145
#define LINUX_SYS_writev 146
#define LINUX_SYS_linux_writev 146
#define LINUX_SYS_linux_getsid 147
#define LINUX_SYS_linux_fdatasync 148
#define LINUX_SYS_linux_sysctl 149

View file

@ -152,7 +152,7 @@ const char *linux_syscallnames[] = {
"flock", /* 143 = flock */
"linux_msync", /* 144 = linux_msync */
"readv", /* 145 = readv */
"writev", /* 146 = writev */
"linux_writev", /* 146 = linux_writev */
"linux_getsid", /* 147 = linux_getsid */
"linux_fdatasync", /* 148 = linux_fdatasync */
"linux_sysctl", /* 149 = linux_sysctl */

View file

@ -162,7 +162,7 @@ struct sysent linux_sysent[] = {
{ .sy_narg = AS(flock_args), .sy_call = (sy_call_t *)sys_flock, .sy_auevent = AUE_FLOCK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 143 = flock */
{ .sy_narg = AS(linux_msync_args), .sy_call = (sy_call_t *)linux_msync, .sy_auevent = AUE_MSYNC, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 144 = linux_msync */
{ .sy_narg = AS(readv_args), .sy_call = (sy_call_t *)sys_readv, .sy_auevent = AUE_READV, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 145 = readv */
{ .sy_narg = AS(writev_args), .sy_call = (sy_call_t *)sys_writev, .sy_auevent = AUE_WRITEV, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 146 = writev */
{ .sy_narg = AS(linux_writev_args), .sy_call = (sy_call_t *)linux_writev, .sy_auevent = AUE_WRITEV, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 146 = linux_writev */
{ .sy_narg = AS(linux_getsid_args), .sy_call = (sy_call_t *)linux_getsid, .sy_auevent = AUE_GETSID, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 147 = linux_getsid */
{ .sy_narg = AS(linux_fdatasync_args), .sy_call = (sy_call_t *)linux_fdatasync, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 148 = linux_fdatasync */
{ .sy_narg = AS(linux_sysctl_args), .sy_call = (sy_call_t *)linux_sysctl, .sy_auevent = AUE_SYSCTL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 149 = linux_sysctl */

View file

@ -1005,9 +1005,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
*n_args = 3;
break;
}
/* writev */
/* linux_writev */
case 146: {
struct writev_args *p = params;
struct linux_writev_args *p = params;
iarg[a++] = p->fd; /* int */
uarg[a++] = (intptr_t)p->iovp; /* struct iovec * */
uarg[a++] = p->iovcnt; /* u_int */
@ -4822,7 +4822,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
};
break;
/* writev */
/* linux_writev */
case 146:
switch (ndx) {
case 0:
@ -9214,7 +9214,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
if (ndx == 0 || ndx == 1)
p = "int";
break;
/* writev */
/* linux_writev */
case 146:
if (ndx == 0 || ndx == 1)
p = "int";