The branch main has been updated by brooks:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=b7fd86118fb5d41f61fdfa003d11e9367770ff0a

commit b7fd86118fb5d41f61fdfa003d11e9367770ff0a
Author:     Brooks Davis <[email protected]>
AuthorDate: 2021-11-17 20:12:21 +0000
Commit:     Brooks Davis <[email protected]>
CommitDate: 2021-11-17 20:12:21 +0000

    syscalls: sprinkle in const values
    
    Add missing const qualifiers to a number of syscall arguments.
    
    Obtained from:  CheriBSD
    
    Reviewed by:    kevans
---
 sys/kern/syscalls.master | 32 ++++++++++++------------
 sys/kern/systrace_args.c | 64 ++++++++++++++++++++++++------------------------
 sys/kern/vfs_syscalls.c  | 10 ++++----
 sys/sys/syscallsubr.h    | 13 +++++-----
 sys/sys/sysproto.h       | 32 ++++++++++++------------
 5 files changed, 76 insertions(+), 75 deletions(-)

diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master
index 2c50bbe543ca..39992e9c7430 100644
--- a/sys/kern/syscalls.master
+++ b/sys/kern/syscalls.master
@@ -244,7 +244,7 @@
 28     AUE_SENDMSG     STD|CAPENABLED {
                int sendmsg(
                    int s,
-                   _In_ struct msghdr *msg,
+                   _In_ const struct msghdr *msg,
                    int flags
                );
        }
@@ -388,7 +388,7 @@
        }
 53     AUE_SIGALTSTACK STD|CAPENABLED {
                int sigaltstack(
-                   _In_opt_ stack_t *ss,
+                   _In_opt_ const stack_t *ss,
                    _Out_opt_ stack_t *oss
                );
        }
