summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authordchagin <dchagin@FreeBSD.org>2017-03-30 20:08:25 +0000
committerdchagin <dchagin@FreeBSD.org>2017-03-30 20:08:25 +0000
commit9a78265c32475a07e7c0b167183d65908ac80eef (patch)
tree3f66dea791d83ca5e79e5699fb2ec09f1eb67db2 /sys/amd64
parent5b761cd12823827d9fe7fa1c6304d79bd41e4528 (diff)
downloadFreeBSD-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/amd64')
-rw-r--r--sys/amd64/linux/linux_proto.h1
-rw-r--r--sys/amd64/linux/linux_systrace_args.c6
-rw-r--r--sys/amd64/linux/syscalls.master3
-rw-r--r--sys/amd64/linux32/linux32_proto.h1
-rw-r--r--sys/amd64/linux32/linux32_systrace_args.c6
-rw-r--r--sys/amd64/linux32/syscalls.master3
6 files changed, 16 insertions, 4 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); }
OpenPOWER on IntegriCloud