diff options
author | dchagin <dchagin@FreeBSD.org> | 2017-03-30 20:08:25 +0000 |
---|---|---|
committer | dchagin <dchagin@FreeBSD.org> | 2017-03-30 20:08:25 +0000 |
commit | 9a78265c32475a07e7c0b167183d65908ac80eef (patch) | |
tree | 3f66dea791d83ca5e79e5699fb2ec09f1eb67db2 /sys | |
parent | 5b761cd12823827d9fe7fa1c6304d79bd41e4528 (diff) | |
download | FreeBSD-src-9a78265c32475a07e7c0b167183d65908ac80eef.zip FreeBSD-src-9a78265c32475a07e7c0b167183d65908ac80eef.tar.gz |
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.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/linux/linux_proto.h | 1 | ||||
-rw-r--r-- | sys/amd64/linux/linux_systrace_args.c | 6 | ||||
-rw-r--r-- | sys/amd64/linux/syscalls.master | 3 | ||||
-rw-r--r-- | sys/amd64/linux32/linux32_proto.h | 1 | ||||
-rw-r--r-- | sys/amd64/linux32/linux32_systrace_args.c | 6 | ||||
-rw-r--r-- | sys/amd64/linux32/syscalls.master | 3 | ||||
-rw-r--r-- | sys/compat/linux/linux_event.c | 2 | ||||
-rw-r--r-- | sys/i386/linux/linux_proto.h | 1 | ||||
-rw-r--r-- | sys/i386/linux/linux_systrace_args.c | 6 | ||||
-rw-r--r-- | sys/i386/linux/syscalls.master | 3 |
10 files changed, 26 insertions, 6 deletions
diff --git a/sys/amd64/linux/linux_proto.h b/sys/amd64/linux/linux_proto.h index 300ce36..2fdb177 100644 --- a/sys/amd64/linux/linux_proto.h +++ b/sys/amd64/linux/linux_proto.h @@ -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; diff --git a/sys/amd64/linux/linux_systrace_args.c b/sys/amd64/linux/linux_systrace_args.c index df484ce..450573e 100644 --- a/sys/amd64/linux/linux_systrace_args.c +++ b/sys/amd64/linux/linux_systrace_args.c @@ -2068,7 +2068,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) 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, int ndx, char *desc, size_t descsz) case 4: p = "l_sigset_t *"; break; + case 5: + p = "l_size_t"; + break; default: break; }; diff --git a/sys/amd64/linux/syscalls.master b/sys/amd64/linux/syscalls.master index 6b587e9..adf13aa 100644 --- a/sys/amd64/linux/syscalls.master +++ b/sys/amd64/linux/syscalls.master @@ -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); } diff --git a/sys/amd64/linux32/linux32_proto.h b/sys/amd64/linux32/linux32_proto.h index 3ec7059..39e81a6 100644 --- a/sys/amd64/linux32/linux32_proto.h +++ b/sys/amd64/linux32/linux32_proto.h @@ -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)]; diff --git a/sys/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c index 012106c..7ab5800 100644 --- a/sys/amd64/linux32/linux32_systrace_args.c +++ b/sys/amd64/linux32/linux32_systrace_args.c @@ -2169,7 +2169,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) 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, int ndx, char *desc, size_t descsz) case 4: p = "l_sigset_t *"; break; + case 5: + p = "l_size_t"; + break; default: break; }; diff --git a/sys/amd64/linux32/syscalls.master b/sys/amd64/linux32/syscalls.master index b16e5a5..e1f2602c 100644 --- a/sys/amd64/linux32/syscalls.master +++ b/sys/amd64/linux32/syscalls.master @@ -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); } diff --git a/sys/compat/linux/linux_event.c b/sys/compat/linux/linux_event.c index 967fadb..f7471b2 100644 --- a/sys/compat/linux/linux_event.c +++ b/sys/compat/linux/linux_event.c @@ -622,6 +622,8 @@ linux_epoll_pwait(struct thread *td, struct linux_epoll_pwait_args *args) 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); diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h index cf98962..54dac5d 100644 --- a/sys/i386/linux/linux_proto.h +++ b/sys/i386/linux/linux_proto.h @@ -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)]; diff --git a/sys/i386/linux/linux_systrace_args.c b/sys/i386/linux/linux_systrace_args.c index 6b7dd2d..62a6cc7 100644 --- a/sys/i386/linux/linux_systrace_args.c +++ b/sys/i386/linux/linux_systrace_args.c @@ -2245,7 +2245,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) 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, int ndx, char *desc, size_t descsz) case 4: p = "l_sigset_t *"; break; + case 5: + p = "l_size_t"; + break; default: break; }; diff --git a/sys/i386/linux/syscalls.master b/sys/i386/linux/syscalls.master index 50c5a63..7ef682a 100644 --- a/sys/i386/linux/syscalls.master +++ b/sys/i386/linux/syscalls.master @@ -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); } |