@@ -501,7 +501,7 @@
        }
 74     AUE_MPROTECT    STD|CAPENABLED {
                int mprotect(
-                   _In_ void *addr,
+                   _In_ const void *addr,
                    size_t len,
                    int prot
                );
@@ -531,7 +531,7 @@
 80     AUE_SETGROUPS   STD {
                int setgroups(
                    int gidsetsize,
-                   _In_reads_(gidsetsize) gid_t *gidset
+                   _In_reads_(gidsetsize) const gid_t *gidset
                );
        }
 81     AUE_GETPGRP     STD|CAPENABLED {
@@ -546,7 +546,7 @@
 83     AUE_SETITIMER   STD|CAPENABLED {
                int setitimer(
                    u_int which,
-                   _In_ struct itimerval *itv,
+                   _In_ const struct itimerval *itv,
                    _Out_opt_ struct itimerval *oitv
                );
        }
@@ -771,8 +771,8 @@
        }
 122    AUE_SETTIMEOFDAY        STD {
                int settimeofday(
-                   _In_ struct timeval *tv,
-                   _In_opt_ struct timezone *tzp
+                   _In_ const struct timeval *tv,
+                   _In_opt_ const struct timezone *tzp
                );
        }
 123    AUE_FCHOWN      STD|CAPENABLED {
@@ -878,13 +878,13 @@
 138    AUE_UTIMES      STD {
                int utimes(
                    _In_z_ const char *path,
-                   _In_ struct timeval *tptr
+                   _In_ const struct timeval *tptr
                );
        }
 139    AUE_NULL        OBSOL   4.2 sigreturn
 140    AUE_ADJTIME     STD {
                int adjtime(
-                   _In_ struct timeval *delta,
+                   _In_ const struct timeval *delta,
                    _Out_opt_ struct timeval *olddelta
                );
        }
@@ -1219,7 +1219,7 @@
 206    AUE_FUTIMES     STD|CAPENABLED {
                int futimes(
                    int fd,
-                   _In_reads_(2) struct timeval *tptr
+                   _In_reads_(2) const struct timeval *tptr
                );
        }
 207    AUE_GETPGID     STD|CAPENABLED {
@@ -1480,7 +1480,7 @@
 276    AUE_LUTIMES     STD {
                int lutimes(
                    _In_z_ const char *path,
-                   _In_ struct timeval *tptr
+                   _In_ const struct timeval *tptr
                );
        }
 277    AUE_NULL        OBSOL   netbsd_msync
@@ -2492,7 +2492,7 @@
                    int sd,
                    _In_reads_bytes_(mlen) void *msg,
                    int mlen,
-                   _In_reads_bytes_(tolen) struct sockaddr *to,
+                   _In_reads_bytes_(tolen) const struct sockaddr *to,
                    __socklen_t tolen,
                    _In_opt_ struct sctp_sndrcvinfo *sinfo,
                    int flags
@@ -2503,7 +2503,7 @@
                    int sd,
                    _In_reads_(iovlen) struct iovec *iov,
                    int iovlen,
-                   _In_reads_bytes_(tolen) struct sockaddr *to,
+                   _In_reads_bytes_(tolen) const struct sockaddr *to,
                    __socklen_t tolen,
                    _In_opt_ struct sctp_sndrcvinfo *sinfo,
                    int flags
@@ -2666,7 +2666,7 @@
                int futimesat(
                    int fd,
                    _In_z_ const char *path,
-                   _In_reads_(2) struct timeval *times
+                   _In_reads_(2) const struct timeval *times
                );
        }
 495    AUE_LINKAT      STD|CAPENABLED {
@@ -3017,14 +3017,14 @@
 546    AUE_FUTIMES     STD|CAPENABLED {
                int futimens(
                    int fd,
-                   _In_reads_(2) struct timespec *times
+                   _In_reads_(2) const struct timespec *times
                );
        }
 547    AUE_FUTIMESAT   STD|CAPENABLED {
                int utimensat(
                    int fd,
                    _In_z_ const char *path,
-                   _In_reads_(2) struct timespec *times,
+                   _In_reads_(2) const struct timespec *times,
                    int flag
                );
        }
diff --git a/sys/kern/systrace_args.c b/sys/kern/systrace_args.c
index 8e34456d2fb2..de96b132824b 100644
--- a/sys/kern/systrace_args.c
+++ b/sys/kern/systrace_args.c
@@ -188,7 +188,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int 
*n_args)
        case 28: {
                struct sendmsg_args *p = params;
                iarg[0] = p->s; /* int */
-               uarg[1] = (intptr_t)p->msg; /* struct msghdr * */
+               uarg[1] = (intptr_t)p->msg; /* const struct msghdr * */
                iarg[2] = p->flags; /* int */
                *n_args = 3;
                break;
@@ -336,7 +336,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int 
*n_args)
        /* sigaltstack */
        case 53: {
                struct sigaltstack_args *p = params;
-               uarg[0] = (intptr_t)p->ss; /* stack_t * */
+               uarg[0] = (intptr_t)p->ss; /* const stack_t * */
                uarg[1] = (intptr_t)p->oss; /* stack_t * */
                *n_args = 2;
                break;
@@ -443,7 +443,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int 
*n_args)
        /* mprotect */
        case 74: {
                struct 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;
@@ -479,7 +479,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int 
*n_args)
        case 80: {
                struct setgroups_args *p = params;
                iarg[0] = p->gidsetsize; /* int */
-               uarg[1] = (intptr_t)p->gidset; /* gid_t * */
+               uarg[1] = (intptr_t)p->gidset; /* const gid_t * */
                *n_args = 2;
                break;
        }
@@ -500,7 +500,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int 
*n_args)
        case 83: {
                struct setitimer_args *p = params;
                uarg[0] = p->which; /* u_int */
-               uarg[1] = (intptr_t)p->itv; /* struct itimerval * */
+               uarg[1] = (intptr_t)p->itv; /* const struct itimerval * */
                uarg[2] = (intptr_t)p->oitv; /* struct itimerval * */
                *n_args = 3;
                break;
@@ -671,8 +671,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int 
*n_args)
        /* settimeofday */
        case 122: {
                struct settimeofday_args *p = params;
-               uarg[0] = (intptr_t)p->tv; /* struct timeval * */
-               uarg[1] = (intptr_t)p->tzp; /* struct timezone * */
+               uarg[0] = (intptr_t)p->tv; /* const struct timeval * */
+               uarg[1] = (intptr_t)p->tzp; /* const struct timezone * */
                *n_args = 2;
                break;
        }
@@ -782,14 +782,14 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, 
int *n_args)
        case 138: {
                struct utimes_args *p = params;
                uarg[0] = (intptr_t)p->path; /* const char * */
-               uarg[1] = (intptr_t)p->tptr; /* struct timeval * */
+               uarg[1] = (intptr_t)p->tptr; /* const struct timeval * */
                *n_args = 2;
                break;
        }
        /* adjtime */
        case 140: {
                struct adjtime_args *p = params;
-               uarg[0] = (intptr_t)p->delta; /* struct timeval * */
+               uarg[0] = (intptr_t)p->delta; /* const struct timeval * */
                uarg[1] = (intptr_t)p->olddelta; /* struct timeval * */
                *n_args = 2;
                break;
@@ -1004,7 +1004,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, 
int *n_args)
        case 206: {
                struct futimes_args *p = params;
                iarg[0] = p->fd; /* int */
-               uarg[1] = (intptr_t)p->tptr; /* struct timeval * */
+               uarg[1] = (intptr_t)p->tptr; /* const struct timeval * */
                *n_args = 2;
                break;
        }
