Date: Thu, 30 Mar 2017 20:08:25 +0000 (UTC) From: Dmitry Chagin <dchagin@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r316297 - in stable/11/sys: amd64/linux amd64/linux32 compat/linux i386/linux Message-ID: <201703302008.v2UK8Pi5046388@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dchagin Date: Thu Mar 30 20:08:25 2017 New Revision: 316297 URL: https://svnweb.freebsd.org/changeset/base/316297 Log: MFC r314312: Change Linux epoll_pwait syscall definition to match Linux actual one. MFC r314313: Regen for r314312 (Linux epoll_pwait). MFC r314314: Return EINVAL in case when an invalid size of signal mask specified. Modified: stable/11/sys/amd64/linux/linux_proto.h stable/11/sys/amd64/linux/linux_systrace_args.c stable/11/sys/amd64/linux/syscalls.master stable/11/sys/amd64/linux32/linux32_proto.h stable/11/sys/amd64/linux32/linux32_systrace_args.c stable/11/sys/amd64/linux32/syscalls.master stable/11/sys/compat/linux/linux_event.c stable/11/sys/i386/linux/linux_proto.h stable/11/sys/i386/linux/linux_systrace_args.c stable/11/sys/i386/linux/syscalls.master Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/linux/linux_proto.h ============================================================================== --- stable/11/sys/amd64/linux/linux_proto.h Thu Mar 30 20:05:16 2017 (r316296) +++ stable/11/sys/amd64/linux/linux_proto.h Thu Mar 30 20:08:25 2017 (r316297) @@ -996,6 +996,7 @@ struct linux_epoll_pwait_args { char maxevents_l_[PADL_(l_int)]; l_int maxevents; char maxevents_r_[PADR_(l_int)]; char timeout_l_[PADL_(l_int)]; l_int timeout; char timeout_r_[PADR_(l_int)]; char mask_l_[PADL_(l_sigset_t *)]; l_sigset_t * mask; char mask_r_[PADR_(l_sigset_t *)]; + char sigsetsize_l_[PADL_(l_size_t)]; l_size_t sigsetsize; char sigsetsize_r_[PADR_(l_size_t)]; }; struct linux_signalfd_args { register_t dummy; Modified: stable/11/sys/amd64/linux/linux_systrace_args.c ============================================================================== --- stable/11/sys/amd64/linux/linux_systrace_args.c Thu Mar 30 20:05:16 2017 (r316296) +++ stable/11/sys/amd64/linux/linux_systrace_args.c Thu Mar 30 20:08:25 2017 (r316297) @@ -2068,7 +2068,8 @@ systrace_args(int sysnum, void *params, iarg[2] = p->maxevents; /* l_int */ iarg[3] = p->timeout; /* l_int */ uarg[4] = (intptr_t) p->mask; /* l_sigset_t * */ - *n_args = 5; + iarg[5] = p->sigsetsize; /* l_size_t */ + *n_args = 6; break; } /* linux_signalfd */ @@ -5646,6 +5647,9 @@ systrace_entry_setargdesc(int sysnum, in case 4: p = "l_sigset_t *"; break; + case 5: + p = "l_size_t"; + break; default: break; }; Modified: stable/11/sys/amd64/linux/syscalls.master ============================================================================== --- stable/11/sys/amd64/linux/syscalls.master Thu Mar 30 20:05:16 2017 (r316296) +++ stable/11/sys/amd64/linux/syscalls.master Thu Mar 30 20:08:25 2017 (r316297) @@ -473,7 +473,8 @@ 280 AUE_FUTIMESAT STD { int linux_utimensat(l_int dfd, const char *pathname, \ const struct l_timespec *times, l_int flags); } 281 AUE_NULL STD { int linux_epoll_pwait(l_int epfd, struct epoll_event *events, \ - l_int maxevents, l_int timeout, l_sigset_t *mask); } + l_int maxevents, l_int timeout, l_sigset_t *mask, \ + l_size_t sigsetsize); } 282 AUE_NULL STD { int linux_signalfd(void); } 283 AUE_NULL STD { int linux_timerfd_create(l_int clockid, l_int flags); } 284 AUE_NULL STD { int linux_eventfd(l_uint initval); } Modified: stable/11/sys/amd64/linux32/linux32_proto.h ============================================================================== --- stable/11/sys/amd64/linux32/linux32_proto.h Thu Mar 30 20:05:16 2017 (r316296) +++ stable/11/sys/amd64/linux32/linux32_proto.h Thu Mar 30 20:08:25 2017 (r316297) @@ -1052,6 +1052,7 @@ struct linux_epoll_pwait_args { char maxevents_l_[PADL_(l_int)]; l_int maxevents; char maxevents_r_[PADR_(l_int)]; char timeout_l_[PADL_(l_int)]; l_int timeout; char timeout_r_[PADR_(l_int)]; char mask_l_[PADL_(l_sigset_t *)]; l_sigset_t * mask; char mask_r_[PADR_(l_sigset_t *)]; + char sigsetsize_l_[PADL_(l_size_t)]; l_size_t sigsetsize; char sigsetsize_r_[PADR_(l_size_t)]; }; struct linux_utimensat_args { char dfd_l_[PADL_(l_int)]; l_int dfd; char dfd_r_[PADR_(l_int)]; Modified: stable/11/sys/amd64/linux32/linux32_systrace_args.c ============================================================================== --- stable/11/sys/amd64/linux32/linux32_systrace_args.c Thu Mar 30 20:05:16 2017 (r316296) +++ stable/11/sys/amd64/linux32/linux32_systrace_args.c Thu Mar 30 20:08:25 2017 (r316297) @@ -2169,7 +2169,8 @@ systrace_args(int sysnum, void *params, iarg[2] = p->maxevents; /* l_int */ iarg[3] = p->timeout; /* l_int */ uarg[4] = (intptr_t) p->mask; /* l_sigset_t * */ - *n_args = 5; + iarg[5] = p->sigsetsize; /* l_size_t */ + *n_args = 6; break; } /* linux_utimensat */ @@ -5981,6 +5982,9 @@ systrace_entry_setargdesc(int sysnum, in case 4: p = "l_sigset_t *"; break; + case 5: + p = "l_size_t"; + break; default: break; }; Modified: stable/11/sys/amd64/linux32/syscalls.master ============================================================================== --- stable/11/sys/amd64/linux32/syscalls.master Thu Mar 30 20:05:16 2017 (r316296) +++ stable/11/sys/amd64/linux32/syscalls.master Thu Mar 30 20:08:25 2017 (r316297) @@ -533,7 +533,8 @@ ; linux 2.6.19: 318 AUE_NULL STD { int linux_getcpu(void); } 319 AUE_NULL STD { int linux_epoll_pwait(l_int epfd, struct epoll_event *events, \ - l_int maxevents, l_int timeout, l_sigset_t *mask); } + l_int maxevents, l_int timeout, l_sigset_t *mask, \ + l_size_t sigsetsize); } ; linux 2.6.22: 320 AUE_FUTIMESAT STD { int linux_utimensat(l_int dfd, const char *pathname, \ const struct l_timespec *times, l_int flags); } Modified: stable/11/sys/compat/linux/linux_event.c ============================================================================== --- stable/11/sys/compat/linux/linux_event.c Thu Mar 30 20:05:16 2017 (r316296) +++ stable/11/sys/compat/linux/linux_event.c Thu Mar 30 20:08:25 2017 (r316297) @@ -622,6 +622,8 @@ linux_epoll_pwait(struct thread *td, str int error; if (args->mask != NULL) { + if (args->sigsetsize != sizeof(l_sigset_t)) + return (EINVAL); error = copyin(args->mask, &lmask, sizeof(l_sigset_t)); if (error != 0) return (error); Modified: stable/11/sys/i386/linux/linux_proto.h ============================================================================== --- stable/11/sys/i386/linux/linux_proto.h Thu Mar 30 20:05:16 2017 (r316296) +++ stable/11/sys/i386/linux/linux_proto.h Thu Mar 30 20:08:25 2017 (r316297) @@ -1070,6 +1070,7 @@ struct linux_epoll_pwait_args { char maxevents_l_[PADL_(l_int)]; l_int maxevents; char maxevents_r_[PADR_(l_int)]; char timeout_l_[PADL_(l_int)]; l_int timeout; char timeout_r_[PADR_(l_int)]; char mask_l_[PADL_(l_sigset_t *)]; l_sigset_t * mask; char mask_r_[PADR_(l_sigset_t *)]; + char sigsetsize_l_[PADL_(l_size_t)]; l_size_t sigsetsize; char sigsetsize_r_[PADR_(l_size_t)]; }; struct linux_utimensat_args { char dfd_l_[PADL_(l_int)]; l_int dfd; char dfd_r_[PADR_(l_int)]; Modified: stable/11/sys/i386/linux/linux_systrace_args.c ============================================================================== --- stable/11/sys/i386/linux/linux_systrace_args.c Thu Mar 30 20:05:16 2017 (r316296) +++ stable/11/sys/i386/linux/linux_systrace_args.c Thu Mar 30 20:08:25 2017 (r316297) @@ -2245,7 +2245,8 @@ systrace_args(int sysnum, void *params, iarg[2] = p->maxevents; /* l_int */ iarg[3] = p->timeout; /* l_int */ uarg[4] = (intptr_t) p->mask; /* l_sigset_t * */ - *n_args = 5; + iarg[5] = p->sigsetsize; /* l_size_t */ + *n_args = 6; break; } /* linux_utimensat */ @@ -6212,6 +6213,9 @@ systrace_entry_setargdesc(int sysnum, in case 4: p = "l_sigset_t *"; break; + case 5: + p = "l_size_t"; + break; default: break; }; Modified: stable/11/sys/i386/linux/syscalls.master ============================================================================== --- stable/11/sys/i386/linux/syscalls.master Thu Mar 30 20:05:16 2017 (r316296) +++ stable/11/sys/i386/linux/syscalls.master Thu Mar 30 20:08:25 2017 (r316297) @@ -541,7 +541,8 @@ ; linux 2.6.19: 318 AUE_NULL STD { int linux_getcpu(void); } 319 AUE_NULL STD { int linux_epoll_pwait(l_int epfd, struct epoll_event *events, \ - l_int maxevents, l_int timeout, l_sigset_t *mask); } + l_int maxevents, l_int timeout, l_sigset_t *mask, \ + l_size_t sigsetsize); } ; linux 2.6.22: 320 AUE_FUTIMESAT STD { int linux_utimensat(l_int dfd, const char *pathname, \ const struct l_timespec *times, l_int flags); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703302008.v2UK8Pi5046388>