From nobody Wed Nov 17 20:22:12 2021 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 A2B38185478B; Wed, 17 Nov 2021 20:22:14 +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 4HvZ915MTLz4qnM; Wed, 17 Nov 2021 20:22:13 +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 67A6E27841; Wed, 17 Nov 2021 20:22:12 +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 1AHKMCQ7059409; Wed, 17 Nov 2021 20:22:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMCPH059408; Wed, 17 Nov 2021 20:22:12 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:12 GMT Message-Id: <202111172022.1AHKMCPH059408@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: a944d28d0edf - main - freebsd32: sprinkle in missing consts 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a944d28d0edf7ceb1bef4d789dfa4e8e18331658 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=a944d28d0edf7ceb1bef4d789dfa4e8e18331658 commit a944d28d0edf7ceb1bef4d789dfa4e8e18331658 Author: Brooks Davis AuthorDate: 2021-11-17 20:12:22 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:22 +0000 freebsd32: sprinkle in missing consts A number of syscalls have missing consts on their arguments relative to the default syscalls.master. Also, use timespec32 and timeval32 where appropriate. No functional change. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_misc.c | 2 +- sys/compat/freebsd32/freebsd32_proto.h | 34 +++++----- sys/compat/freebsd32/freebsd32_systrace_args.c | 88 +++++++++++++------------- sys/compat/freebsd32/syscalls.master | 49 +++++++------- 4 files changed, 87 insertions(+), 86 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 4375d88fdb93..12d125132883 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -1227,7 +1227,7 @@ freebsd32_copyiniov(struct iovec32 *iovp32, u_int iovcnt, struct iovec **iovp, } static int -freebsd32_copyinmsghdr(struct msghdr32 *msg32, struct msghdr *msg) +freebsd32_copyinmsghdr(const struct msghdr32 *msg32, struct msghdr *msg) { struct msghdr32 m32; int error; diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 7701d6ac0b26..0882731d656d 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -56,7 +56,7 @@ struct freebsd32_recvmsg_args { }; struct freebsd32_sendmsg_args { char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; - char msg_l_[PADL_(struct msghdr32 *)]; struct msghdr32 * msg; char msg_r_[PADR_(struct msghdr32 *)]; + char msg_l_[PADL_(const struct msghdr32 *)]; const struct msghdr32 * msg; char msg_r_[PADR_(const struct msghdr32 *)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; }; struct freebsd32_recvfrom_args { @@ -74,7 +74,7 @@ struct ofreebsd32_sigpending_args { register_t dummy; }; struct freebsd32_sigaltstack_args { - char ss_l_[PADL_(struct sigaltstack32 *)]; struct sigaltstack32 * ss; char ss_r_[PADR_(struct sigaltstack32 *)]; + char ss_l_[PADL_(const struct sigaltstack32 *)]; const struct sigaltstack32 * ss; char ss_r_[PADR_(const struct sigaltstack32 *)]; char oss_l_[PADL_(struct sigaltstack32 *)]; struct sigaltstack32 * oss; char oss_r_[PADR_(struct sigaltstack32 *)]; }; struct freebsd32_ioctl_args { @@ -88,13 +88,13 @@ struct freebsd32_execve_args { char envv_l_[PADL_(uint32_t *)]; uint32_t * envv; char envv_r_[PADR_(uint32_t *)]; }; struct freebsd32_mprotect_args { - char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; + char addr_l_[PADL_(const void *)]; const void * addr; char addr_r_[PADR_(const 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)]; }; struct freebsd32_setitimer_args { char which_l_[PADL_(u_int)]; u_int which; char which_r_[PADR_(u_int)]; - char itv_l_[PADL_(struct itimerval32 *)]; struct itimerval32 * itv; char itv_r_[PADR_(struct itimerval32 *)]; + char itv_l_[PADL_(const struct itimerval32 *)]; const struct itimerval32 * itv; char itv_r_[PADR_(const struct itimerval32 *)]; char oitv_l_[PADL_(struct itimerval32 *)]; struct itimerval32 * oitv; char oitv_r_[PADR_(struct itimerval32 *)]; }; struct freebsd32_getitimer_args { @@ -132,15 +132,15 @@ struct freebsd32_writev_args { char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)]; }; struct freebsd32_settimeofday_args { - char tv_l_[PADL_(struct timeval32 *)]; struct timeval32 * tv; char tv_r_[PADR_(struct timeval32 *)]; - char tzp_l_[PADL_(struct timezone *)]; struct timezone * tzp; char tzp_r_[PADR_(struct timezone *)]; + char tv_l_[PADL_(const struct timeval32 *)]; const struct timeval32 * tv; char tv_r_[PADR_(const struct timeval32 *)]; + char tzp_l_[PADL_(const struct timezone *)]; const struct timezone * tzp; char tzp_r_[PADR_(const struct timezone *)]; }; struct freebsd32_utimes_args { char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char tptr_l_[PADL_(struct timeval32 *)]; struct timeval32 * tptr; char tptr_r_[PADR_(struct timeval32 *)]; + char tptr_l_[PADL_(const struct timeval32 *)]; const struct timeval32 * tptr; char tptr_r_[PADR_(const struct timeval32 *)]; }; struct freebsd32_adjtime_args { - char delta_l_[PADL_(struct timeval32 *)]; struct timeval32 * delta; char delta_r_[PADR_(struct timeval32 *)]; + char delta_l_[PADL_(const struct timeval32 *)]; const struct timeval32 * delta; char delta_r_[PADR_(const struct timeval32 *)]; char olddelta_l_[PADL_(struct timeval32 *)]; struct timeval32 * olddelta; char olddelta_r_[PADR_(struct timeval32 *)]; }; struct freebsd32_sysarch_args { @@ -181,11 +181,11 @@ struct freebsd32___sysctl_args { }; struct freebsd32_futimes_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char tptr_l_[PADL_(struct timeval32 *)]; struct timeval32 * tptr; char tptr_r_[PADR_(struct timeval32 *)]; + char tptr_l_[PADL_(const struct timeval32 *)]; const struct timeval32 * tptr; char tptr_r_[PADR_(const struct timeval32 *)]; }; struct freebsd32_msgsnd_args { char msqid_l_[PADL_(int)]; int msqid; char msqid_r_[PADR_(int)]; - char msgp_l_[PADL_(void *)]; void * msgp; char msgp_r_[PADR_(void *)]; + char msgp_l_[PADL_(const void *)]; const void * msgp; char msgp_r_[PADR_(const void *)]; char msgsz_l_[PADL_(size_t)]; size_t msgsz; char msgsz_r_[PADR_(size_t)]; char msgflg_l_[PADL_(int)]; int msgflg; char msgflg_r_[PADR_(int)]; }; @@ -253,7 +253,7 @@ struct freebsd32_lio_listio_args { }; struct freebsd32_lutimes_args { char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char tptr_l_[PADL_(struct timeval32 *)]; struct timeval32 * tptr; char tptr_r_[PADR_(struct timeval32 *)]; + char tptr_l_[PADL_(const struct timeval32 *)]; const struct timeval32 * tptr; char tptr_r_[PADR_(const struct timeval32 *)]; }; struct freebsd32_preadv_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; @@ -298,7 +298,7 @@ struct freebsd32_jail_args { struct freebsd32_sigtimedwait_args { char set_l_[PADL_(const sigset_t *)]; const sigset_t * set; char set_r_[PADR_(const sigset_t *)]; char info_l_[PADL_(struct siginfo32 *)]; struct siginfo32 * info; char info_r_[PADR_(struct siginfo32 *)]; - char timeout_l_[PADL_(const struct timespec *)]; const struct timespec * timeout; char timeout_r_[PADR_(const struct timespec *)]; + char timeout_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * timeout; char timeout_r_[PADR_(const struct timespec32 *)]; }; struct freebsd32_sigwaitinfo_args { char set_l_[PADL_(const sigset_t *)]; const sigset_t * set; char set_r_[PADR_(const sigset_t *)]; @@ -336,7 +336,7 @@ struct freebsd32_ksem_open_args { }; struct freebsd32_sigaction_args { char sig_l_[PADL_(int)]; int sig; char sig_r_[PADR_(int)]; - char act_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * act; char act_r_[PADR_(struct sigaction32 *)]; + char act_l_[PADL_(const struct sigaction32 *)]; const struct sigaction32 * act; char act_r_[PADR_(const struct sigaction32 *)]; char oact_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * oact; char oact_r_[PADR_(struct sigaction32 *)]; }; struct freebsd32_sigreturn_args { @@ -542,7 +542,7 @@ struct freebsd32_fexecve_args { struct freebsd32_futimesat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char times_l_[PADL_(struct timeval *)]; struct timeval * times; char times_r_[PADR_(struct timeval *)]; + char times_l_[PADL_(const struct timeval32 *)]; const struct timeval32 * times; char times_r_[PADR_(const struct timeval32 *)]; }; struct freebsd32_jail_get_args { char iovp_l_[PADL_(struct iovec32 *)]; struct iovec32 * iovp; char iovp_r_[PADR_(struct iovec32 *)]; @@ -671,12 +671,12 @@ struct freebsd32_ppoll_args { }; struct freebsd32_futimens_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char times_l_[PADL_(struct timespec *)]; struct timespec * times; char times_r_[PADR_(struct timespec *)]; + char times_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * times; char times_r_[PADR_(const struct timespec32 *)]; }; struct freebsd32_utimensat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char times_l_[PADL_(struct timespec *)]; struct timespec * times; char times_r_[PADR_(struct timespec *)]; + char times_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * times; char times_r_[PADR_(const struct timespec32 *)]; char flag_l_[PADL_(int)]; int flag; char flag_r_[PADR_(int)]; }; struct freebsd32_fstat_args { @@ -1040,7 +1040,7 @@ struct freebsd4_freebsd32_sendfile_args { }; struct freebsd4_freebsd32_sigaction_args { char sig_l_[PADL_(int)]; int sig; char sig_r_[PADR_(int)]; - char act_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * act; char act_r_[PADR_(struct sigaction32 *)]; + char act_l_[PADL_(const struct sigaction32 *)]; const struct sigaction32 * act; char act_r_[PADR_(const struct sigaction32 *)]; char oact_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * oact; char oact_r_[PADR_(struct sigaction32 *)]; }; struct freebsd4_freebsd32_sigreturn_args { diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index bc4c7ce4f36f..4fce6797062c 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -191,7 +191,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 28: { struct freebsd32_sendmsg_args *p = params; iarg[0] = p->s; /* int */ - uarg[1] = (intptr_t)p->msg; /* struct msghdr32 * */ + uarg[1] = (intptr_t)p->msg; /* const struct msghdr32 * */ iarg[2] = p->flags; /* int */ *n_args = 3; break; @@ -339,7 +339,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* freebsd32_sigaltstack */ case 53: { struct freebsd32_sigaltstack_args *p = params; - uarg[0] = (intptr_t)p->ss; /* struct sigaltstack32 * */ + uarg[0] = (intptr_t)p->ss; /* const struct sigaltstack32 * */ uarg[1] = (intptr_t)p->oss; /* struct sigaltstack32 * */ *n_args = 2; break; @@ -446,7 +446,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* freebsd32_mprotect */ case 74: { struct freebsd32_mprotect_args *p = params; - uarg[0] = (intptr_t)p->addr; /* void * */ + uarg[0] = (intptr_t)p->addr; /* const void * */ uarg[1] = p->len; /* size_t */ iarg[2] = p->prot; /* int */ *n_args = 3; @@ -482,7 +482,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 80: { struct setgroups_args *p = params; uarg[0] = p->gidsetsize; /* u_int */ - uarg[1] = (intptr_t)p->gidset; /* gid_t * */ + uarg[1] = (intptr_t)p->gidset; /* const gid_t * */ *n_args = 2; break; } @@ -503,7 +503,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 83: { struct freebsd32_setitimer_args *p = params; uarg[0] = p->which; /* u_int */ - uarg[1] = (intptr_t)p->itv; /* struct itimerval32 * */ + uarg[1] = (intptr_t)p->itv; /* const struct itimerval32 * */ uarg[2] = (intptr_t)p->oitv; /* struct itimerval32 * */ *n_args = 3; break; @@ -674,8 +674,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* freebsd32_settimeofday */ case 122: { struct freebsd32_settimeofday_args *p = params; - uarg[0] = (intptr_t)p->tv; /* struct timeval32 * */ - uarg[1] = (intptr_t)p->tzp; /* struct timezone * */ + uarg[0] = (intptr_t)p->tv; /* const struct timeval32 * */ + uarg[1] = (intptr_t)p->tzp; /* const struct timezone * */ *n_args = 2; break; } @@ -785,14 +785,14 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 138: { struct freebsd32_utimes_args *p = params; uarg[0] = (intptr_t)p->path; /* const char * */ - uarg[1] = (intptr_t)p->tptr; /* struct timeval32 * */ + uarg[1] = (intptr_t)p->tptr; /* const struct timeval32 * */ *n_args = 2; break; } /* freebsd32_adjtime */ case 140: { struct freebsd32_adjtime_args *p = params; - uarg[0] = (intptr_t)p->delta; /* struct timeval32 * */ + uarg[0] = (intptr_t)p->delta; /* const struct timeval32 * */ uarg[1] = (intptr_t)p->olddelta; /* struct timeval32 * */ *n_args = 2; break; @@ -974,7 +974,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 206: { struct freebsd32_futimes_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t)p->tptr; /* struct timeval32 * */ + uarg[1] = (intptr_t)p->tptr; /* const struct timeval32 * */ *n_args = 2; break; } @@ -1074,7 +1074,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 226: { struct freebsd32_msgsnd_args *p = params; iarg[0] = p->msqid; /* int */ - uarg[1] = (intptr_t)p->msgp; /* void * */ + uarg[1] = (intptr_t)p->msgp; /* const void * */ uarg[2] = p->msgsz; /* size_t */ iarg[3] = p->msgflg; /* int */ *n_args = 4; @@ -1095,7 +1095,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 228: { struct shmat_args *p = params; iarg[0] = p->shmid; /* int */ - uarg[1] = (intptr_t)p->shmaddr; /* void * */ + uarg[1] = (intptr_t)p->shmaddr; /* const void * */ iarg[2] = p->shmflg; /* int */ *n_args = 3; break; @@ -1103,7 +1103,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* shmdt */ case 230: { struct shmdt_args *p = params; - uarg[0] = (intptr_t)p->shmaddr; /* void * */ + uarg[0] = (intptr_t)p->shmaddr; /* const void * */ *n_args = 1; break; } @@ -1296,7 +1296,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 276: { struct freebsd32_lutimes_args *p = params; uarg[0] = (intptr_t)p->path; /* const char * */ - uarg[1] = (intptr_t)p->tptr; /* struct timeval32 * */ + uarg[1] = (intptr_t)p->tptr; /* const struct timeval32 * */ *n_args = 2; break; } @@ -1594,7 +1594,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) struct freebsd32_sigtimedwait_args *p = params; uarg[0] = (intptr_t)p->set; /* const sigset_t * */ uarg[1] = (intptr_t)p->info; /* struct siginfo32 * */ - uarg[2] = (intptr_t)p->timeout; /* const struct timespec * */ + uarg[2] = (intptr_t)p->timeout; /* const struct timespec32 * */ *n_args = 3; break; } @@ -1948,7 +1948,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 416: { struct freebsd32_sigaction_args *p = params; iarg[0] = p->sig; /* int */ - uarg[1] = (intptr_t)p->act; /* struct sigaction32 * */ + uarg[1] = (intptr_t)p->act; /* const struct sigaction32 * */ uarg[2] = (intptr_t)p->oact; /* struct sigaction32 * */ *n_args = 3; break; @@ -2314,7 +2314,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->sd; /* int */ uarg[1] = (intptr_t)p->msg; /* void * */ iarg[2] = p->mlen; /* int */ - uarg[3] = (intptr_t)p->to; /* struct sockaddr * */ + uarg[3] = (intptr_t)p->to; /* const 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, int *n_args) iarg[0] = p->sd; /* int */ uarg[1] = (intptr_t)p->iov; /* struct iovec * */ iarg[2] = p->iovlen; /* int */ - uarg[3] = (intptr_t)p->to; /* struct sockaddr * */ + uarg[3] = (intptr_t)p->to; /* const struct sockaddr * */ iarg[4] = p->tolen; /* __socklen_t */ uarg[5] = (intptr_t)p->sinfo; /* struct sctp_sndrcvinfo * */ iarg[6] = p->flags; /* int */ @@ -2609,7 +2609,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) struct freebsd32_futimesat_args *p = params; iarg[0] = p->fd; /* int */ uarg[1] = (intptr_t)p->path; /* const char * */ - uarg[2] = (intptr_t)p->times; /* struct timeval * */ + uarg[2] = (intptr_t)p->times; /* const struct timeval32 * */ *n_args = 3; break; } @@ -2700,7 +2700,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* gssd_syscall */ case 505: { struct gssd_syscall_args *p = params; - uarg[0] = (intptr_t)p->path; /* char * */ + uarg[0] = (intptr_t)p->path; /* const char * */ *n_args = 1; break; } @@ -3102,7 +3102,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 546: { struct freebsd32_futimens_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t)p->times; /* struct timespec * */ + uarg[1] = (intptr_t)p->times; /* const struct timespec32 * */ *n_args = 2; break; } @@ -3111,7 +3111,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) struct freebsd32_utimensat_args *p = params; iarg[0] = p->fd; /* int */ uarg[1] = (intptr_t)p->path; /* const char * */ - uarg[2] = (intptr_t)p->times; /* struct timespec * */ + uarg[2] = (intptr_t)p->times; /* const struct timespec32 * */ iarg[3] = p->flag; /* int */ *n_args = 4; break; @@ -3711,7 +3711,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland struct msghdr32 *"; + p = "userland const struct msghdr32 *"; break; case 2: p = "int"; @@ -3942,7 +3942,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 53: switch (ndx) { case 0: - p = "userland struct sigaltstack32 *"; + p = "userland const struct sigaltstack32 *"; break; case 1: p = "userland struct sigaltstack32 *"; @@ -4108,7 +4108,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 74: switch (ndx) { case 0: - p = "userland void *"; + p = "userland const void *"; break; case 1: p = "size_t"; @@ -4172,7 +4172,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "u_int"; break; case 1: - p = "userland gid_t *"; + p = "userland const gid_t *"; break; default: break; @@ -4201,7 +4201,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "u_int"; break; case 1: - p = "userland struct itimerval32 *"; + p = "userland const struct itimerval32 *"; break; case 2: p = "userland struct itimerval32 *"; @@ -4493,10 +4493,10 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 122: switch (ndx) { case 0: - p = "userland struct timeval32 *"; + p = "userland const struct timeval32 *"; break; case 1: - p = "userland struct timezone *"; + p = "userland const struct timezone *"; break; default: break; @@ -4683,7 +4683,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const char *"; break; case 1: - p = "userland struct timeval32 *"; + p = "userland const struct timeval32 *"; break; default: break; @@ -4693,7 +4693,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 140: switch (ndx) { case 0: - p = "userland struct timeval32 *"; + p = "userland const struct timeval32 *"; break; case 1: p = "userland struct timeval32 *"; @@ -4995,7 +4995,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland struct timeval32 *"; + p = "userland const struct timeval32 *"; break; default: break; @@ -5109,7 +5109,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland void *"; + p = "userland const void *"; break; case 2: p = "size_t"; @@ -5150,7 +5150,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland void *"; + p = "userland const void *"; break; case 2: p = "int"; @@ -5163,7 +5163,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 230: switch (ndx) { case 0: - p = "userland void *"; + p = "userland const void *"; break; default: break; @@ -5477,7 +5477,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const char *"; break; case 1: - p = "userland struct timeval32 *"; + p = "userland const struct timeval32 *"; break; default: break; @@ -5939,7 +5939,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland struct siginfo32 *"; break; case 2: - p = "userland const struct timespec *"; + p = "userland const struct timespec32 *"; break; default: break; @@ -6560,7 +6560,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland struct sigaction32 *"; + p = "userland const struct sigaction32 *"; break; case 2: p = "userland struct sigaction32 *"; @@ -7174,7 +7174,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 3: - p = "userland struct sockaddr *"; + p = "userland const struct sockaddr *"; break; case 4: p = "__socklen_t"; @@ -7202,7 +7202,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 3: - p = "userland struct sockaddr *"; + p = "userland const struct sockaddr *"; break; case 4: p = "__socklen_t"; @@ -7750,7 +7750,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const char *"; break; case 2: - p = "userland struct timeval *"; + p = "userland const struct timeval32 *"; break; default: break; @@ -7913,7 +7913,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 505: switch (ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; default: break; @@ -8644,7 +8644,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland struct timespec *"; + p = "userland const struct timespec32 *"; break; default: break; @@ -8660,7 +8660,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland const char *"; break; case 2: - p = "userland struct timespec *"; + p = "userland const struct timespec32 *"; break; case 3: p = "int"; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 4a0b6f80125d..8cb962e90bce 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -107,8 +107,8 @@ caddr_t addr, int data); } 27 AUE_RECVMSG STD { int freebsd32_recvmsg(int s, struct msghdr32 *msg, \ int flags); } -28 AUE_SENDMSG STD { int freebsd32_sendmsg(int s, struct msghdr32 *msg, \ - int flags); } +28 AUE_SENDMSG STD { int freebsd32_sendmsg(int s, \ + const struct msghdr32 *msg, int flags); } 29 AUE_RECVFROM STD { int freebsd32_recvfrom(int s, void *buf, \ uint32_t len, int flags, \ struct sockaddr *from, \ @@ -150,7 +150,7 @@ 51 AUE_ACCT NOPROTO { int acct(const char *path); } 52 AUE_SIGPENDING COMPAT { int freebsd32_sigpending(void); } 53 AUE_SIGALTSTACK STD { int freebsd32_sigaltstack( \ - struct sigaltstack32 *ss, \ + const struct sigaltstack32 *ss, \ struct sigaltstack32 *oss); } 54 AUE_IOCTL STD { int freebsd32_ioctl(int fd, uint32_t com, \ struct md_ioctl32 *data); } @@ -180,7 +180,7 @@ int prot, int flags, int fd, int32_t pos); } 72 AUE_O_VADVISE COMPAT11|NOPROTO { int vadvise(int anom); } 73 AUE_MUNMAP NOPROTO { int munmap(void *addr, size_t len); } -74 AUE_MPROTECT STD { int freebsd32_mprotect(void *addr, \ +74 AUE_MPROTECT STD { int freebsd32_mprotect(const void *addr, \ size_t len, int prot); } 75 AUE_MADVISE NOPROTO { int madvise(void *addr, size_t len, \ int behav); } @@ -191,11 +191,11 @@ 79 AUE_GETGROUPS NOPROTO { int getgroups(u_int gidsetsize, \ gid_t *gidset); } 80 AUE_SETGROUPS NOPROTO { int setgroups(u_int gidsetsize, \ - gid_t *gidset); } + const gid_t *gidset); } 81 AUE_GETPGRP NOPROTO { int getpgrp(void); } 82 AUE_SETPGRP NOPROTO { int setpgid(int pid, int pgid); } 83 AUE_SETITIMER STD { int freebsd32_setitimer(u_int which, \ - struct itimerval32 *itv, \ + const struct itimerval32 *itv, \ struct itimerval32 *oitv); } 84 AUE_NULL OBSOL owait ; XXX implement @@ -258,8 +258,8 @@ 121 AUE_WRITEV STD { int freebsd32_writev(int fd, \ struct iovec32 *iovp, u_int iovcnt); } 122 AUE_SETTIMEOFDAY STD { int freebsd32_settimeofday( \ - struct timeval32 *tv, \ - struct timezone *tzp); } + const struct timeval32 *tv, \ + const struct timezone *tzp); } 123 AUE_FCHOWN NOPROTO { int fchown(int fd, int uid, int gid); } 124 AUE_FCHMOD NOPROTO { int fchmod(int fd, mode_t mode); } 125 AUE_RECVFROM OBSOL orecvfrom @@ -282,10 +282,10 @@ 136 AUE_MKDIR NOPROTO { int mkdir(const char *path, mode_t mode); } 137 AUE_RMDIR NOPROTO { int rmdir(const char *path); } 138 AUE_UTIMES STD { int freebsd32_utimes(const char *path, \ - struct timeval32 *tptr); } + const struct timeval32 *tptr); } 139 AUE_NULL OBSOL 4.2 sigreturn 140 AUE_ADJTIME STD { int freebsd32_adjtime( \ - struct timeval32 *delta, \ + const struct timeval32 *delta, \ struct timeval32 *olddelta); } 141 AUE_GETPEERNAME OBSOL ogetpeername 142 AUE_SYSCTL OBSOL ogethostid @@ -398,7 +398,7 @@ size_t len); } 205 AUE_UNDELETE NOPROTO { int undelete(const char *path); } 206 AUE_FUTIMES STD { int freebsd32_futimes(int fd, \ - struct timeval32 *tptr); } + const struct timeval32 *tptr); } 207 AUE_GETPGID NOPROTO { int getpgid(pid_t pid); } 208 AUE_NULL UNIMPL nosys 209 AUE_POLL NOPROTO { int poll(struct pollfd *fds, u_int nfds, \ @@ -430,16 +430,16 @@ int msqid, int cmd, \ struct msqid_ds32_old *buf); } 225 AUE_MSGGET NOSTD|NOPROTO { int msgget(key_t key, int msgflg); } -226 AUE_MSGSND NOSTD { int freebsd32_msgsnd(int msqid, void *msgp, \ +226 AUE_MSGSND NOSTD { int freebsd32_msgsnd(int msqid, const void *msgp, \ size_t msgsz, int msgflg); } 227 AUE_MSGRCV NOSTD { int freebsd32_msgrcv(int msqid, void *msgp, \ size_t msgsz, long msgtyp, int msgflg); } -228 AUE_SHMAT NOSTD|NOPROTO { void *shmat(int shmid, void *shmaddr, \ +228 AUE_SHMAT NOSTD|NOPROTO { void *shmat(int shmid, const void *shmaddr, \ int shmflg); } 229 AUE_SHMCTL COMPAT7|NOSTD { int freebsd32_shmctl( \ int shmid, int cmd, \ struct shmid_ds32_old *buf); } -230 AUE_SHMDT NOSTD|NOPROTO { int shmdt(void *shmaddr); } +230 AUE_SHMDT NOSTD|NOPROTO { int shmdt(const void *shmaddr); } 231 AUE_SHMGET NOSTD|NOPROTO { int shmget(key_t key, int size, \ int shmflg); } ; @@ -513,7 +513,7 @@ 274 AUE_LCHMOD NOPROTO { int lchmod(const char *path, mode_t mode); } 275 AUE_NULL OBSOL netbsd_lchown 276 AUE_LUTIMES STD { int freebsd32_lutimes(const char *path, \ - struct timeval32 *tptr); } + const struct timeval32 *tptr); } 277 AUE_NULL OBSOL netbsd_msync 278 AUE_STAT COMPAT11|NOPROTO { int nstat(const char *path, \ struct nstat *ub); } @@ -621,14 +621,14 @@ const sigset_t *set, sigset_t *oset); } 341 AUE_SIGSUSPEND NOPROTO { int sigsuspend(const sigset_t *sigmask); } 342 AUE_SIGACTION COMPAT4 { int freebsd32_sigaction(int sig, \ - struct sigaction32 *act, \ + const struct sigaction32 *act, \ struct sigaction32 *oact); } 343 AUE_SIGPENDING NOPROTO { int sigpending(sigset_t *set); } 344 AUE_SIGRETURN COMPAT4 { int freebsd32_sigreturn( \ const struct freebsd4_ucontext32 *sigcntxp); } 345 AUE_SIGWAIT STD { int freebsd32_sigtimedwait(const sigset_t *set, \ struct siginfo32 *info, \ - const struct timespec *timeout); } + const struct timespec32 *timeout); } 346 AUE_NULL STD { int freebsd32_sigwaitinfo(const sigset_t *set, \ struct siginfo32 *info); } 347 AUE_ACL_GET_FILE NOPROTO { int __acl_get_file(const char *path, \ @@ -760,7 +760,7 @@ const char *attrname); } 415 AUE_NULL UNIMPL __mac_execve 416 AUE_SIGACTION STD { int freebsd32_sigaction(int sig, \ - struct sigaction32 *act, \ + const struct sigaction32 *act, \ struct sigaction32 *oact); } 417 AUE_SIGRETURN STD { int freebsd32_sigreturn( \ const struct __ucontext32 *sigcntxp); } @@ -863,10 +863,10 @@ 471 AUE_SCTP_PEELOFF NOPROTO|NOSTD { int sctp_peeloff(int sd, uint32_t name); } 472 AUE_SCTP_GENERIC_SENDMSG NOPROTO|NOSTD { int sctp_generic_sendmsg( \ int sd, void *msg, int mlen, \ - struct sockaddr *to, __socklen_t tolen, \ + const struct sockaddr *to, __socklen_t tolen, \ struct sctp_sndrcvinfo *sinfo, int flags); } 473 AUE_SCTP_GENERIC_SENDMSG_IOV NOPROTO|NOSTD { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, \ - struct sockaddr *to, __socklen_t tolen, \ + const struct sockaddr *to, __socklen_t tolen, \ struct sctp_sndrcvinfo *sinfo, int flags); } 474 AUE_SCTP_GENERIC_RECVMSG NOPROTO|NOSTD { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, \ struct sockaddr * from, __socklen_t *fromlenaddr, \ @@ -955,7 +955,7 @@ int flag); } 494 AUE_FUTIMESAT STD { int freebsd32_futimesat(int fd, \ const char *path, \ - struct timeval *times); } + const struct timeval32 *times); } 495 AUE_LINKAT NOPROTO { int linkat(int fd1, const char *path1, \ int fd2, const char *path2, int flag); } 496 AUE_MKDIRAT NOPROTO { int mkdirat(int fd, const char *path, \ @@ -977,7 +977,7 @@ int flag); } 504 AUE_POSIX_OPENPT NOPROTO { int posix_openpt(int flags); } ; 505 is initialised by the kgssapi code, if present. -505 AUE_NULL NOPROTO|NOSTD { int gssd_syscall(char *path); } +505 AUE_NULL NOPROTO|NOSTD { int gssd_syscall(const char *path); } 506 AUE_JAIL_GET STD { int freebsd32_jail_get(struct iovec32 *iovp, \ unsigned int iovcnt, int flags); } 507 AUE_JAIL_SET STD { int freebsd32_jail_set(struct iovec32 *iovp, \ @@ -1092,10 +1092,11 @@ u_int nfds, const struct timespec32 *ts, \ const sigset_t *set); } 546 AUE_FUTIMES STD { int freebsd32_futimens(int fd, \ - struct timespec *times); } + const struct timespec32 *times); } 547 AUE_FUTIMESAT STD { int freebsd32_utimensat(int fd, \ const char *path, \ - struct timespec *times, int flag); } + const struct timespec32 *times, \ + int flag); } 548 AUE_NULL OBSOL numa_getaffinity 549 AUE_NULL OBSOL numa_setaffinity 550 AUE_FSYNC NOPROTO { int fdatasync(int fd); }