@@ -1332,7 +1332,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, 
int *n_args)
        case 276: {
                struct lutimes_args *p = params;
                uarg[0] = (intptr_t)p->path; /* const char * */
-               uarg[1] = (intptr_t)p->tptr; /* struct timeval * */
+               uarg[1] = (intptr_t)p->tptr; /* const struct timeval * */
                *n_args = 2;
                break;
        }
@@ -2476,7 +2476,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 */
@@ -2489,7 +2489,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 */
@@ -2675,7 +2675,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, 
int *n_args)
                struct 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 timeval * */
                *n_args = 3;
                break;
        }
@@ -3105,7 +3105,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, 
int *n_args)
        case 546: {
                struct 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 timespec * */
                *n_args = 2;
                break;
        }
@@ -3114,7 +3114,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, 
int *n_args)
                struct 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 timespec * */
                iarg[3] = p->flag; /* int */
                *n_args = 4;
                break;
@@ -3693,7 +3693,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char 
*desc, size_t descsz)
                        p = "int";
                        break;
                case 1:
-                       p = "userland struct msghdr *";
+                       p = "userland const struct msghdr *";
                        break;
                case 2:
                        p = "int";
@@ -3924,7 +3924,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char 
*desc, size_t descsz)
        case 53:
                switch (ndx) {
                case 0:
-                       p = "userland stack_t *";
+                       p = "userland const stack_t *";
                        break;
                case 1:
                        p = "userland stack_t *";
@@ -4090,7 +4090,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";
@@ -4154,7 +4154,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char 
*desc, size_t descsz)
                        p = "int";
                        break;
                case 1:
-                       p = "userland gid_t *";
+                       p = "userland const gid_t *";
                        break;
                default:
                        break;
@@ -4183,7 +4183,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char 
*desc, size_t descsz)
                        p = "u_int";
                        break;
                case 1:
-                       p = "userland struct itimerval *";
+                       p = "userland const struct itimerval *";
                        break;
                case 2:
                        p = "userland struct itimerval *";
@@ -4475,10 +4475,10 @@ systrace_entry_setargdesc(int sysnum, int ndx, char 
*desc, size_t descsz)
        case 122:
                switch (ndx) {
                case 0:
-                       p = "userland struct timeval *";
+                       p = "userland const struct timeval *";
                        break;
                case 1:
-                       p = "userland struct timezone *";
+                       p = "userland const struct timezone *";
                        break;
                default:
                        break;
@@ -4665,7 +4665,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char 
*desc, size_t descsz)
                        p = "userland const char *";
                        break;
                case 1:
-                       p = "userland struct timeval *";
+                       p = "userland const struct timeval *";
                        break;
                default:
                        break;
@@ -4675,7 +4675,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char 
*desc, size_t descsz)
        case 140:
                switch (ndx) {
                case 0:
-                       p = "userland struct timeval *";
+                       p = "userland const struct timeval *";
                        break;
                case 1:
                        p = "userland struct timeval *";
@@ -5032,7 +5032,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char 
*desc, size_t descsz)
                        p = "int";
                        break;
                case 1:
