Date: Tue, 21 May 2013 11:40:16 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r250853 - in head/sys: compat/freebsd32 kern Message-ID: <201305211140.r4LBeGSi059770@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Tue May 21 11:40:16 2013 New Revision: 250853 URL: http://svnweb.freebsd.org/changeset/base/250853 Log: Fix the wait6(2) on 32bit architectures and for the compat32, by using the right type for the argument in syscalls.master. Also fix the posix_fallocate(2) and posix_fadvise(2) compat32 syscalls on the architectures which require padding of the 64bit argument. Noted and reviewed by: jhb Pointy hat to: kib MFC after: 1 week Modified: head/sys/compat/freebsd32/freebsd32_misc.c head/sys/compat/freebsd32/syscalls.master head/sys/kern/syscalls.master Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Tue May 21 11:31:56 2013 (r250852) +++ head/sys/compat/freebsd32/freebsd32_misc.c Tue May 21 11:40:16 2013 (r250853) @@ -198,8 +198,8 @@ freebsd32_wait6(struct thread *td, struc bzero(sip, sizeof(*sip)); } else sip = NULL; - error = kern_wait6(td, uap->idtype, uap->id, &status, uap->options, - wrup, sip); + error = kern_wait6(td, uap->idtype, PAIR32TO64(id_t, uap->id), + &status, uap->options, wrup, sip); if (error != 0) return (error); if (uap->status != NULL) Modified: head/sys/compat/freebsd32/syscalls.master ============================================================================== --- head/sys/compat/freebsd32/syscalls.master Tue May 21 11:31:56 2013 (r250852) +++ head/sys/compat/freebsd32/syscalls.master Tue May 21 11:40:16 2013 (r250853) @@ -994,6 +994,22 @@ 529 AUE_NULL NOPROTO { int rctl_remove_rule(const void *inbufp, \ size_t inbuflen, void *outbufp, \ size_t outbuflen); } +#ifdef PAD64_REQUIRED +530 AUE_NULL STD { int freebsd32_posix_fallocate(int fd, \ + int pad, \ + uint32_t offset1, uint32_t offset2,\ + uint32_t len1, uint32_t len2); } +531 AUE_NULL STD { int freebsd32_posix_fadvise(int fd, \ + int pad, \ + uint32_t offset1, uint32_t offset2,\ + uint32_t len1, uint32_t len2, \ + int advice); } +532 AUE_WAIT6 STD { int freebsd32_wait6(int idtype, int pad, \ + uint32_t id1, uint32_t id2, \ + int *status, int options, \ + struct wrusage32 *wrusage, \ + siginfo_t *info); } +#else 530 AUE_NULL STD { int freebsd32_posix_fallocate(int fd,\ uint32_t offset1, uint32_t offset2,\ uint32_t len1, uint32_t len2); } @@ -1001,11 +1017,12 @@ uint32_t offset1, uint32_t offset2,\ uint32_t len1, uint32_t len2, \ int advice); } -532 AUE_WAIT6 STD { int freebsd32_wait6(int idtype, int id, \ +532 AUE_WAIT6 STD { int freebsd32_wait6(int idtype, \ + uint32_t id1, uint32_t id2, \ int *status, int options, \ struct wrusage32 *wrusage, \ siginfo_t *info); } - +#endif 533 AUE_CAP_RIGHTS_LIMIT NOPROTO { int cap_rights_limit(int fd, \ uint64_t rights); } 534 AUE_CAP_IOCTLS_LIMIT NOPROTO { int cap_ioctls_limit(int fd, \ Modified: head/sys/kern/syscalls.master ============================================================================== --- head/sys/kern/syscalls.master Tue May 21 11:31:56 2013 (r250852) +++ head/sys/kern/syscalls.master Tue May 21 11:40:16 2013 (r250853) @@ -952,7 +952,7 @@ off_t offset, off_t len); } 531 AUE_NULL STD { int posix_fadvise(int fd, off_t offset, \ off_t len, int advice); } -532 AUE_WAIT6 STD { int wait6(int idtype, int id, \ +532 AUE_WAIT6 STD { int wait6(int idtype, id_t id, \ int *status, int options, \ struct __wrusage *wrusage, \ siginfo_t *info); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305211140.r4LBeGSi059770>