|
|
25845f |
commit f3499f95c8610364264479d42d455a79f15c4c86
|
|
|
25845f |
Author: Joseph Myers <joseph@codesourcery.com>
|
|
|
25845f |
Date: Thu Jan 31 23:01:01 2013 +0000
|
|
|
25845f |
|
|
|
25845f |
Remove CHECK_IOCTL, CHECK_FCNTL and CHECK_N_PAGES.
|
|
|
25845f |
|
|
|
25845f |
diff --git a/sysdeps/generic/bp-checks.h b/sysdeps/generic/bp-checks.h
|
|
|
25845f |
index 86f998ae69feb81f..d43e299d4dc06b6b 100644
|
|
|
25845f |
--- a/sysdeps/generic/bp-checks.h
|
|
|
25845f |
+++ b/sysdeps/generic/bp-checks.h
|
|
|
25845f |
@@ -66,30 +66,6 @@ extern void *__unbounded __ubp_memchr (const void *__unbounded, int, unsigned);
|
|
|
25845f |
/* Same as CHECK_STRING, but tolerate ARG == NULL. */
|
|
|
25845f |
# define CHECK_STRING_NULL_OK(ARG) _CHECK_STRING ((ARG), __ptrvalue (ARG))
|
|
|
25845f |
|
|
|
25845f |
-# if defined (_IOC_SIZESHIFT) && defined (_IOC_SIZEBITS)
|
|
|
25845f |
-/* Extract the size of the ioctl data and check its bounds. */
|
|
|
25845f |
-# define CHECK_IOCTL(ARG, CMD) \
|
|
|
25845f |
- CHECK_N ((const char *) (ARG), \
|
|
|
25845f |
- (((CMD) >> _IOC_SIZESHIFT) & ((1 << _IOC_SIZEBITS) - 1)))
|
|
|
25845f |
-# else
|
|
|
25845f |
-/* We don't know the size of the ioctl data, so the best we can do
|
|
|
25845f |
- is check that the first byte is within bounds. */
|
|
|
25845f |
-# define CHECK_IOCTL(ARG, CMD) CHECK_1 ((const char *) ARG)
|
|
|
25845f |
-# endif
|
|
|
25845f |
-
|
|
|
25845f |
-/* Check bounds of `struct flock *' for the locking fcntl commands. */
|
|
|
25845f |
-# define CHECK_FCNTL(ARG, CMD) \
|
|
|
25845f |
- (((CMD) == F_GETLK || (CMD) == F_SETLK || (CMD) == F_SETLKW) \
|
|
|
25845f |
- ? CHECK_1 ((struct flock *) ARG) : (unsigned long) (ARG))
|
|
|
25845f |
-
|
|
|
25845f |
-/* Check bounds of an array of mincore residency-status flags that
|
|
|
25845f |
- cover a region of NBYTES. Such a vector occupies one byte per page
|
|
|
25845f |
- of memory. */
|
|
|
25845f |
-# define CHECK_N_PAGES(ARG, NBYTES) \
|
|
|
25845f |
- ({ int _page_size_ = sysconf (_SC_PAGE_SIZE); \
|
|
|
25845f |
- CHECK_N ((const char *) (ARG), \
|
|
|
25845f |
- ((NBYTES) + _page_size_ - 1) / _page_size_); })
|
|
|
25845f |
-
|
|
|
25845f |
/* Return a bounded pointer with value PTR that satisfies CHECK_N (PTR, N). */
|
|
|
25845f |
# define BOUNDED_N(PTR, N) \
|
|
|
25845f |
({ __typeof (PTR) __bounded _p_; \
|
|
|
25845f |
@@ -109,9 +85,6 @@ extern void *__unbounded __ubp_memchr (const void *__unbounded, int, unsigned);
|
|
|
25845f |
# define CHECK_N(ARG, N) (ARG)
|
|
|
25845f |
# define CHECK_N_NULL_OK(ARG, N) (ARG)
|
|
|
25845f |
# define CHECK_STRING(ARG) (ARG)
|
|
|
25845f |
-# define CHECK_IOCTL(ARG, CMD) (ARG)
|
|
|
25845f |
-# define CHECK_FCNTL(ARG, CMD) (ARG)
|
|
|
25845f |
-# define CHECK_N_PAGES(ARG, NBYTES) (ARG)
|
|
|
25845f |
# define BOUNDED_N(PTR, N) (PTR)
|
|
|
25845f |
|
|
|
25845f |
#endif /* !__BOUNDED_POINTERS__ */
|