From owner-svn-src-all@freebsd.org Tue Nov 6 18:47:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54C0A112D3FC; Tue, 6 Nov 2018 18:47:31 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E33B9860AD; Tue, 6 Nov 2018 18:47:30 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AA01928D7; Tue, 6 Nov 2018 18:47:30 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wA6IlUkQ006142; Tue, 6 Nov 2018 18:47:30 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wA6IlTLd006137; Tue, 6 Nov 2018 18:47:29 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201811061847.wA6IlTLd006137@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 6 Nov 2018 18:47:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r340200 - in head/sys: compat/freebsd32 kern sys X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in head/sys: compat/freebsd32 kern sys X-SVN-Commit-Revision: 340200 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E33B9860AD X-Spamd-Result: default: False [-103.10 / 200.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; ALLOW_DOMAIN_WHITELIST(-100.00)[FreeBSD.org]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.99)[-0.990,0]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; HAS_XAW(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; DMARC_NA(0.00)[FreeBSD.org]; RCVD_COUNT_THREE(0.00)[4]; MX_GOOD(-0.01)[cached: mx1.FreeBSD.org]; NEURAL_HAM_SHORT(-1.00)[-0.996,0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Nov 2018 18:47:31 -0000 Author: brooks Date: Tue Nov 6 18:47:29 2018 New Revision: 340200 URL: https://svnweb.freebsd.org/changeset/base/340200 Log: Regen after r340199: Use declared types for caddr_t arguments. Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D17852 Modified: head/sys/compat/freebsd32/freebsd32_proto.h head/sys/compat/freebsd32/freebsd32_systrace_args.c head/sys/kern/systrace_args.c head/sys/sys/socketvar.h head/sys/sys/sysproto.h Modified: head/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_proto.h Tue Nov 6 18:46:38 2018 (r340199) +++ head/sys/compat/freebsd32/freebsd32_proto.h Tue Nov 6 18:47:29 2018 (r340200) @@ -55,10 +55,10 @@ struct freebsd32_sendmsg_args { }; struct freebsd32_recvfrom_args { char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; - char buf_l_[PADL_(uint32_t)]; uint32_t buf; char buf_r_[PADR_(uint32_t)]; + char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)]; char len_l_[PADL_(uint32_t)]; uint32_t len; char len_r_[PADR_(uint32_t)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; - char from_l_[PADL_(uint32_t)]; uint32_t from; char from_r_[PADR_(uint32_t)]; + char from_l_[PADL_(struct sockaddr *)]; struct sockaddr * from; char from_r_[PADR_(struct sockaddr *)]; char fromlenaddr_l_[PADL_(uint32_t)]; uint32_t fromlenaddr; char fromlenaddr_r_[PADR_(uint32_t)]; }; struct freebsd10_freebsd32_pipe_args { @@ -417,7 +417,7 @@ struct freebsd32_pwrite_args { char offset2_l_[PADL_(uint32_t)]; uint32_t offset2; char offset2_r_[PADR_(uint32_t)]; }; struct freebsd32_mmap_args { - char addr_l_[PADL_(caddr_t)]; caddr_t addr; char addr_r_[PADR_(caddr_t)]; + char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; char prot_l_[PADL_(int)]; int prot; char prot_r_[PADR_(int)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; @@ -461,7 +461,7 @@ struct freebsd32_pwrite_args { char offset2_l_[PADL_(uint32_t)]; uint32_t offset2; char offset2_r_[PADR_(uint32_t)]; }; struct freebsd32_mmap_args { - char addr_l_[PADL_(caddr_t)]; caddr_t addr; char addr_r_[PADR_(caddr_t)]; + char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; char prot_l_[PADL_(int)]; int prot; char prot_r_[PADR_(int)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; @@ -1020,7 +1020,7 @@ struct freebsd6_freebsd32_pwrite_args { char offset2_l_[PADL_(uint32_t)]; uint32_t offset2; char offset2_r_[PADR_(uint32_t)]; }; struct freebsd6_freebsd32_mmap_args { - char addr_l_[PADL_(caddr_t)]; caddr_t addr; char addr_r_[PADR_(caddr_t)]; + char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; char prot_l_[PADL_(int)]; int prot; char prot_r_[PADR_(int)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; Modified: head/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_systrace_args.c Tue Nov 6 18:46:38 2018 (r340199) +++ head/sys/compat/freebsd32/freebsd32_systrace_args.c Tue Nov 6 18:47:29 2018 (r340200) @@ -139,7 +139,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg uarg[0] = (intptr_t) p->type; /* const char * */ uarg[1] = (intptr_t) p->path; /* const char * */ iarg[2] = p->flags; /* int */ - uarg[3] = (intptr_t) p->data; /* caddr_t */ + uarg[3] = (intptr_t) p->data; /* void * */ *n_args = 4; break; } @@ -200,10 +200,10 @@ systrace_args(int sysnum, void *params, uint64_t *uarg case 29: { struct freebsd32_recvfrom_args *p = params; iarg[0] = p->s; /* int */ - uarg[1] = p->buf; /* uint32_t */ + uarg[1] = (intptr_t) p->buf; /* void * */ uarg[2] = p->len; /* uint32_t */ iarg[3] = p->flags; /* int */ - uarg[4] = p->from; /* uint32_t */ + uarg[4] = (intptr_t) p->from; /* struct sockaddr * */ uarg[5] = p->fromlenaddr; /* uint32_t */ *n_args = 6; break; @@ -212,7 +212,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg case 30: { struct accept_args *p = params; iarg[0] = p->s; /* int */ - uarg[1] = (intptr_t) p->name; /* caddr_t */ + uarg[1] = (intptr_t) p->name; /* struct sockaddr * */ uarg[2] = (intptr_t) p->anamelen; /* int * */ *n_args = 3; break; @@ -221,7 +221,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg case 31: { struct getpeername_args *p = params; iarg[0] = p->fdes; /* int */ - uarg[1] = (intptr_t) p->asa; /* caddr_t */ + uarg[1] = (intptr_t) p->asa; /* struct sockaddr * */ uarg[2] = (intptr_t) p->alen; /* int * */ *n_args = 3; break; @@ -230,7 +230,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg case 32: { struct getsockname_args *p = params; iarg[0] = p->fdes; /* int */ - uarg[1] = (intptr_t) p->asa; /* caddr_t */ + uarg[1] = (intptr_t) p->asa; /* struct sockaddr * */ uarg[2] = (intptr_t) p->alen; /* int * */ *n_args = 3; break; @@ -292,7 +292,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg /* profil */ case 44: { struct profil_args *p = params; - uarg[0] = (intptr_t) p->samples; /* caddr_t */ + uarg[0] = (intptr_t) p->samples; /* char * */ uarg[1] = p->size; /* size_t */ uarg[2] = p->offset; /* size_t */ uarg[3] = p->scale; /* u_int */ @@ -585,7 +585,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg case 98: { struct connect_args *p = params; iarg[0] = p->s; /* int */ - uarg[1] = (intptr_t) p->name; /* caddr_t */ + uarg[1] = (intptr_t) p->name; /* const struct sockaddr * */ iarg[2] = p->namelen; /* int */ *n_args = 3; break; @@ -602,7 +602,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg case 104: { struct bind_args *p = params; iarg[0] = p->s; /* int */ - uarg[1] = (intptr_t) p->name; /* caddr_t */ + uarg[1] = (intptr_t) p->name; /* const struct sockaddr * */ iarg[2] = p->namelen; /* int */ *n_args = 3; break; @@ -613,7 +613,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg iarg[0] = p->s; /* int */ iarg[1] = p->level; /* int */ iarg[2] = p->name; /* int */ - uarg[3] = (intptr_t) p->val; /* caddr_t */ + uarg[3] = (intptr_t) p->val; /* const void * */ iarg[4] = p->valsize; /* int */ *n_args = 5; break; @@ -648,7 +648,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg iarg[0] = p->s; /* int */ iarg[1] = p->level; /* int */ iarg[2] = p->name; /* int */ - uarg[3] = (intptr_t) p->val; /* caddr_t */ + uarg[3] = (intptr_t) p->val; /* void * */ uarg[4] = (intptr_t) p->avalsize; /* int * */ *n_args = 5; break; @@ -740,10 +740,10 @@ systrace_args(int sysnum, void *params, uint64_t *uarg case 133: { struct sendto_args *p = params; iarg[0] = p->s; /* int */ - uarg[1] = (intptr_t) p->buf; /* caddr_t */ + uarg[1] = (intptr_t) p->buf; /* const void * */ uarg[2] = p->len; /* size_t */ iarg[3] = p->flags; /* int */ - uarg[4] = (intptr_t) p->to; /* caddr_t */ + uarg[4] = (intptr_t) p->to; /* const struct sockaddr * */ iarg[5] = p->tolen; /* int */ *n_args = 6; break; @@ -808,7 +808,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg uarg[0] = (intptr_t) p->path; /* const char * */ iarg[1] = p->cmd; /* int */ iarg[2] = p->uid; /* int */ - uarg[3] = (intptr_t) p->arg; /* caddr_t */ + uarg[3] = (intptr_t) p->arg; /* void * */ *n_args = 4; break; } @@ -2312,9 +2312,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg case 472: { struct sctp_generic_sendmsg_args *p = params; iarg[0] = p->sd; /* int */ - uarg[1] = (intptr_t) p->msg; /* caddr_t */ + uarg[1] = (intptr_t) p->msg; /* void * */ iarg[2] = p->mlen; /* int */ - uarg[3] = (intptr_t) p->to; /* caddr_t */ + uarg[3] = (intptr_t) p->to; /* struct sockaddr * */ iarg[4] = p->tolen; /* __socklen_t */ uarg[5] = (intptr_t) p->sinfo; /* struct sctp_sndrcvinfo * */ iarg[6] = p->flags; /* int */ @@ -2327,7 +2327,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg iarg[0] = p->sd; /* int */ uarg[1] = (intptr_t) p->iov; /* struct iovec * */ iarg[2] = p->iovlen; /* int */ - uarg[3] = (intptr_t) p->to; /* caddr_t */ + uarg[3] = (intptr_t) p->to; /* struct sockaddr * */ iarg[4] = p->tolen; /* __socklen_t */ uarg[5] = (intptr_t) p->sinfo; /* struct sctp_sndrcvinfo * */ iarg[6] = p->flags; /* int */ @@ -2375,7 +2375,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg /* freebsd32_mmap */ case 477: { struct freebsd32_mmap_args *p = params; - uarg[0] = (intptr_t) p->addr; /* caddr_t */ + uarg[0] = (intptr_t) p->addr; /* void * */ uarg[1] = p->len; /* size_t */ iarg[2] = p->prot; /* int */ iarg[3] = p->flags; /* int */ @@ -2443,7 +2443,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg /* freebsd32_mmap */ case 477: { struct freebsd32_mmap_args *p = params; - uarg[0] = (intptr_t) p->addr; /* caddr_t */ + uarg[0] = (intptr_t) p->addr; /* void * */ uarg[1] = p->len; /* size_t */ iarg[2] = p->prot; /* int */ iarg[3] = p->flags; /* int */ @@ -3021,7 +3021,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg struct bindat_args *p = params; iarg[0] = p->fd; /* int */ iarg[1] = p->s; /* int */ - uarg[2] = (intptr_t) p->name; /* caddr_t */ + uarg[2] = (intptr_t) p->name; /* const struct sockaddr * */ iarg[3] = p->namelen; /* int */ *n_args = 4; break; @@ -3031,7 +3031,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg struct connectat_args *p = params; iarg[0] = p->fd; /* int */ iarg[1] = p->s; /* int */ - uarg[2] = (intptr_t) p->name; /* caddr_t */ + uarg[2] = (intptr_t) p->name; /* const struct sockaddr * */ iarg[3] = p->namelen; /* int */ *n_args = 4; break; @@ -3462,7 +3462,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "int"; break; case 3: - p = "caddr_t"; + p = "userland void *"; break; default: break; @@ -3555,7 +3555,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "int"; break; case 1: - p = "uint32_t"; + p = "userland void *"; break; case 2: p = "uint32_t"; @@ -3564,7 +3564,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "int"; break; case 4: - p = "uint32_t"; + p = "userland struct sockaddr *"; break; case 5: p = "uint32_t"; @@ -3580,7 +3580,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "int"; break; case 1: - p = "caddr_t"; + p = "userland struct sockaddr *"; break; case 2: p = "userland int *"; @@ -3596,7 +3596,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "int"; break; case 1: - p = "caddr_t"; + p = "userland struct sockaddr *"; break; case 2: p = "userland int *"; @@ -3612,7 +3612,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "int"; break; case 1: - p = "caddr_t"; + p = "userland struct sockaddr *"; break; case 2: p = "userland int *"; @@ -3696,7 +3696,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d case 44: switch(ndx) { case 0: - p = "caddr_t"; + p = "userland char *"; break; case 1: p = "size_t"; @@ -4164,7 +4164,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "int"; break; case 1: - p = "caddr_t"; + p = "userland const struct sockaddr *"; break; case 2: p = "int"; @@ -4193,7 +4193,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "int"; break; case 1: - p = "caddr_t"; + p = "userland const struct sockaddr *"; break; case 2: p = "int"; @@ -4215,7 +4215,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "int"; break; case 3: - p = "caddr_t"; + p = "userland const void *"; break; case 4: p = "int"; @@ -4276,7 +4276,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "int"; break; case 3: - p = "caddr_t"; + p = "userland void *"; break; case 4: p = "userland int *"; @@ -4431,7 +4431,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "int"; break; case 1: - p = "caddr_t"; + p = "userland const void *"; break; case 2: p = "size_t"; @@ -4440,7 +4440,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "int"; break; case 4: - p = "caddr_t"; + p = "userland const struct sockaddr *"; break; case 5: p = "int"; @@ -4546,7 +4546,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "int"; break; case 3: - p = "caddr_t"; + p = "userland void *"; break; default: break; @@ -6996,13 +6996,13 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "int"; break; case 1: - p = "caddr_t"; + p = "userland void *"; break; case 2: p = "int"; break; case 3: - p = "caddr_t"; + p = "userland struct sockaddr *"; break; case 4: p = "__socklen_t"; @@ -7030,7 +7030,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "int"; break; case 3: - p = "caddr_t"; + p = "userland struct sockaddr *"; break; case 4: p = "__socklen_t"; @@ -7128,7 +7128,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d case 477: switch(ndx) { case 0: - p = "caddr_t"; + p = "userland void *"; break; case 1: p = "size_t"; @@ -7264,7 +7264,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d case 477: switch(ndx) { case 0: - p = "caddr_t"; + p = "userland void *"; break; case 1: p = "size_t"; @@ -8323,7 +8323,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "int"; break; case 2: - p = "caddr_t"; + p = "userland const struct sockaddr *"; break; case 3: p = "int"; @@ -8342,7 +8342,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "int"; break; case 2: - p = "caddr_t"; + p = "userland const struct sockaddr *"; break; case 3: p = "int"; Modified: head/sys/kern/systrace_args.c ============================================================================== --- head/sys/kern/systrace_args.c Tue Nov 6 18:46:38 2018 (r340199) +++ head/sys/kern/systrace_args.c Tue Nov 6 18:47:29 2018 (r340200) @@ -136,7 +136,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg uarg[0] = (intptr_t) p->type; /* const char * */ uarg[1] = (intptr_t) p->path; /* const char * */ iarg[2] = p->flags; /* int */ - uarg[3] = (intptr_t) p->data; /* caddr_t */ + uarg[3] = (intptr_t) p->data; /* void * */ *n_args = 4; break; } @@ -197,7 +197,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg case 29: { struct recvfrom_args *p = params; iarg[0] = p->s; /* int */ - uarg[1] = (intptr_t) p->buf; /* caddr_t */ + uarg[1] = (intptr_t) p->buf; /* void * */ uarg[2] = p->len; /* size_t */ iarg[3] = p->flags; /* int */ uarg[4] = (intptr_t) p->from; /* struct sockaddr * */ @@ -289,7 +289,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg /* profil */ case 44: { struct profil_args *p = params; - uarg[0] = (intptr_t) p->samples; /* caddr_t */ + uarg[0] = (intptr_t) p->samples; /* char * */ uarg[1] = p->size; /* size_t */ uarg[2] = p->offset; /* size_t */ uarg[3] = p->scale; /* u_int */ @@ -346,7 +346,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg struct ioctl_args *p = params; iarg[0] = p->fd; /* int */ uarg[1] = p->com; /* u_long */ - uarg[2] = (intptr_t) p->data; /* caddr_t */ + uarg[2] = (intptr_t) p->data; /* char * */ *n_args = 3; break; } @@ -582,7 +582,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg case 98: { struct connect_args *p = params; iarg[0] = p->s; /* int */ - uarg[1] = (intptr_t) p->name; /* caddr_t */ + uarg[1] = (intptr_t) p->name; /* const struct sockaddr * */ iarg[2] = p->namelen; /* int */ *n_args = 3; break; @@ -599,7 +599,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg case 104: { struct bind_args *p = params; iarg[0] = p->s; /* int */ - uarg[1] = (intptr_t) p->name; /* caddr_t */ + uarg[1] = (intptr_t) p->name; /* const struct sockaddr * */ iarg[2] = p->namelen; /* int */ *n_args = 3; break; @@ -610,7 +610,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg iarg[0] = p->s; /* int */ iarg[1] = p->level; /* int */ iarg[2] = p->name; /* int */ - uarg[3] = (intptr_t) p->val; /* caddr_t */ + uarg[3] = (intptr_t) p->val; /* const void * */ iarg[4] = p->valsize; /* int */ *n_args = 5; break; @@ -645,7 +645,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg iarg[0] = p->s; /* int */ iarg[1] = p->level; /* int */ iarg[2] = p->name; /* int */ - uarg[3] = (intptr_t) p->val; /* caddr_t */ + uarg[3] = (intptr_t) p->val; /* void * */ uarg[4] = (intptr_t) p->avalsize; /* int * */ *n_args = 5; break; @@ -737,10 +737,10 @@ systrace_args(int sysnum, void *params, uint64_t *uarg case 133: { struct sendto_args *p = params; iarg[0] = p->s; /* int */ - uarg[1] = (intptr_t) p->buf; /* caddr_t */ + uarg[1] = (intptr_t) p->buf; /* const void * */ uarg[2] = p->len; /* size_t */ iarg[3] = p->flags; /* int */ - uarg[4] = (intptr_t) p->to; /* caddr_t */ + uarg[4] = (intptr_t) p->to; /* const struct sockaddr * */ iarg[5] = p->tolen; /* int */ *n_args = 6; break; @@ -805,7 +805,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg uarg[0] = (intptr_t) p->path; /* const char * */ iarg[1] = p->cmd; /* int */ iarg[2] = p->uid; /* int */ - uarg[3] = (intptr_t) p->arg; /* caddr_t */ + uarg[3] = (intptr_t) p->arg; /* void * */ *n_args = 4; break; } @@ -823,7 +823,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg case 155: { struct nfssvc_args *p = params; iarg[0] = p->flag; /* int */ - uarg[1] = (intptr_t) p->argp; /* caddr_t */ + uarg[1] = (intptr_t) p->argp; /* void * */ *n_args = 2; break; } @@ -2474,9 +2474,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg case 472: { struct sctp_generic_sendmsg_args *p = params; iarg[0] = p->sd; /* int */ - uarg[1] = (intptr_t) p->msg; /* caddr_t */ + uarg[1] = (intptr_t) p->msg; /* void * */ iarg[2] = p->mlen; /* int */ - uarg[3] = (intptr_t) p->to; /* caddr_t */ + uarg[3] = (intptr_t) p->to; /* struct sockaddr * */ iarg[4] = p->tolen; /* __socklen_t */ uarg[5] = (intptr_t) p->sinfo; /* struct sctp_sndrcvinfo * */ iarg[6] = p->flags; /* int */ @@ -2489,7 +2489,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg iarg[0] = p->sd; /* int */ uarg[1] = (intptr_t) p->iov; /* struct iovec * */ iarg[2] = p->iovlen; /* int */ - uarg[3] = (intptr_t) p->to; /* caddr_t */ + uarg[3] = (intptr_t) p->to; /* struct sockaddr * */ iarg[4] = p->tolen; /* __socklen_t */ uarg[5] = (intptr_t) p->sinfo; /* struct sctp_sndrcvinfo * */ iarg[6] = p->flags; /* int */ @@ -2532,7 +2532,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg /* mmap */ case 477: { struct mmap_args *p = params; - uarg[0] = (intptr_t) p->addr; /* caddr_t */ + uarg[0] = (intptr_t) p->addr; /* void * */ uarg[1] = p->len; /* size_t */ iarg[2] = p->prot; /* int */ iarg[3] = p->flags; /* int */ @@ -3047,7 +3047,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg struct bindat_args *p = params; iarg[0] = p->fd; /* int */ iarg[1] = p->s; /* int */ - uarg[2] = (intptr_t) p->name; /* caddr_t */ + uarg[2] = (intptr_t) p->name; /* const struct sockaddr * */ iarg[3] = p->namelen; /* int */ *n_args = 4; break; @@ -3057,7 +3057,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg struct connectat_args *p = params; iarg[0] = p->fd; /* int */ iarg[1] = p->s; /* int */ - uarg[2] = (intptr_t) p->name; /* caddr_t */ + uarg[2] = (intptr_t) p->name; /* const struct sockaddr * */ iarg[3] = p->namelen; /* int */ *n_args = 4; break; @@ -3467,7 +3467,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "int"; break; case 3: - p = "caddr_t"; + p = "userland void *"; break; default: break; @@ -3560,7 +3560,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "int"; break; case 1: - p = "caddr_t"; + p = "userland void *"; break; case 2: p = "size_t"; @@ -3701,7 +3701,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d case 44: switch(ndx) { case 0: - p = "caddr_t"; + p = "userland char *"; break; case 1: p = "size_t"; @@ -3794,7 +3794,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "u_long"; break; case 2: - p = "caddr_t"; + p = "userland char *"; break; default: break; @@ -4169,7 +4169,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "int"; break; case 1: - p = "caddr_t"; + p = "userland const struct sockaddr *"; break; case 2: p = "int"; @@ -4198,7 +4198,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "int"; break; case 1: - p = "caddr_t"; + p = "userland const struct sockaddr *"; break; case 2: p = "int"; @@ -4220,7 +4220,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "int"; break; case 3: - p = "caddr_t"; + p = "userland const void *"; break; case 4: p = "int"; @@ -4281,7 +4281,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "int"; break; case 3: - p = "caddr_t"; + p = "userland void *"; break; case 4: p = "userland int *"; @@ -4436,7 +4436,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "int"; break; case 1: - p = "caddr_t"; + p = "userland const void *"; break; case 2: p = "size_t"; @@ -4445,7 +4445,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "int"; break; case 4: - p = "caddr_t"; + p = "userland const struct sockaddr *"; break; case 5: p = "int"; @@ -4551,7 +4551,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "int"; break; case 3: - p = "caddr_t"; + p = "userland void *"; break; default: break; @@ -4583,7 +4583,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "int"; break; case 1: - p = "caddr_t"; + p = "userland void *"; break; default: break; @@ -7276,13 +7276,13 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "int"; break; case 1: - p = "caddr_t"; + p = "userland void *"; break; case 2: p = "int"; break; case 3: - p = "caddr_t"; + p = "userland struct sockaddr *"; break; case 4: p = "__socklen_t"; @@ -7310,7 +7310,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "int"; break; case 3: - p = "caddr_t"; + p = "userland struct sockaddr *"; break; case 4: p = "__socklen_t"; @@ -7395,7 +7395,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d case 477: switch(ndx) { case 0: - p = "caddr_t"; + p = "userland void *"; break; case 1: p = "size_t"; @@ -8312,7 +8312,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "int"; break; case 2: - p = "caddr_t"; + p = "userland const struct sockaddr *"; break; case 3: p = "int"; @@ -8331,7 +8331,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "int"; break; case 2: - p = "caddr_t"; + p = "userland const struct sockaddr *"; break; case 3: p = "int"; Modified: head/sys/sys/socketvar.h ============================================================================== --- head/sys/sys/socketvar.h Tue Nov 6 18:46:38 2018 (r340199) +++ head/sys/sys/socketvar.h Tue Nov 6 18:47:29 2018 (r340200) @@ -379,7 +379,8 @@ struct uio; /* * From uipc_socket and friends */ -int getsockaddr(struct sockaddr **namp, caddr_t uaddr, size_t len); +int getsockaddr(struct sockaddr **namp, const struct sockaddr *uaddr, + size_t len); int getsock_cap(struct thread *td, int fd, cap_rights_t *rightsp, struct file **fpp, u_int *fflagp, struct filecaps *havecaps); void soabort(struct socket *so); Modified: head/sys/sys/sysproto.h ============================================================================== --- head/sys/sys/sysproto.h Tue Nov 6 18:46:38 2018 (r340199) +++ head/sys/sys/sysproto.h Tue Nov 6 18:47:29 2018 (r340200) @@ -99,7 +99,7 @@ struct mount_args { char type_l_[PADL_(const char *)]; const char * type; char type_r_[PADR_(const char *)]; char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; - char data_l_[PADL_(caddr_t)]; caddr_t data; char data_r_[PADR_(caddr_t)]; + char data_l_[PADL_(void *)]; void * data; char data_r_[PADR_(void *)]; }; struct unmount_args { char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; @@ -132,7 +132,7 @@ struct sendmsg_args { }; struct recvfrom_args { char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; - char buf_l_[PADL_(caddr_t)]; caddr_t buf; char buf_r_[PADR_(caddr_t)]; + char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)]; 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 from_l_[PADL_(struct sockaddr *)]; struct sockaddr * from; char from_r_[PADR_(struct sockaddr *)]; @@ -185,7 +185,7 @@ struct getegid_args { register_t dummy; }; struct profil_args { - char samples_l_[PADL_(caddr_t)]; caddr_t samples; char samples_r_[PADR_(caddr_t)]; + char samples_l_[PADL_(char *)]; char * samples; char samples_r_[PADR_(char *)]; char size_l_[PADL_(size_t)]; size_t size; char size_r_[PADR_(size_t)]; char offset_l_[PADL_(size_t)]; size_t offset; char offset_r_[PADR_(size_t)]; char scale_l_[PADL_(u_int)]; u_int scale; char scale_r_[PADR_(u_int)]; @@ -219,7 +219,7 @@ struct sigaltstack_args { struct ioctl_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char com_l_[PADL_(u_long)]; u_long com; char com_r_[PADR_(u_long)]; - char data_l_[PADL_(caddr_t)]; caddr_t data; char data_r_[PADR_(caddr_t)]; + char data_l_[PADL_(char *)]; char * data; char data_r_[PADR_(char *)]; }; struct reboot_args { char opt_l_[PADL_(int)]; int opt; char opt_r_[PADR_(int)]; @@ -347,7 +347,7 @@ struct socket_args { }; struct connect_args { char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; - char name_l_[PADL_(caddr_t)]; caddr_t name; char name_r_[PADR_(caddr_t)]; + 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)]; }; struct getpriority_args { @@ -356,14 +356,14 @@ struct getpriority_args { }; struct bind_args { char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; - char name_l_[PADL_(caddr_t)]; caddr_t name; char name_r_[PADR_(caddr_t)]; + 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)]; }; 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_(caddr_t)]; caddr_t val; char val_r_[PADR_(caddr_t)]; + 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)]; }; struct listen_args { @@ -382,7 +382,7 @@ struct getsockopt_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_(caddr_t)]; caddr_t val; char val_r_[PADR_(caddr_t)]; + char val_l_[PADL_(void *)]; void * val; char val_r_[PADR_(void *)]; char avalsize_l_[PADL_(int *)]; int * avalsize; char avalsize_r_[PADR_(int *)]; }; struct readv_args { @@ -430,10 +430,10 @@ struct mkfifo_args { }; struct sendto_args { char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; - char buf_l_[PADL_(caddr_t)]; caddr_t buf; char buf_r_[PADR_(caddr_t)]; + char buf_l_[PADL_(const void *)]; const void * buf; char buf_r_[PADR_(const void *)]; 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_(caddr_t)]; caddr_t to; char to_r_[PADR_(caddr_t)]; + 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)]; }; struct shutdown_args { @@ -471,7 +471,7 @@ struct quotactl_args { char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; char uid_l_[PADL_(int)]; int uid; char uid_r_[PADR_(int)]; - char arg_l_[PADL_(caddr_t)]; caddr_t arg; char arg_r_[PADR_(caddr_t)]; + char arg_l_[PADL_(void *)]; void * arg; char arg_r_[PADR_(void *)]; }; struct oquota_args { register_t dummy; @@ -484,7 +484,7 @@ struct nlm_syscall_args { }; struct nfssvc_args { char flag_l_[PADL_(int)]; int flag; char flag_r_[PADR_(int)]; - char argp_l_[PADL_(caddr_t)]; caddr_t argp; char argp_r_[PADR_(caddr_t)]; + char argp_l_[PADL_(void *)]; void * argp; char argp_r_[PADR_(void *)]; }; struct lgetfh_args { char fname_l_[PADL_(const char *)]; const char * fname; char fname_r_[PADR_(const char *)]; @@ -1318,9 +1318,9 @@ struct sctp_peeloff_args { }; struct sctp_generic_sendmsg_args { char sd_l_[PADL_(int)]; int sd; char sd_r_[PADR_(int)]; - char msg_l_[PADL_(caddr_t)]; caddr_t msg; char msg_r_[PADR_(caddr_t)]; + char msg_l_[PADL_(void *)]; void * msg; char msg_r_[PADR_(void *)]; char mlen_l_[PADL_(int)]; int mlen; char mlen_r_[PADR_(int)]; - char to_l_[PADL_(caddr_t)]; caddr_t to; char to_r_[PADR_(caddr_t)]; + char to_l_[PADL_(struct sockaddr *)]; struct sockaddr * to; char to_r_[PADR_(struct sockaddr *)]; char tolen_l_[PADL_(__socklen_t)]; __socklen_t tolen; char tolen_r_[PADR_(__socklen_t)]; char sinfo_l_[PADL_(struct sctp_sndrcvinfo *)]; struct sctp_sndrcvinfo * sinfo; char sinfo_r_[PADR_(struct sctp_sndrcvinfo *)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; @@ -1329,7 +1329,7 @@ struct sctp_generic_sendmsg_iov_args { char sd_l_[PADL_(int)]; int sd; char sd_r_[PADR_(int)]; char iov_l_[PADL_(struct iovec *)]; struct iovec * iov; char iov_r_[PADR_(struct iovec *)]; char iovlen_l_[PADL_(int)]; int iovlen; char iovlen_r_[PADR_(int)]; - char to_l_[PADL_(caddr_t)]; caddr_t to; char to_r_[PADR_(caddr_t)]; + char to_l_[PADL_(struct sockaddr *)]; struct sockaddr * to; char to_r_[PADR_(struct sockaddr *)]; char tolen_l_[PADL_(__socklen_t)]; __socklen_t tolen; char tolen_r_[PADR_(__socklen_t)]; char sinfo_l_[PADL_(struct sctp_sndrcvinfo *)]; struct sctp_sndrcvinfo * sinfo; char sinfo_r_[PADR_(struct sctp_sndrcvinfo *)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; @@ -1356,7 +1356,7 @@ struct pwrite_args { char offset_l_[PADL_(off_t)]; off_t offset; char offset_r_[PADR_(off_t)]; }; struct mmap_args { - char addr_l_[PADL_(caddr_t)]; caddr_t addr; char addr_r_[PADR_(caddr_t)]; + char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; char prot_l_[PADL_(int)]; int prot; char prot_r_[PADR_(int)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; @@ -1645,13 +1645,13 @@ struct cap_fcntls_get_args { 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_(caddr_t)]; caddr_t name; char name_r_[PADR_(caddr_t)]; + 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)]; }; 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_(caddr_t)]; caddr_t name; char name_r_[PADR_(caddr_t)]; + 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)]; }; struct chflagsat_args { @@ -2207,13 +2207,13 @@ struct sethostname_args { }; struct osend_args { char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; - char buf_l_[PADL_(caddr_t)]; caddr_t buf; char buf_r_[PADR_(caddr_t)]; + char buf_l_[PADL_(const void *)]; const void * buf; char buf_r_[PADR_(const void *)]; char len_l_[PADL_(int)]; int len; char len_r_[PADR_(int)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; }; struct orecv_args { char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; - char buf_l_[PADL_(caddr_t)]; caddr_t buf; char buf_r_[PADR_(caddr_t)]; + char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)]; char len_l_[PADL_(int)]; int len; char len_r_[PADR_(int)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; }; @@ -2245,7 +2245,7 @@ struct orecvmsg_args { }; struct osendmsg_args { char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; - char msg_l_[PADL_(caddr_t)]; caddr_t msg; char msg_r_[PADR_(caddr_t)]; + char msg_l_[PADL_(const void *)]; const void * msg; char msg_r_[PADR_(const void *)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; }; struct otruncate_args { @@ -2258,7 +2258,7 @@ struct oftruncate_args { }; struct ogetpeername_args { char fdes_l_[PADL_(int)]; int fdes; char fdes_r_[PADR_(int)]; - char asa_l_[PADL_(caddr_t)]; caddr_t asa; char asa_r_[PADR_(caddr_t)]; + 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 *)]; }; struct osethostid_args { @@ -2401,7 +2401,7 @@ struct freebsd6_pwrite_args { char offset_l_[PADL_(off_t)]; off_t offset; char offset_r_[PADR_(off_t)]; }; struct freebsd6_mmap_args { - char addr_l_[PADL_(caddr_t)]; caddr_t addr; char addr_r_[PADR_(caddr_t)]; + char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; char prot_l_[PADL_(int)]; int prot; char prot_r_[PADR_(int)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];