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