From nobody Sun Aug 20 07:37:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RT6s42BYRz4qrxP; Sun, 20 Aug 2023 07:37:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RT6s41xnmz3D6H; Sun, 20 Aug 2023 07:37:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692517064; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9rxGrHYBZ9bdulIbgFkr8IPb4UKZHL402O7FldoWaRk=; b=Cf00eVMWaDGYvFPjPd7L/Q15+soTLAFud5RKhXmwVK3ayyrefs//Qbk25HVbgpQhPG9o1n McmVJTfWbUHB/Duh+YcWheVX7WSXzJDogy5Lh6HdwKx1AW+LCP0zfNtk1GPTE5m2wGtoog 8vnuv7movhoefBT7c3ptyOYNgdDd++NzkFLQzWINVxqyEJKUT3ghvkrhUc5SiunNPcZ8Lm a/kkvfBJnF6k0yeW0fz3LwqXkkWpT+HQ7KSIqRIY+19/qgy65WnK/1UhQqrnwcCfvuTqTX NmNz/S8Tu+UDUb9wa/B9m6oithLXUCqKx7vPh7wS50CfNSnkHtS5l3YDGStfmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692517064; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9rxGrHYBZ9bdulIbgFkr8IPb4UKZHL402O7FldoWaRk=; b=pUeL6x9BVEeSkWXPjAT33D9LwYyVcBvi899DbI3AynDIhNrm1FeuOkFUX2hKykHU9zK9J8 qgn0jBvXGl3s+0ijcp5URKukbLKZfuXMcWgd2HxmF7ZYHuh0sbfEaswgmFfal2makvDOzf HoDg858/NeiFlFBFHPKPQsuDLfLNC5p0IABW3QhPmeM7QOD3E23YsDfI6ngIS8xpt4xfGq 9IRKZzRcvTDxrh0sfW1yXRQdD4qrysdoO7z6ty+ba0Uar8zOvS6gOIaOPV6x22jyuBa5QZ s4M/sfYS0CxIifnjGW2l4VkwLkGpGyqVOcofGdym8he8BDHoJKUpClFl5dUVMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1692517064; a=rsa-sha256; cv=none; b=kaP2pxq8e9mSBXe9/prqq0ROO/gFHZM7y64EAJZet8ZO3heQZ0EovmrpqzQCu9ZphgZHcX 2r/Ciq2v21GxYNLNyeP9j1GrzW/vdYZJq4gJygy8EoeJM+ZeMXSUvr+kBrqg1Fr1OE9oeZ 8+7TxDfsTj0Yw5TBFmb38HW6vzsAHVSixTpphPKx2DoEgSkOIcTvQc4M5yvlOOjkmYn2uI AA0BG1tYu2cRJv6AweXyzpIstJPWG1pGN0pUIWoa1jClGZ4irLfA8MCd6YjICwuV04oHOl kW7qH759Mm3zia0G+Elj6BnIBR3ut0U5XvoXYCH4tMrcT37p1oInlo0adi2hWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RT6s40n06zWSj; Sun, 20 Aug 2023 07:37:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37K7biqA049556; Sun, 20 Aug 2023 07:37:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37K7bic9049553; Sun, 20 Aug 2023 07:37:44 GMT (envelope-from git) Date: Sun, 20 Aug 2023 07:37:44 GMT Message-Id: <202308200737.37K7bic9049553@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 89d270b28def - main - Regen for write syscall List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 89d270b28def13957db730224435f8a6190589b9 Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=89d270b28def13957db730224435f8a6190589b9 commit 89d270b28def13957db730224435f8a6190589b9 Author: Dmitry Chagin AuthorDate: 2023-08-20 07:36:29 +0000 Commit: Dmitry Chagin CommitDate: 2023-08-20 07:36:29 +0000 Regen for write syscall --- sys/amd64/linux/linux_proto.h | 7 +++++++ sys/amd64/linux/linux_syscall.h | 2 +- sys/amd64/linux/linux_syscalls.c | 2 +- sys/amd64/linux/linux_sysent.c | 2 +- sys/amd64/linux/linux_systrace_args.c | 8 ++++---- sys/amd64/linux32/linux32_proto.h | 7 +++++++ sys/amd64/linux32/linux32_syscall.h | 2 +- sys/amd64/linux32/linux32_syscalls.c | 2 +- sys/amd64/linux32/linux32_sysent.c | 2 +- sys/amd64/linux32/linux32_systrace_args.c | 12 ++++++------ sys/arm64/linux/linux_proto.h | 7 +++++++ sys/arm64/linux/linux_syscall.h | 2 +- sys/arm64/linux/linux_syscalls.c | 2 +- sys/arm64/linux/linux_sysent.c | 2 +- sys/arm64/linux/linux_systrace_args.c | 8 ++++---- sys/i386/linux/linux_proto.h | 7 +++++++ sys/i386/linux/linux_syscall.h | 2 +- sys/i386/linux/linux_syscalls.c | 2 +- sys/i386/linux/linux_sysent.c | 2 +- sys/i386/linux/linux_systrace_args.c | 12 ++++++------ 20 files changed, 60 insertions(+), 32 deletions(-) diff --git a/sys/amd64/linux/linux_proto.h b/sys/amd64/linux/linux_proto.h index 84d3b04de1a4..80b5998e2f26 100644 --- a/sys/amd64/linux/linux_proto.h +++ b/sys/amd64/linux/linux_proto.h @@ -34,6 +34,11 @@ struct thread; #endif #define nosys linux_nosys +struct linux_write_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + 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_open_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; @@ -1396,6 +1401,7 @@ struct linux_mount_setattr_args { syscallarg_t dummy; }; #define nosys linux_nosys +int linux_write(struct thread *, struct linux_write_args *); int linux_open(struct thread *, struct linux_open_args *); int linux_newstat(struct thread *, struct linux_newstat_args *); int linux_newfstat(struct thread *, struct linux_newfstat_args *); @@ -1693,6 +1699,7 @@ int linux_faccessat2(struct thread *, struct linux_faccessat2_args *); int linux_process_madvise(struct thread *, struct linux_process_madvise_args *); int linux_epoll_pwait2(struct thread *, struct linux_epoll_pwait2_args *); int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); +#define LINUX_SYS_AUE_linux_write AUE_NULL #define LINUX_SYS_AUE_linux_open AUE_OPEN_RWTC #define LINUX_SYS_AUE_linux_newstat AUE_STAT #define LINUX_SYS_AUE_linux_newfstat AUE_FSTAT diff --git a/sys/amd64/linux/linux_syscall.h b/sys/amd64/linux/linux_syscall.h index 690f402ef2d0..45ba487f3a93 100644 --- a/sys/amd64/linux/linux_syscall.h +++ b/sys/amd64/linux/linux_syscall.h @@ -5,7 +5,7 @@ */ #define LINUX_SYS_read 0 -#define LINUX_SYS_write 1 +#define LINUX_SYS_linux_write 1 #define LINUX_SYS_linux_open 2 #define LINUX_SYS_close 3 #define LINUX_SYS_linux_newstat 4 diff --git a/sys/amd64/linux/linux_syscalls.c b/sys/amd64/linux/linux_syscalls.c index 04131a05c0db..57f65a0a6cbf 100644 --- a/sys/amd64/linux/linux_syscalls.c +++ b/sys/amd64/linux/linux_syscalls.c @@ -7,7 +7,7 @@ const char *linux_syscallnames[] = { #define nosys linux_nosys "read", /* 0 = read */ - "write", /* 1 = write */ + "linux_write", /* 1 = linux_write */ "linux_open", /* 2 = linux_open */ "close", /* 3 = close */ "linux_newstat", /* 4 = linux_newstat */ diff --git a/sys/amd64/linux/linux_sysent.c b/sys/amd64/linux/linux_sysent.c index c2550aec6831..79557b3780b3 100644 --- a/sys/amd64/linux/linux_sysent.c +++ b/sys/amd64/linux/linux_sysent.c @@ -17,7 +17,7 @@ struct sysent linux_sysent[] = { #define nosys linux_nosys { .sy_narg = AS(read_args), .sy_call = (sy_call_t *)sys_read, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 0 = read */ - { .sy_narg = AS(write_args), .sy_call = (sy_call_t *)sys_write, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 1 = write */ + { .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 }, /* 1 = linux_write */ { .sy_narg = AS(linux_open_args), .sy_call = (sy_call_t *)linux_open, .sy_auevent = AUE_OPEN_RWTC, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 2 = linux_open */ { .sy_narg = AS(close_args), .sy_call = (sy_call_t *)sys_close, .sy_auevent = AUE_CLOSE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 3 = close */ { .sy_narg = AS(linux_newstat_args), .sy_call = (sy_call_t *)linux_newstat, .sy_auevent = AUE_STAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 4 = linux_newstat */ diff --git a/sys/amd64/linux/linux_systrace_args.c b/sys/amd64/linux/linux_systrace_args.c index 45e4cce95095..5edef91239d3 100644 --- a/sys/amd64/linux/linux_systrace_args.c +++ b/sys/amd64/linux/linux_systrace_args.c @@ -21,9 +21,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 3; break; } - /* write */ + /* linux_write */ case 1: { - struct write_args *p = params; + struct linux_write_args *p = params; iarg[a++] = p->fd; /* int */ uarg[a++] = (intptr_t)p->buf; /* char * */ iarg[a++] = p->nbyte; /* l_size_t */ @@ -2778,7 +2778,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; - /* write */ + /* linux_write */ case 1: switch (ndx) { case 0: @@ -7198,7 +7198,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; - /* write */ + /* linux_write */ case 1: if (ndx == 0 || ndx == 1) p = "int"; diff --git a/sys/amd64/linux32/linux32_proto.h b/sys/amd64/linux32/linux32_proto.h index e0d52b2675d6..4934b22c1ca1 100644 --- a/sys/amd64/linux32/linux32_proto.h +++ b/sys/amd64/linux32/linux32_proto.h @@ -40,6 +40,11 @@ struct linux_exit_args { struct linux_fork_args { syscallarg_t dummy; }; +struct linux_write_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + 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_open_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; @@ -1704,6 +1709,7 @@ struct linux_mount_setattr_args { #define nosys linux_nosys int linux_exit(struct thread *, struct linux_exit_args *); int linux_fork(struct thread *, struct linux_fork_args *); +int linux_write(struct thread *, struct linux_write_args *); int linux_open(struct thread *, struct linux_open_args *); int linux_waitpid(struct thread *, struct linux_waitpid_args *); int linux_creat(struct thread *, struct linux_creat_args *); @@ -2067,6 +2073,7 @@ int linux_epoll_pwait2_64(struct thread *, struct linux_epoll_pwait2_64_args *); int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX32_SYS_AUE_linux_exit AUE_EXIT #define LINUX32_SYS_AUE_linux_fork AUE_FORK +#define LINUX32_SYS_AUE_linux_write AUE_NULL #define LINUX32_SYS_AUE_linux_open AUE_OPEN_RWTC #define LINUX32_SYS_AUE_linux_waitpid AUE_WAIT4 #define LINUX32_SYS_AUE_linux_creat AUE_CREAT diff --git a/sys/amd64/linux32/linux32_syscall.h b/sys/amd64/linux32/linux32_syscall.h index 6fab4cb61bb3..e24080e3c2e7 100644 --- a/sys/amd64/linux32/linux32_syscall.h +++ b/sys/amd64/linux32/linux32_syscall.h @@ -7,7 +7,7 @@ #define LINUX32_SYS_linux_exit 1 #define LINUX32_SYS_linux_fork 2 #define LINUX32_SYS_read 3 -#define LINUX32_SYS_write 4 +#define LINUX32_SYS_linux_write 4 #define LINUX32_SYS_linux_open 5 #define LINUX32_SYS_close 6 #define LINUX32_SYS_linux_waitpid 7 diff --git a/sys/amd64/linux32/linux32_syscalls.c b/sys/amd64/linux32/linux32_syscalls.c index 6706189b7036..cdeda60a1577 100644 --- a/sys/amd64/linux32/linux32_syscalls.c +++ b/sys/amd64/linux32/linux32_syscalls.c @@ -10,7 +10,7 @@ const char *linux32_syscallnames[] = { "linux_exit", /* 1 = linux_exit */ "linux_fork", /* 2 = linux_fork */ "read", /* 3 = read */ - "write", /* 4 = write */ + "linux_write", /* 4 = linux_write */ "linux_open", /* 5 = linux_open */ "close", /* 6 = close */ "linux_waitpid", /* 7 = linux_waitpid */ diff --git a/sys/amd64/linux32/linux32_sysent.c b/sys/amd64/linux32/linux32_sysent.c index f005ffb9ea54..b5513743bbee 100644 --- a/sys/amd64/linux32/linux32_sysent.c +++ b/sys/amd64/linux32/linux32_sysent.c @@ -20,7 +20,7 @@ struct sysent linux32_sysent[] = { { .sy_narg = AS(linux_exit_args), .sy_call = (sy_call_t *)linux_exit, .sy_auevent = AUE_EXIT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 1 = linux_exit */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_fork, .sy_auevent = AUE_FORK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 2 = linux_fork */ { .sy_narg = AS(read_args), .sy_call = (sy_call_t *)sys_read, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 3 = read */ - { .sy_narg = AS(write_args), .sy_call = (sy_call_t *)sys_write, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 4 = write */ + { .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 }, /* 4 = linux_write */ { .sy_narg = AS(linux_open_args), .sy_call = (sy_call_t *)linux_open, .sy_auevent = AUE_OPEN_RWTC, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 5 = linux_open */ { .sy_narg = AS(close_args), .sy_call = (sy_call_t *)sys_close, .sy_auevent = AUE_CLOSE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 6 = close */ { .sy_narg = AS(linux_waitpid_args), .sy_call = (sy_call_t *)linux_waitpid, .sy_auevent = AUE_WAIT4, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 7 = linux_waitpid */ diff --git a/sys/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c index ba1c2c01852c..82736cb221bf 100644 --- a/sys/amd64/linux32/linux32_systrace_args.c +++ b/sys/amd64/linux32/linux32_systrace_args.c @@ -33,12 +33,12 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 3; break; } - /* write */ + /* linux_write */ case 4: { - struct write_args *p = params; + struct linux_write_args *p = params; iarg[a++] = p->fd; /* int */ uarg[a++] = (intptr_t)p->buf; /* char * */ - uarg[a++] = p->nbyte; /* u_int */ + iarg[a++] = p->nbyte; /* l_size_t */ *n_args = 3; break; } @@ -3305,7 +3305,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; - /* write */ + /* linux_write */ case 4: switch (ndx) { case 0: @@ -3315,7 +3315,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland char *"; break; case 2: - p = "u_int"; + p = "l_size_t"; break; default: break; @@ -8584,7 +8584,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; - /* write */ + /* linux_write */ case 4: if (ndx == 0 || ndx == 1) p = "int"; diff --git a/sys/arm64/linux/linux_proto.h b/sys/arm64/linux/linux_proto.h index 34108364f751..f239bcb1463b 100644 --- a/sys/arm64/linux/linux_proto.h +++ b/sys/arm64/linux/linux_proto.h @@ -270,6 +270,11 @@ struct linux_lseek_args { char off_l_[PADL_(l_off_t)]; l_off_t off; char off_r_[PADR_(l_off_t)]; char whence_l_[PADL_(l_int)]; l_int whence; char whence_r_[PADR_(l_int)]; }; +struct linux_write_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + 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_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 *)]; @@ -1254,6 +1259,7 @@ int linux_vhangup(struct thread *, struct linux_vhangup_args *); 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_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 *); @@ -1502,6 +1508,7 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX_SYS_AUE_linux_pipe2 AUE_NULL #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_pread AUE_PREAD #define LINUX_SYS_AUE_linux_pwrite AUE_PWRITE #define LINUX_SYS_AUE_linux_preadv AUE_NULL diff --git a/sys/arm64/linux/linux_syscall.h b/sys/arm64/linux/linux_syscall.h index fe44c5c87e81..3307005a74c0 100644 --- a/sys/arm64/linux/linux_syscall.h +++ b/sys/arm64/linux/linux_syscall.h @@ -60,7 +60,7 @@ #define LINUX_SYS_linux_getdents64 61 #define LINUX_SYS_linux_lseek 62 #define LINUX_SYS_read 63 -#define LINUX_SYS_write 64 +#define LINUX_SYS_linux_write 64 #define LINUX_SYS_readv 65 #define LINUX_SYS_writev 66 #define LINUX_SYS_linux_pread 67 diff --git a/sys/arm64/linux/linux_syscalls.c b/sys/arm64/linux/linux_syscalls.c index d1762a9166f6..86b3c012c0b2 100644 --- a/sys/arm64/linux/linux_syscalls.c +++ b/sys/arm64/linux/linux_syscalls.c @@ -70,7 +70,7 @@ const char *linux_syscallnames[] = { "linux_getdents64", /* 61 = linux_getdents64 */ "linux_lseek", /* 62 = linux_lseek */ "read", /* 63 = read */ - "write", /* 64 = write */ + "linux_write", /* 64 = linux_write */ "readv", /* 65 = readv */ "writev", /* 66 = writev */ "linux_pread", /* 67 = linux_pread */ diff --git a/sys/arm64/linux/linux_sysent.c b/sys/arm64/linux/linux_sysent.c index 00f4f2f2f735..940391dd175e 100644 --- a/sys/arm64/linux/linux_sysent.c +++ b/sys/arm64/linux/linux_sysent.c @@ -80,7 +80,7 @@ struct sysent linux_sysent[] = { { .sy_narg = AS(linux_getdents64_args), .sy_call = (sy_call_t *)linux_getdents64, .sy_auevent = AUE_GETDIRENTRIES, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 61 = linux_getdents64 */ { .sy_narg = AS(linux_lseek_args), .sy_call = (sy_call_t *)linux_lseek, .sy_auevent = AUE_LSEEK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 62 = linux_lseek */ { .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(write_args), .sy_call = (sy_call_t *)sys_write, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 64 = write */ + { .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_pread_args), .sy_call = (sy_call_t *)linux_pread, .sy_auevent = AUE_PREAD, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 67 = linux_pread */ diff --git a/sys/arm64/linux/linux_systrace_args.c b/sys/arm64/linux/linux_systrace_args.c index b45fbcf746f4..06f973cebe37 100644 --- a/sys/arm64/linux/linux_systrace_args.c +++ b/sys/arm64/linux/linux_systrace_args.c @@ -492,9 +492,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 3; break; } - /* write */ + /* linux_write */ case 64: { - struct write_args *p = params; + struct linux_write_args *p = params; iarg[a++] = p->fd; /* int */ uarg[a++] = (intptr_t)p->buf; /* char * */ iarg[a++] = p->nbyte; /* l_size_t */ @@ -3203,7 +3203,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; - /* write */ + /* linux_write */ case 64: switch (ndx) { case 0: @@ -6533,7 +6533,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; - /* write */ + /* linux_write */ case 64: if (ndx == 0 || ndx == 1) p = "int"; diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h index 5ed3630599c6..5b58629d7b92 100644 --- a/sys/i386/linux/linux_proto.h +++ b/sys/i386/linux/linux_proto.h @@ -40,6 +40,11 @@ struct linux_exit_args { struct linux_fork_args { syscallarg_t dummy; }; +struct linux_write_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + 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_open_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; @@ -1693,6 +1698,7 @@ struct linux_mount_setattr_args { #define nosys linux_nosys int linux_exit(struct thread *, struct linux_exit_args *); int linux_fork(struct thread *, struct linux_fork_args *); +int linux_write(struct thread *, struct linux_write_args *); int linux_open(struct thread *, struct linux_open_args *); int linux_waitpid(struct thread *, struct linux_waitpid_args *); int linux_creat(struct thread *, struct linux_creat_args *); @@ -2057,6 +2063,7 @@ int linux_epoll_pwait2_64(struct thread *, struct linux_epoll_pwait2_64_args *); int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX_SYS_AUE_linux_exit AUE_EXIT #define LINUX_SYS_AUE_linux_fork AUE_FORK +#define LINUX_SYS_AUE_linux_write AUE_NULL #define LINUX_SYS_AUE_linux_open AUE_OPEN_RWTC #define LINUX_SYS_AUE_linux_waitpid AUE_WAIT4 #define LINUX_SYS_AUE_linux_creat AUE_CREAT diff --git a/sys/i386/linux/linux_syscall.h b/sys/i386/linux/linux_syscall.h index 5aca8ed78c6f..aafcd849634f 100644 --- a/sys/i386/linux/linux_syscall.h +++ b/sys/i386/linux/linux_syscall.h @@ -7,7 +7,7 @@ #define LINUX_SYS_linux_exit 1 #define LINUX_SYS_linux_fork 2 #define LINUX_SYS_read 3 -#define LINUX_SYS_write 4 +#define LINUX_SYS_linux_write 4 #define LINUX_SYS_linux_open 5 #define LINUX_SYS_close 6 #define LINUX_SYS_linux_waitpid 7 diff --git a/sys/i386/linux/linux_syscalls.c b/sys/i386/linux/linux_syscalls.c index 88ebcbd36073..b6076e9115c2 100644 --- a/sys/i386/linux/linux_syscalls.c +++ b/sys/i386/linux/linux_syscalls.c @@ -10,7 +10,7 @@ const char *linux_syscallnames[] = { "linux_exit", /* 1 = linux_exit */ "linux_fork", /* 2 = linux_fork */ "read", /* 3 = read */ - "write", /* 4 = write */ + "linux_write", /* 4 = linux_write */ "linux_open", /* 5 = linux_open */ "close", /* 6 = close */ "linux_waitpid", /* 7 = linux_waitpid */ diff --git a/sys/i386/linux/linux_sysent.c b/sys/i386/linux/linux_sysent.c index d08b8458740a..be84f04ac9be 100644 --- a/sys/i386/linux/linux_sysent.c +++ b/sys/i386/linux/linux_sysent.c @@ -20,7 +20,7 @@ struct sysent linux_sysent[] = { { .sy_narg = AS(linux_exit_args), .sy_call = (sy_call_t *)linux_exit, .sy_auevent = AUE_EXIT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 1 = linux_exit */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_fork, .sy_auevent = AUE_FORK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 2 = linux_fork */ { .sy_narg = AS(read_args), .sy_call = (sy_call_t *)sys_read, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 3 = read */ - { .sy_narg = AS(write_args), .sy_call = (sy_call_t *)sys_write, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 4 = write */ + { .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 }, /* 4 = linux_write */ { .sy_narg = AS(linux_open_args), .sy_call = (sy_call_t *)linux_open, .sy_auevent = AUE_OPEN_RWTC, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 5 = linux_open */ { .sy_narg = AS(close_args), .sy_call = (sy_call_t *)sys_close, .sy_auevent = AUE_CLOSE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 6 = close */ { .sy_narg = AS(linux_waitpid_args), .sy_call = (sy_call_t *)linux_waitpid, .sy_auevent = AUE_WAIT4, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 7 = linux_waitpid */ diff --git a/sys/i386/linux/linux_systrace_args.c b/sys/i386/linux/linux_systrace_args.c index 20098469d72e..b6470cb66583 100644 --- a/sys/i386/linux/linux_systrace_args.c +++ b/sys/i386/linux/linux_systrace_args.c @@ -33,12 +33,12 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 3; break; } - /* write */ + /* linux_write */ case 4: { - struct write_args *p = params; + struct linux_write_args *p = params; iarg[a++] = p->fd; /* int */ uarg[a++] = (intptr_t)p->buf; /* char * */ - uarg[a++] = p->nbyte; /* u_int */ + iarg[a++] = p->nbyte; /* l_size_t */ *n_args = 3; break; } @@ -3336,7 +3336,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; - /* write */ + /* linux_write */ case 4: switch (ndx) { case 0: @@ -3346,7 +3346,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland char *"; break; case 2: - p = "u_int"; + p = "l_size_t"; break; default: break; @@ -8640,7 +8640,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; - /* write */ + /* linux_write */ case 4: if (ndx == 0 || ndx == 1) p = "int";