-                       p = "userland struct timeval *";
+                       p = "userland const struct timeval *";
                        break;
                default:
                        break;
@@ -5521,7 +5521,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char 
*desc, size_t descsz)
                        p = "userland const char *";
                        break;
                case 1:
-                       p = "userland struct timeval *";
+                       p = "userland const struct timeval *";
                        break;
                default:
                        break;
@@ -7431,7 +7431,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";
@@ -7459,7 +7459,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";
@@ -7808,7 +7808,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 timeval *";
                        break;
                default:
                        break;
@@ -8569,7 +8569,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 timespec *";
                        break;
                default:
                        break;
@@ -8585,7 +8585,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 timespec *";
                        break;
                case 3:
                        p = "int";
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index cedadc55b87f..4357669786f8 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -3242,7 +3242,7 @@ sys_futimesat(struct thread *td, struct futimesat_args 
*uap)
 
 int
 kern_utimesat(struct thread *td, int fd, const char *path,
-    enum uio_seg pathseg, struct timeval *tptr, enum uio_seg tptrseg)
+    enum uio_seg pathseg, const struct timeval *tptr, enum uio_seg tptrseg)
 {
        struct nameidata nd;
        struct timespec ts[2];
@@ -3280,7 +3280,7 @@ sys_lutimes(struct thread *td, struct lutimes_args *uap)
 
 int
 kern_lutimes(struct thread *td, const char *path, enum uio_seg pathseg,
-    struct timeval *tptr, enum uio_seg tptrseg)
+    const struct timeval *tptr, enum uio_seg tptrseg)
 {
        struct timespec ts[2];
        struct nameidata nd;
@@ -3314,7 +3314,7 @@ sys_futimes(struct thread *td, struct futimes_args *uap)
 }
 
 int
