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