From nobody Wed Nov 17 20:22:05 2021 X-Original-To: dev-commits-src-main@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 0952F185425B; Wed, 17 Nov 2021 20:22:08 +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 4HvZ8t4Sm9z4qs3; Wed, 17 Nov 2021 20:22:06 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 8A10C2789A; Wed, 17 Nov 2021 20:22:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1AHKM5FA059258; Wed, 17 Nov 2021 20:22:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKM5UL059257; Wed, 17 Nov 2021 20:22:05 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:05 GMT Message-Id: <202111172022.1AHKM5UL059257@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 2385f4d1728b - main - syscalls: use __socklen_t as appropriate List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2385f4d1728b327172c3a4a944f984bd91625a6f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=2385f4d1728b327172c3a4a944f984bd91625a6f commit 2385f4d1728b327172c3a4a944f984bd91625a6f Author: Brooks Davis AuthorDate: 2021-11-17 20:12:22 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:22 +0000 syscalls: use __socklen_t as appropriate No functional change as __socklen_t is an int. Obtained from: CheriBSD Reviewed by: kevans --- sys/kern/syscalls.master | 22 +++++++++++----------- sys/kern/systrace_args.c | 28 ++++++++++++++-------------- sys/sys/sysproto.h | 18 +++++++++--------- 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index a69b99cb0693..2ffefdef04a3 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -628,14 +628,14 @@ int connect( int s, _In_reads_bytes_(namelen) const struct sockaddr *name, - int namelen + __socklen_t namelen ); } 99 AUE_ACCEPT COMPAT|CAPENABLED { int accept( int s, _Out_writes_bytes_opt_(*anamelen) struct sockaddr *name, - int *anamelen + __socklen_t *anamelen ); } 100 AUE_GETPRIORITY STD|CAPENABLED { @@ -669,7 +669,7 @@ int bind( int s, _In_reads_bytes_(namelen) const struct sockaddr *name, - int namelen + __socklen_t namelen ); } 105 AUE_SETSOCKOPT STD|CAPENABLED { @@ -678,7 +678,7 @@ int level, int name, _In_reads_bytes_opt_(valsize) const void *val, - int valsize + __socklen_t valsize ); } 106 AUE_LISTEN STD|CAPENABLED { @@ -751,7 +751,7 @@ int level, int name, _Out_writes_bytes_opt_(*avalsize) void *val, - _Inout_ int *avalsize + _Inout_ __socklen_t *avalsize ); } 119 AUE_NULL RESERVED @@ -795,7 +795,7 @@ size_t len, int flags, _Out_writes_bytes_(*fromlenaddr) struct sockaddr *from, - _Inout_ int *fromlenaddr + _Inout_ __socklen_t *fromlenaddr ); } recvfrom recvfrom_args int 126 AUE_SETREUID STD|CAPENABLED { @@ -847,7 +847,7 @@ size_t len, int flags, _In_reads_bytes_opt_(tolen) const struct sockaddr *to, - int tolen + __socklen_t tolen ); } 134 AUE_SHUTDOWN STD|CAPENABLED { @@ -892,7 +892,7 @@ int getpeername( int fdes, _Out_writes_bytes_(*alen) struct sockaddr *asa, - _Inout_opt_ int *alen + _Inout_opt_ __socklen_t *alen ); } 142 AUE_SYSCTL COMPAT|CAPENABLED { @@ -939,7 +939,7 @@ int getsockname( int fdec, _Out_writes_bytes_(*alen) struct sockaddr *asa, - _Inout_ int *alen + _Inout_ __socklen_t *alen ); } getsockname getsockname_args int 151-153 AUE_NULL RESERVED @@ -2960,7 +2960,7 @@ int fd, int s, _In_reads_bytes_(namelen) const struct sockaddr *name, - int namelen + __socklen_t namelen ); } 539 AUE_CONNECTAT STD|CAPENABLED { @@ -2968,7 +2968,7 @@ int fd, int s, _In_reads_bytes_(namelen) const struct sockaddr *name, - int namelen + __socklen_t namelen ); } 540 AUE_CHFLAGSAT STD|CAPENABLED { diff --git a/sys/kern/systrace_args.c b/sys/kern/systrace_args.c index 55788649de4f..ab8e4d0d49d3 100644 --- a/sys/kern/systrace_args.c +++ b/sys/kern/systrace_args.c @@ -583,7 +583,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) struct connect_args *p = params; iarg[0] = p->s; /* int */ uarg[1] = (intptr_t)p->name; /* const struct sockaddr * */ - iarg[2] = p->namelen; /* int */ + iarg[2] = p->namelen; /* __socklen_t */ *n_args = 3; break; } @@ -600,7 +600,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) struct bind_args *p = params; iarg[0] = p->s; /* int */ uarg[1] = (intptr_t)p->name; /* const struct sockaddr * */ - iarg[2] = p->namelen; /* int */ + iarg[2] = p->namelen; /* __socklen_t */ *n_args = 3; break; } @@ -611,7 +611,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[1] = p->level; /* int */ iarg[2] = p->name; /* int */ uarg[3] = (intptr_t)p->val; /* const void * */ - iarg[4] = p->valsize; /* int */ + iarg[4] = p->valsize; /* __socklen_t */ *n_args = 5; break; } @@ -646,7 +646,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[1] = p->level; /* int */ iarg[2] = p->name; /* int */ uarg[3] = (intptr_t)p->val; /* void * */ - uarg[4] = (intptr_t)p->avalsize; /* int * */ + uarg[4] = (intptr_t)p->avalsize; /* __socklen_t * */ *n_args = 5; break; } @@ -741,7 +741,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) uarg[2] = p->len; /* size_t */ iarg[3] = p->flags; /* int */ uarg[4] = (intptr_t)p->to; /* const struct sockaddr * */ - iarg[5] = p->tolen; /* int */ + iarg[5] = p->tolen; /* __socklen_t */ *n_args = 6; break; } @@ -3032,7 +3032,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->fd; /* int */ iarg[1] = p->s; /* int */ uarg[2] = (intptr_t)p->name; /* const struct sockaddr * */ - iarg[3] = p->namelen; /* int */ + iarg[3] = p->namelen; /* __socklen_t */ *n_args = 4; break; } @@ -3042,7 +3042,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->fd; /* int */ iarg[1] = p->s; /* int */ uarg[2] = (intptr_t)p->name; /* const struct sockaddr * */ - iarg[3] = p->namelen; /* int */ + iarg[3] = p->namelen; /* __socklen_t */ *n_args = 4; break; } @@ -4321,7 +4321,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const struct sockaddr *"; break; case 2: - p = "int"; + p = "__socklen_t"; break; default: break; @@ -4350,7 +4350,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const struct sockaddr *"; break; case 2: - p = "int"; + p = "__socklen_t"; break; default: break; @@ -4372,7 +4372,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const void *"; break; case 4: - p = "int"; + p = "__socklen_t"; break; default: break; @@ -4433,7 +4433,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland void *"; break; case 4: - p = "userland int *"; + p = "userland __socklen_t *"; break; default: break; @@ -4597,7 +4597,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const struct sockaddr *"; break; case 5: - p = "int"; + p = "__socklen_t"; break; default: break; @@ -8438,7 +8438,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const struct sockaddr *"; break; case 3: - p = "int"; + p = "__socklen_t"; break; default: break; @@ -8457,7 +8457,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const struct sockaddr *"; break; case 3: - p = "int"; + p = "__socklen_t"; break; default: break; diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index b6b33df7b9cc..c95fed5a0f3c 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -348,7 +348,7 @@ struct socket_args { struct connect_args { char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; char name_l_[PADL_(const struct sockaddr *)]; const struct sockaddr * name; char name_r_[PADR_(const struct sockaddr *)]; - char namelen_l_[PADL_(int)]; int namelen; char namelen_r_[PADR_(int)]; + char namelen_l_[PADL_(__socklen_t)]; __socklen_t namelen; char namelen_r_[PADR_(__socklen_t)]; }; struct getpriority_args { char which_l_[PADL_(int)]; int which; char which_r_[PADR_(int)]; @@ -357,14 +357,14 @@ struct getpriority_args { struct bind_args { char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; char name_l_[PADL_(const struct sockaddr *)]; const struct sockaddr * name; char name_r_[PADR_(const struct sockaddr *)]; - char namelen_l_[PADL_(int)]; int namelen; char namelen_r_[PADR_(int)]; + char namelen_l_[PADL_(__socklen_t)]; __socklen_t namelen; char namelen_r_[PADR_(__socklen_t)]; }; struct setsockopt_args { char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; char level_l_[PADL_(int)]; int level; char level_r_[PADR_(int)]; char name_l_[PADL_(int)]; int name; char name_r_[PADR_(int)]; char val_l_[PADL_(const void *)]; const void * val; char val_r_[PADR_(const void *)]; - char valsize_l_[PADL_(int)]; int valsize; char valsize_r_[PADR_(int)]; + char valsize_l_[PADL_(__socklen_t)]; __socklen_t valsize; char valsize_r_[PADR_(__socklen_t)]; }; struct listen_args { char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; @@ -383,7 +383,7 @@ struct getsockopt_args { char level_l_[PADL_(int)]; int level; char level_r_[PADR_(int)]; char name_l_[PADL_(int)]; int name; char name_r_[PADR_(int)]; char val_l_[PADL_(void *)]; void * val; char val_r_[PADR_(void *)]; - char avalsize_l_[PADL_(int *)]; int * avalsize; char avalsize_r_[PADR_(int *)]; + char avalsize_l_[PADL_(__socklen_t *)]; __socklen_t * avalsize; char avalsize_r_[PADR_(__socklen_t *)]; }; struct readv_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; @@ -434,7 +434,7 @@ struct sendto_args { char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; char to_l_[PADL_(const struct sockaddr *)]; const struct sockaddr * to; char to_r_[PADR_(const struct sockaddr *)]; - char tolen_l_[PADL_(int)]; int tolen; char tolen_r_[PADR_(int)]; + char tolen_l_[PADL_(__socklen_t)]; __socklen_t tolen; char tolen_r_[PADR_(__socklen_t)]; }; struct shutdown_args { char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; @@ -1638,13 +1638,13 @@ struct bindat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; char name_l_[PADL_(const struct sockaddr *)]; const struct sockaddr * name; char name_r_[PADR_(const struct sockaddr *)]; - char namelen_l_[PADL_(int)]; int namelen; char namelen_r_[PADR_(int)]; + char namelen_l_[PADL_(__socklen_t)]; __socklen_t namelen; char namelen_r_[PADR_(__socklen_t)]; }; struct connectat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; char name_l_[PADL_(const struct sockaddr *)]; const struct sockaddr * name; char name_r_[PADR_(const struct sockaddr *)]; - char namelen_l_[PADL_(int)]; int namelen; char namelen_r_[PADR_(int)]; + char namelen_l_[PADL_(__socklen_t)]; __socklen_t namelen; char namelen_r_[PADR_(__socklen_t)]; }; struct chflagsat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; @@ -2311,7 +2311,7 @@ struct osethostname_args { struct oaccept_args { char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; char name_l_[PADL_(struct sockaddr *)]; struct sockaddr * name; char name_r_[PADR_(struct sockaddr *)]; - char anamelen_l_[PADL_(int *)]; int * anamelen; char anamelen_r_[PADR_(int *)]; + char anamelen_l_[PADL_(__socklen_t *)]; __socklen_t * anamelen; char anamelen_r_[PADR_(__socklen_t *)]; }; struct osend_args { char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; @@ -2367,7 +2367,7 @@ struct oftruncate_args { struct ogetpeername_args { char fdes_l_[PADL_(int)]; int fdes; char fdes_r_[PADR_(int)]; char asa_l_[PADL_(struct sockaddr *)]; struct sockaddr * asa; char asa_r_[PADR_(struct sockaddr *)]; - char alen_l_[PADL_(int *)]; int * alen; char alen_r_[PADR_(int *)]; + char alen_l_[PADL_(__socklen_t *)]; __socklen_t * alen; char alen_r_[PADR_(__socklen_t *)]; }; struct osethostid_args { char hostid_l_[PADL_(long)]; long hostid; char hostid_r_[PADR_(long)];