-kern_futimes(struct thread *td, int fd, struct timeval *tptr,
+kern_futimes(struct thread *td, int fd, const struct timeval *tptr,
     enum uio_seg tptrseg)
 {
        struct timespec ts[2];
@@ -3348,7 +3348,7 @@ sys_futimens(struct thread *td, struct futimens_args *uap)
 }
 
 int
-kern_futimens(struct thread *td, int fd, struct timespec *tptr,
+kern_futimens(struct thread *td, int fd, const struct timespec *tptr,
     enum uio_seg tptrseg)
 {
        struct timespec ts[2];
@@ -3386,7 +3386,7 @@ sys_utimensat(struct thread *td, struct utimensat_args 
*uap)
 
 int
 kern_utimensat(struct thread *td, int fd, const char *path,
-    enum uio_seg pathseg, struct timespec *tptr, enum uio_seg tptrseg,
+    enum uio_seg pathseg, const struct timespec *tptr, enum uio_seg tptrseg,
     int flag)
 {
        struct nameidata nd;
diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h
index ecd0da74329f..a10c84cd2ab7 100644
--- a/sys/sys/syscallsubr.h
+++ b/sys/sys/syscallsubr.h
@@ -147,9 +147,9 @@ int kern_fstat(struct thread *td, int fd, struct stat *sbp);
 int    kern_fstatfs(struct thread *td, int fd, struct statfs *buf);
 int    kern_fsync(struct thread *td, int fd, bool fullsync);
 int    kern_ftruncate(struct thread *td, int fd, off_t length);
-int    kern_futimes(struct thread *td, int fd, struct timeval *tptr,
+int    kern_futimes(struct thread *td, int fd, const struct timeval *tptr,
            enum uio_seg tptrseg);
-int    kern_futimens(struct thread *td, int fd, struct timespec *tptr,
+int    kern_futimens(struct thread *td, int fd, const struct timespec *tptr,
            enum uio_seg tptrseg);
 int    kern_getdirentries(struct thread *td, int fd, char *buf, size_t count,
            off_t *basep, ssize_t *residp, enum uio_seg bufseg);
@@ -189,7 +189,7 @@ int kern_linkat(struct thread *td, int fd1, int fd2, const 
char *path1,
 int    kern_listen(struct thread *td, int s, int backlog);
 int    kern_lseek(struct thread *td, int fd, off_t offset, int whence);
 int    kern_lutimes(struct thread *td, const char *path, enum uio_seg pathseg,
-           struct timeval *tptr, enum uio_seg tptrseg);
+           const struct timeval *tptr, enum uio_seg tptrseg);
 int    kern_madvise(struct thread *td, uintptr_t addr, size_t len, int behav);
 int    kern_mincore(struct thread *td, uintptr_t addr, size_t len, char *vec);
 int    kern_minherit(struct thread *td, uintptr_t addr, size_t len,
@@ -333,10 +333,11 @@ int       kern_truncate(struct thread *td, const char 
*path,
 int    kern_funlinkat(struct thread *td, int dfd, const char *path, int fd,
            enum uio_seg pathseg, int flag, ino_t oldinum);
 int    kern_utimesat(struct thread *td, int fd, const char *path,
-           enum uio_seg pathseg, struct timeval *tptr, enum uio_seg tptrseg);
+           enum uio_seg pathseg, const struct timeval *tptr,
+           enum uio_seg tptrseg);
 int    kern_utimensat(struct thread *td, int fd, const char *path,
-           enum uio_seg pathseg, struct timespec *tptr, enum uio_seg tptrseg,
-           int flag);
+           enum uio_seg pathseg, const struct timespec *tptr,
+           enum uio_seg tptrseg, int flag);
 int    kern_wait(struct thread *td, pid_t pid, int *status, int options,
            struct rusage *rup);
 int    kern_wait6(struct thread *td, enum idtype idtype, id_t id, int *status,
diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h
index 5aadd3f0990b..d29620ac2d7f 100644
--- a/sys/sys/sysproto.h
+++ b/sys/sys/sysproto.h
@@ -127,7 +127,7 @@ struct recvmsg_args {
 };
 struct sendmsg_args {
        char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)];
-       char msg_l_[PADL_(struct msghdr *)]; struct msghdr * msg; char 
msg_r_[PADR_(struct msghdr *)];
+       char msg_l_[PADL_(const struct msghdr *)]; const struct msghdr * msg; 
char msg_r_[PADR_(const struct msghdr *)];
        char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
 };
 struct recvfrom_args {
@@ -213,7 +213,7 @@ struct osigpending_args {
        register_t dummy;
 };
 struct sigaltstack_args {
-       char ss_l_[PADL_(stack_t *)]; stack_t * ss; char ss_r_[PADR_(stack_t 
*)];
+       char ss_l_[PADL_(const stack_t *)]; const stack_t * ss; char 
ss_r_[PADR_(const stack_t *)];
        char oss_l_[PADL_(stack_t *)]; stack_t * oss; char oss_r_[PADR_(stack_t 
*)];
 };
 struct ioctl_args {
@@ -269,7 +269,7 @@ struct munmap_args {
        char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)];
 };
 struct 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)];
 };
@@ -289,7 +289,7 @@ struct getgroups_args {
 };
 struct setgroups_args {
        char gidsetsize_l_[PADL_(int)]; int gidsetsize; char 
gidsetsize_r_[PADR_(int)];
-       char gidset_l_[PADL_(gid_t *)]; gid_t * gidset; char 
gidset_r_[PADR_(gid_t *)];
+       char gidset_l_[PADL_(const gid_t *)]; const gid_t * gidset; char 
gidset_r_[PADR_(const gid_t *)];
 };
 struct getpgrp_args {
        register_t dummy;
@@ -300,7 +300,7 @@ struct setpgid_args {
 };
 struct setitimer_args {
        char which_l_[PADL_(u_int)]; u_int which; char which_r_[PADR_(u_int)];
-       char itv_l_[PADL_(struct itimerval *)]; struct itimerval * itv; char 
itv_r_[PADR_(struct itimerval *)];
+       char itv_l_[PADL_(const struct itimerval *)]; const struct itimerval * 
itv; char itv_r_[PADR_(const struct itimerval *)];
        char oitv_l_[PADL_(struct itimerval *)]; struct itimerval * oitv; char 
oitv_r_[PADR_(struct itimerval *)];
 };
 struct owait_args {
@@ -396,8 +396,8 @@ struct writev_args {
        char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char 
iovcnt_r_[PADR_(u_int)];
 };
 struct settimeofday_args {
-       char tv_l_[PADL_(struct timeval *)]; struct timeval * tv; char 
tv_r_[PADR_(struct timeval *)];
-       char tzp_l_[PADL_(struct timezone *)]; struct timezone * tzp; char 
tzp_r_[PADR_(struct timezone *)];
+       char tv_l_[PADL_(const struct timeval *)]; const struct timeval * tv; 
char tv_r_[PADR_(const struct timeval *)];
+       char tzp_l_[PADL_(const struct timezone *)]; const struct timezone * 
tzp; char tzp_r_[PADR_(const struct timezone *)];
 };
 struct fchown_args {
        char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
@@ -455,10 +455,10 @@ struct rmdir_args {
 };
 struct utimes_args {
        char path_l_[PADL_(const char *)]; const char * path; char 
path_r_[PADR_(const char *)];
-       char tptr_l_[PADL_(struct timeval *)]; struct timeval * tptr; char 
tptr_r_[PADR_(struct timeval *)];
+       char tptr_l_[PADL_(const struct timeval *)]; const struct timeval * 
tptr; char tptr_r_[PADR_(const struct timeval *)];
 };
 struct adjtime_args {
-       char delta_l_[PADL_(struct timeval *)]; struct timeval * delta; char 
delta_r_[PADR_(struct timeval *)];
+       char delta_l_[PADL_(const struct timeval *)]; const struct timeval * 
delta; char delta_r_[PADR_(const struct timeval *)];
        char olddelta_l_[PADL_(struct timeval *)]; struct timeval * olddelta; 
char olddelta_r_[PADR_(struct timeval *)];
 };
 struct ogethostid_args {
@@ -576,7 +576,7 @@ struct undelete_args {
 };
 struct futimes_args {
        char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
-       char tptr_l_[PADL_(struct timeval *)]; struct timeval * tptr; char 
tptr_r_[PADR_(struct timeval *)];
+       char tptr_l_[PADL_(const struct timeval *)]; const struct timeval * 
tptr; char tptr_r_[PADR_(const struct timeval *)];
 };
 struct getpgid_args {
        char pid_l_[PADL_(pid_t)]; pid_t pid; char pid_r_[PADR_(pid_t)];
@@ -720,7 +720,7 @@ struct lchmod_args {
 };
 struct lutimes_args {
        char path_l_[PADL_(const char *)]; const char * path; char 
path_r_[PADR_(const char *)];
-       char tptr_l_[PADL_(struct timeval *)]; struct timeval * tptr; char 
tptr_r_[PADR_(struct timeval *)];
+       char tptr_l_[PADL_(const struct timeval *)]; const struct timeval * 
tptr; char tptr_r_[PADR_(const struct timeval *)];
 };
 struct preadv_args {
        char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
@@ -1320,7 +1320,7 @@ struct sctp_generic_sendmsg_args {
        char sd_l_[PADL_(int)]; int sd; char sd_r_[PADR_(int)];
        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_(struct sockaddr *)]; struct sockaddr * to; char 
to_r_[PADR_(struct sockaddr *)];
+       char to_l_[PADL_(const struct sockaddr *)]; const struct sockaddr * to; 
char to_r_[PADR_(const 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_(struct sockaddr *)]; struct sockaddr * to; char 
to_r_[PADR_(struct sockaddr *)];
+       char to_l_[PADL_(const struct sockaddr *)]; const struct sockaddr * to; 
char to_r_[PADR_(const 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)];
@@ -1439,7 +1439,7 @@ struct fexecve_args {
 struct 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 timeval *)]; const struct timeval * 
times; char times_r_[PADR_(const struct timeval *)];
 };
 struct linkat_args {
        char fd1_l_[PADL_(int)]; int fd1; char fd1_r_[PADR_(int)];
@@ -1679,12 +1679,12 @@ struct ppoll_args {
 };
 struct 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 timespec *)]; const struct timespec * 
times; char times_r_[PADR_(const struct timespec *)];
 };
 struct 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 timespec *)]; const struct timespec * 
times; char times_r_[PADR_(const struct timespec *)];
        char flag_l_[PADL_(int)]; int flag; char flag_r_[PADR_(int)];
 };
 struct fdatasync_args {

Reply via email to