|
|
c6d234 |
commit 32a45bea390b39e3be3cfa81c68a5892eaa539d2
|
|
|
c6d234 |
Author: Joseph Myers <joseph@codesourcery.com>
|
|
|
c6d234 |
Date: Thu Jan 31 23:00:15 2013 +0000
|
|
|
c6d234 |
|
|
|
c6d234 |
Remove CHECK_SIGSET and CHECK_SIGSET_NULL_OK.
|
|
|
c6d234 |
|
|
|
c6d234 |
diff --git a/ports/sysdeps/unix/sysv/linux/ia64/sigpending.c b/ports/sysdeps/unix/sysv/linux/ia64/sigpending.c
|
|
|
c6d234 |
index 8d02643a151cb18c..c56147c97802108b 100644
|
|
|
c6d234 |
--- a/ports/sysdeps/unix/sysv/linux/ia64/sigpending.c
|
|
|
c6d234 |
+++ b/ports/sysdeps/unix/sysv/linux/ia64/sigpending.c
|
|
|
c6d234 |
@@ -24,7 +24,6 @@
|
|
|
c6d234 |
|
|
|
c6d234 |
#include <sysdep.h>
|
|
|
c6d234 |
#include <sys/syscall.h>
|
|
|
c6d234 |
-#include <bp-checks.h>
|
|
|
c6d234 |
|
|
|
c6d234 |
/* Change the set of blocked signals to SET,
|
|
|
c6d234 |
wait until a signal arrives, and restore the set of blocked signals. */
|
|
|
c6d234 |
@@ -34,5 +33,5 @@ sigpending (set)
|
|
|
c6d234 |
{
|
|
|
c6d234 |
/* XXX The size argument hopefully will have to be changed to the
|
|
|
c6d234 |
real size of the user-level sigset_t. */
|
|
|
c6d234 |
- return INLINE_SYSCALL (rt_sigpending, 2, CHECK_SIGSET (set), _NSIG / 8);
|
|
|
c6d234 |
+ return INLINE_SYSCALL (rt_sigpending, 2, set, _NSIG / 8);
|
|
|
c6d234 |
}
|
|
|
c6d234 |
diff --git a/ports/sysdeps/unix/sysv/linux/ia64/sigprocmask.c b/ports/sysdeps/unix/sysv/linux/ia64/sigprocmask.c
|
|
|
c6d234 |
index 8776c2000aca1945..97fd364073bfd4f4 100644
|
|
|
c6d234 |
--- a/ports/sysdeps/unix/sysv/linux/ia64/sigprocmask.c
|
|
|
c6d234 |
+++ b/ports/sysdeps/unix/sysv/linux/ia64/sigprocmask.c
|
|
|
c6d234 |
@@ -26,7 +26,6 @@
|
|
|
c6d234 |
|
|
|
c6d234 |
#include <sysdep.h>
|
|
|
c6d234 |
#include <sys/syscall.h>
|
|
|
c6d234 |
-#include <bp-checks.h>
|
|
|
c6d234 |
|
|
|
c6d234 |
/* Get and/or change the set of blocked signals. */
|
|
|
c6d234 |
int
|
|
|
c6d234 |
@@ -38,7 +37,6 @@ __sigprocmask (how, set, oset)
|
|
|
c6d234 |
|
|
|
c6d234 |
/* XXX The size argument hopefully will have to be changed to the
|
|
|
c6d234 |
real size of the user-level sigset_t. */
|
|
|
c6d234 |
- return INLINE_SYSCALL (rt_sigprocmask, 4, how, CHECK_SIGSET (set),
|
|
|
c6d234 |
- CHECK_SIGSET_NULL_OK (oset), _NSIG / 8);
|
|
|
c6d234 |
+ return INLINE_SYSCALL (rt_sigprocmask, 4, how, set, oset, _NSIG / 8);
|
|
|
c6d234 |
}
|
|
|
c6d234 |
weak_alias (__sigprocmask, sigprocmask)
|
|
|
c6d234 |
diff --git a/sysdeps/generic/bp-checks.h b/sysdeps/generic/bp-checks.h
|
|
|
c6d234 |
index f007eee12db8543c..86f998ae69feb81f 100644
|
|
|
c6d234 |
--- a/sysdeps/generic/bp-checks.h
|
|
|
c6d234 |
+++ b/sysdeps/generic/bp-checks.h
|
|
|
c6d234 |
@@ -66,11 +66,6 @@ extern void *__unbounded __ubp_memchr (const void *__unbounded, int, unsigned);
|
|
|
c6d234 |
/* Same as CHECK_STRING, but tolerate ARG == NULL. */
|
|
|
c6d234 |
# define CHECK_STRING_NULL_OK(ARG) _CHECK_STRING ((ARG), __ptrvalue (ARG))
|
|
|
c6d234 |
|
|
|
c6d234 |
-/* Check bounds of signal syscall args with type sigset_t. */
|
|
|
c6d234 |
-# define CHECK_SIGSET(SET) CHECK_N ((SET), _NSIG / (8 * sizeof *(SET)))
|
|
|
c6d234 |
-/* Same as CHECK_SIGSET, but tolerate SET == NULL. */
|
|
|
c6d234 |
-# define CHECK_SIGSET_NULL_OK(SET) CHECK_N_NULL_OK ((SET), _NSIG / (8 * sizeof *(SET)))
|
|
|
c6d234 |
-
|
|
|
c6d234 |
# if defined (_IOC_SIZESHIFT) && defined (_IOC_SIZEBITS)
|
|
|
c6d234 |
/* Extract the size of the ioctl data and check its bounds. */
|
|
|
c6d234 |
# define CHECK_IOCTL(ARG, CMD) \
|
|
|
c6d234 |
@@ -114,8 +109,6 @@ extern void *__unbounded __ubp_memchr (const void *__unbounded, int, unsigned);
|
|
|
c6d234 |
# define CHECK_N(ARG, N) (ARG)
|
|
|
c6d234 |
# define CHECK_N_NULL_OK(ARG, N) (ARG)
|
|
|
c6d234 |
# define CHECK_STRING(ARG) (ARG)
|
|
|
c6d234 |
-# define CHECK_SIGSET(SET) (SET)
|
|
|
c6d234 |
-# define CHECK_SIGSET_NULL_OK(SET) (SET)
|
|
|
c6d234 |
# define CHECK_IOCTL(ARG, CMD) (ARG)
|
|
|
c6d234 |
# define CHECK_FCNTL(ARG, CMD) (ARG)
|
|
|
c6d234 |
# define CHECK_N_PAGES(ARG, NBYTES) (ARG)
|
|
|
c6d234 |
diff --git a/sysdeps/unix/sysv/linux/sigpending.c b/sysdeps/unix/sysv/linux/sigpending.c
|
|
|
c6d234 |
index 7174b4ae3a791f86..bd6126143923ab8e 100644
|
|
|
c6d234 |
--- a/sysdeps/unix/sysv/linux/sigpending.c
|
|
|
c6d234 |
+++ b/sysdeps/unix/sysv/linux/sigpending.c
|
|
|
c6d234 |
@@ -21,7 +21,6 @@
|
|
|
c6d234 |
|
|
|
c6d234 |
#include <sysdep.h>
|
|
|
c6d234 |
#include <sys/syscall.h>
|
|
|
c6d234 |
-#include <bp-checks.h>
|
|
|
c6d234 |
|
|
|
c6d234 |
#include <kernel-features.h>
|
|
|
c6d234 |
|
|
|
c6d234 |
@@ -32,5 +31,5 @@ int
|
|
|
c6d234 |
sigpending (set)
|
|
|
c6d234 |
sigset_t *set;
|
|
|
c6d234 |
{
|
|
|
c6d234 |
- return INLINE_SYSCALL (rt_sigpending, 2, CHECK_SIGSET (set), _NSIG / 8);
|
|
|
c6d234 |
+ return INLINE_SYSCALL (rt_sigpending, 2, set, _NSIG / 8);
|
|
|
c6d234 |
}
|
|
|
c6d234 |
diff --git a/sysdeps/unix/sysv/linux/sigprocmask.c b/sysdeps/unix/sysv/linux/sigprocmask.c
|
|
|
c6d234 |
index a5ac4dd501964dff..8d69613049c9629c 100644
|
|
|
c6d234 |
--- a/sysdeps/unix/sysv/linux/sigprocmask.c
|
|
|
c6d234 |
+++ b/sysdeps/unix/sysv/linux/sigprocmask.c
|
|
|
c6d234 |
@@ -22,7 +22,6 @@
|
|
|
c6d234 |
|
|
|
c6d234 |
#include <sysdep.h>
|
|
|
c6d234 |
#include <sys/syscall.h>
|
|
|
c6d234 |
-#include <bp-checks.h>
|
|
|
c6d234 |
|
|
|
c6d234 |
#include <kernel-features.h>
|
|
|
c6d234 |
|
|
|
c6d234 |
@@ -55,7 +54,6 @@ __sigprocmask (how, set, oset)
|
|
|
c6d234 |
}
|
|
|
c6d234 |
#endif
|
|
|
c6d234 |
|
|
|
c6d234 |
- return INLINE_SYSCALL (rt_sigprocmask, 4, how, CHECK_SIGSET_NULL_OK (set),
|
|
|
c6d234 |
- CHECK_SIGSET_NULL_OK (oset), _NSIG / 8);
|
|
|
c6d234 |
+ return INLINE_SYSCALL (rt_sigprocmask, 4, how, set, oset, _NSIG / 8);
|
|
|
c6d234 |
}
|
|
|
c6d234 |
weak_alias (__sigprocmask, sigprocmask)
|
|
|
c6d234 |
diff --git a/sysdeps/unix/sysv/linux/sigsuspend.c b/sysdeps/unix/sysv/linux/sigsuspend.c
|
|
|
c6d234 |
index e1ee87b29fa258ee..c673cf2b65cfe7ea 100644
|
|
|
c6d234 |
--- a/sysdeps/unix/sysv/linux/sigsuspend.c
|
|
|
c6d234 |
+++ b/sysdeps/unix/sysv/linux/sigsuspend.c
|
|
|
c6d234 |
@@ -21,7 +21,6 @@
|
|
|
c6d234 |
|
|
|
c6d234 |
#include <sysdep-cancel.h>
|
|
|
c6d234 |
#include <sys/syscall.h>
|
|
|
c6d234 |
-#include <bp-checks.h>
|
|
|
c6d234 |
|
|
|
c6d234 |
#include <kernel-features.h>
|
|
|
c6d234 |
|
|
|
c6d234 |
@@ -29,7 +28,7 @@
|
|
|
c6d234 |
static inline int __attribute__ ((always_inline))
|
|
|
c6d234 |
do_sigsuspend (const sigset_t *set)
|
|
|
c6d234 |
{
|
|
|
c6d234 |
- return INLINE_SYSCALL (rt_sigsuspend, 2, CHECK_SIGSET (set), _NSIG / 8);
|
|
|
c6d234 |
+ return INLINE_SYSCALL (rt_sigsuspend, 2, set, _NSIG / 8);
|
|
|
c6d234 |
}
|
|
|
c6d234 |
|
|
|
c6d234 |
/* Change the set of blocked signals to SET,
|
|
|
c6d234 |
diff --git a/sysdeps/unix/sysv/linux/sigtimedwait.c b/sysdeps/unix/sysv/linux/sigtimedwait.c
|
|
|
c6d234 |
index 8686b9a66bd99738..34834c0cb1f9e362 100644
|
|
|
c6d234 |
--- a/sysdeps/unix/sysv/linux/sigtimedwait.c
|
|
|
c6d234 |
+++ b/sysdeps/unix/sysv/linux/sigtimedwait.c
|
|
|
c6d234 |
@@ -51,7 +51,7 @@ do_sigtimedwait (const sigset_t *set, siginfo_t *info,
|
|
|
c6d234 |
|
|
|
c6d234 |
/* XXX The size argument hopefully will have to be changed to the
|
|
|
c6d234 |
real size of the user-level sigset_t. */
|
|
|
c6d234 |
- int result = INLINE_SYSCALL (rt_sigtimedwait, 4, CHECK_SIGSET (set),
|
|
|
c6d234 |
+ int result = INLINE_SYSCALL (rt_sigtimedwait, 4, set,
|
|
|
c6d234 |
CHECK_1 (info), timeout, _NSIG / 8);
|
|
|
c6d234 |
|
|
|
c6d234 |
/* The kernel generates a SI_TKILL code in si_code in case tkill is
|
|
|
c6d234 |
diff --git a/sysdeps/unix/sysv/linux/sigwait.c b/sysdeps/unix/sysv/linux/sigwait.c
|
|
|
c6d234 |
index a304ed978bcdbd1d..5e7d8ca8c8a62f19 100644
|
|
|
c6d234 |
--- a/sysdeps/unix/sysv/linux/sigwait.c
|
|
|
c6d234 |
+++ b/sysdeps/unix/sysv/linux/sigwait.c
|
|
|
c6d234 |
@@ -23,7 +23,6 @@
|
|
|
c6d234 |
|
|
|
c6d234 |
#include <sysdep-cancel.h>
|
|
|
c6d234 |
#include <sys/syscall.h>
|
|
|
c6d234 |
-#include <bp-checks.h>
|
|
|
c6d234 |
|
|
|
c6d234 |
#ifdef __NR_rt_sigtimedwait
|
|
|
c6d234 |
|
|
|
c6d234 |
@@ -58,7 +57,7 @@ do_sigwait (const sigset_t *set, int *sig)
|
|
|
c6d234 |
#ifdef INTERNAL_SYSCALL
|
|
|
c6d234 |
INTERNAL_SYSCALL_DECL (err);
|
|
|
c6d234 |
do
|
|
|
c6d234 |
- ret = INTERNAL_SYSCALL (rt_sigtimedwait, err, 4, CHECK_SIGSET (set),
|
|
|
c6d234 |
+ ret = INTERNAL_SYSCALL (rt_sigtimedwait, err, 4, set,
|
|
|
c6d234 |
NULL, NULL, _NSIG / 8);
|
|
|
c6d234 |
while (INTERNAL_SYSCALL_ERROR_P (ret, err)
|
|
|
c6d234 |
&& INTERNAL_SYSCALL_ERRNO (ret, err) == EINTR);
|
|
|
c6d234 |
@@ -71,8 +70,7 @@ do_sigwait (const sigset_t *set, int *sig)
|
|
|
c6d234 |
ret = INTERNAL_SYSCALL_ERRNO (ret, err);
|
|
|
c6d234 |
#else
|
|
|
c6d234 |
do
|
|
|
c6d234 |
- ret = INLINE_SYSCALL (rt_sigtimedwait, 4, CHECK_SIGSET (set),
|
|
|
c6d234 |
- NULL, NULL, _NSIG / 8);
|
|
|
c6d234 |
+ ret = INLINE_SYSCALL (rt_sigtimedwait, 4, set, NULL, NULL, _NSIG / 8);
|
|
|
c6d234 |
while (ret == -1 && errno == EINTR);
|
|
|
c6d234 |
if (ret != -1)
|
|
|
c6d234 |
{
|
|
|
c6d234 |
diff --git a/sysdeps/unix/sysv/linux/sigwaitinfo.c b/sysdeps/unix/sysv/linux/sigwaitinfo.c
|
|
|
c6d234 |
index 9f2b1d40c941bbfc..f70386a31bce66bd 100644
|
|
|
c6d234 |
--- a/sysdeps/unix/sysv/linux/sigwaitinfo.c
|
|
|
c6d234 |
+++ b/sysdeps/unix/sysv/linux/sigwaitinfo.c
|
|
|
c6d234 |
@@ -52,7 +52,7 @@ do_sigwaitinfo (const sigset_t *set, siginfo_t *info)
|
|
|
c6d234 |
|
|
|
c6d234 |
/* XXX The size argument hopefully will have to be changed to the
|
|
|
c6d234 |
real size of the user-level sigset_t. */
|
|
|
c6d234 |
- int result = INLINE_SYSCALL (rt_sigtimedwait, 4, CHECK_SIGSET (set),
|
|
|
c6d234 |
+ int result = INLINE_SYSCALL (rt_sigtimedwait, 4, set,
|
|
|
c6d234 |
CHECK_1 (info), NULL, _NSIG / 8);
|
|
|
c6d234 |
|
|
|
c6d234 |
/* The kernel generates a SI_TKILL code in si_code in case tkill is
|
|
|
c6d234 |
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/sigpending.c b/sysdeps/unix/sysv/linux/sparc/sparc64/sigpending.c
|
|
|
c6d234 |
index 011aa2ab3964b887..7548435ca29ae294 100644
|
|
|
c6d234 |
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/sigpending.c
|
|
|
c6d234 |
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/sigpending.c
|
|
|
c6d234 |
@@ -21,7 +21,6 @@
|
|
|
c6d234 |
|
|
|
c6d234 |
#include <sysdep.h>
|
|
|
c6d234 |
#include <sys/syscall.h>
|
|
|
c6d234 |
-#include <bp-checks.h>
|
|
|
c6d234 |
|
|
|
c6d234 |
/* Change the set of blocked signals to SET,
|
|
|
c6d234 |
wait until a signal arrives, and restore the set of blocked signals. */
|
|
|
c6d234 |
@@ -31,5 +30,5 @@ sigpending (set)
|
|
|
c6d234 |
{
|
|
|
c6d234 |
/* XXX The size argument hopefully will have to be changed to the
|
|
|
c6d234 |
real size of the user-level sigset_t. */
|
|
|
c6d234 |
- return INLINE_SYSCALL (rt_sigpending, 2, CHECK_SIGSET (set), _NSIG / 8);
|
|
|
c6d234 |
+ return INLINE_SYSCALL (rt_sigpending, 2, set, _NSIG / 8);
|
|
|
c6d234 |
}
|
|
|
c6d234 |
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/sigprocmask.c b/sysdeps/unix/sysv/linux/sparc/sparc64/sigprocmask.c
|
|
|
c6d234 |
index 7622c0a28ca0d04a..60f95b4f554d7966 100644
|
|
|
c6d234 |
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/sigprocmask.c
|
|
|
c6d234 |
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/sigprocmask.c
|
|
|
c6d234 |
@@ -21,7 +21,6 @@
|
|
|
c6d234 |
|
|
|
c6d234 |
#include <sysdep.h>
|
|
|
c6d234 |
#include <sys/syscall.h>
|
|
|
c6d234 |
-#include <bp-checks.h>
|
|
|
c6d234 |
|
|
|
c6d234 |
/* Get and/or change the set of blocked signals. */
|
|
|
c6d234 |
int
|
|
|
c6d234 |
@@ -32,7 +31,6 @@ __sigprocmask (how, set, oset)
|
|
|
c6d234 |
{
|
|
|
c6d234 |
/* XXX The size argument hopefully will have to be changed to the
|
|
|
c6d234 |
real size of the user-level sigset_t. */
|
|
|
c6d234 |
- return INLINE_SYSCALL (rt_sigprocmask, 4, how, CHECK_SIGSET (set),
|
|
|
c6d234 |
- CHECK_SIGSET_NULL_OK (oset), _NSIG / 8);
|
|
|
c6d234 |
+ return INLINE_SYSCALL (rt_sigprocmask, 4, how, set, oset, _NSIG / 8);
|
|
|
c6d234 |
}
|
|
|
c6d234 |
weak_alias (__sigprocmask, sigprocmask)
|
|
|
c6d234 |
diff --git a/sysdeps/unix/sysv/linux/x86_64/sigpending.c b/sysdeps/unix/sysv/linux/x86_64/sigpending.c
|
|
|
c6d234 |
index b3f2547b137847d3..7e448c0327cbcd19 100644
|
|
|
c6d234 |
--- a/sysdeps/unix/sysv/linux/x86_64/sigpending.c
|
|
|
c6d234 |
+++ b/sysdeps/unix/sysv/linux/x86_64/sigpending.c
|
|
|
c6d234 |
@@ -24,7 +24,6 @@
|
|
|
c6d234 |
|
|
|
c6d234 |
#include <sysdep.h>
|
|
|
c6d234 |
#include <sys/syscall.h>
|
|
|
c6d234 |
-#include <bp-checks.h>
|
|
|
c6d234 |
|
|
|
c6d234 |
/* Change the set of blocked signals to SET,
|
|
|
c6d234 |
wait until a signal arrives, and restore the set of blocked signals. */
|
|
|
c6d234 |
@@ -34,5 +33,5 @@ sigpending (set)
|
|
|
c6d234 |
{
|
|
|
c6d234 |
/* XXX The size argument hopefully will have to be changed to the
|
|
|
c6d234 |
real size of the user-level sigset_t. */
|
|
|
c6d234 |
- return INLINE_SYSCALL (rt_sigpending, 2, CHECK_SIGSET (set), _NSIG / 8);
|
|
|
c6d234 |
+ return INLINE_SYSCALL (rt_sigpending, 2, set, _NSIG / 8);
|
|
|
c6d234 |
}
|
|
|
c6d234 |
diff --git a/sysdeps/unix/sysv/linux/x86_64/sigprocmask.c b/sysdeps/unix/sysv/linux/x86_64/sigprocmask.c
|
|
|
c6d234 |
index 9f05e4a5d306839f..210fd97f9f33521e 100644
|
|
|
c6d234 |
--- a/sysdeps/unix/sysv/linux/x86_64/sigprocmask.c
|
|
|
c6d234 |
+++ b/sysdeps/unix/sysv/linux/x86_64/sigprocmask.c
|
|
|
c6d234 |
@@ -25,7 +25,6 @@
|
|
|
c6d234 |
|
|
|
c6d234 |
#include <sysdep.h>
|
|
|
c6d234 |
#include <sys/syscall.h>
|
|
|
c6d234 |
-#include <bp-checks.h>
|
|
|
c6d234 |
|
|
|
c6d234 |
/* Get and/or change the set of blocked signals. */
|
|
|
c6d234 |
int
|
|
|
c6d234 |
@@ -37,7 +36,6 @@ __sigprocmask (how, set, oset)
|
|
|
c6d234 |
|
|
|
c6d234 |
/* XXX The size argument hopefully will have to be changed to the
|
|
|
c6d234 |
real size of the user-level sigset_t. */
|
|
|
c6d234 |
- return INLINE_SYSCALL (rt_sigprocmask, 4, how, CHECK_SIGSET (set),
|
|
|
c6d234 |
- CHECK_SIGSET_NULL_OK (oset), _NSIG / 8);
|
|
|
c6d234 |
+ return INLINE_SYSCALL (rt_sigprocmask, 4, how, set, oset, _NSIG / 8);
|
|
|
c6d234 |
}
|
|
|
c6d234 |
weak_alias (__sigprocmask, sigprocmask)
|