diff options
author | Joseph Myers <joseph@codesourcery.com> | 2013-01-31 23:01:01 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2013-01-31 23:01:01 +0000 |
commit | f3499f95c8610364264479d42d455a79f15c4c86 (patch) | |
tree | eb67b3164ecca5a2b164fd7d6682e3941b427cd5 | |
parent | 32a45bea390b39e3be3cfa81c68a5892eaa539d2 (diff) | |
download | glibc-f3499f95c8610364264479d42d455a79f15c4c86.tar glibc-f3499f95c8610364264479d42d455a79f15c4c86.tar.gz glibc-f3499f95c8610364264479d42d455a79f15c4c86.tar.bz2 glibc-f3499f95c8610364264479d42d455a79f15c4c86.zip |
Remove CHECK_IOCTL, CHECK_FCNTL and CHECK_N_PAGES.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | sysdeps/generic/bp-checks.h | 27 |
2 files changed, 6 insertions, 27 deletions
@@ -1,6 +1,12 @@ 2013-01-31 Joseph Myers <joseph@codesourcery.com> [BZ #13550] + * sysdeps/generic/bp-checks.h (CHECK_IOCTL): Remove both + definitions. + (CHECK_FCNTL): Likewise. + (CHECK_N_PAGES): Likewise. + + [BZ #13550] * sysdeps/generic/bp-checks.h (CHECK_SIGSET): Remove both definitions. (CHECK_SIGSET_NULL_OK): Likewise. diff --git a/sysdeps/generic/bp-checks.h b/sysdeps/generic/bp-checks.h index 8933778c3a..9bfa433b0a 100644 --- a/sysdeps/generic/bp-checks.h +++ b/sysdeps/generic/bp-checks.h @@ -66,30 +66,6 @@ extern void *__unbounded __ubp_memchr (const void *__unbounded, int, unsigned); /* Same as CHECK_STRING, but tolerate ARG == NULL. */ # define CHECK_STRING_NULL_OK(ARG) _CHECK_STRING ((ARG), __ptrvalue (ARG)) -# if defined (_IOC_SIZESHIFT) && defined (_IOC_SIZEBITS) -/* Extract the size of the ioctl data and check its bounds. */ -# define CHECK_IOCTL(ARG, CMD) \ - CHECK_N ((const char *) (ARG), \ - (((CMD) >> _IOC_SIZESHIFT) & ((1 << _IOC_SIZEBITS) - 1))) -# else -/* We don't know the size of the ioctl data, so the best we can do - is check that the first byte is within bounds. */ -# define CHECK_IOCTL(ARG, CMD) CHECK_1 ((const char *) ARG) -# endif - -/* Check bounds of `struct flock *' for the locking fcntl commands. */ -# define CHECK_FCNTL(ARG, CMD) \ - (((CMD) == F_GETLK || (CMD) == F_SETLK || (CMD) == F_SETLKW) \ - ? CHECK_1 ((struct flock *) ARG) : (unsigned long) (ARG)) - -/* Check bounds of an array of mincore residency-status flags that - cover a region of NBYTES. Such a vector occupies one byte per page - of memory. */ -# define CHECK_N_PAGES(ARG, NBYTES) \ - ({ int _page_size_ = sysconf (_SC_PAGE_SIZE); \ - CHECK_N ((const char *) (ARG), \ - ((NBYTES) + _page_size_ - 1) / _page_size_); }) - /* Return a bounded pointer with value PTR that satisfies CHECK_N (PTR, N). */ # define BOUNDED_N(PTR, N) \ ({ __typeof (PTR) __bounded _p_; \ @@ -109,9 +85,6 @@ extern void *__unbounded __ubp_memchr (const void *__unbounded, int, unsigned); # define CHECK_N(ARG, N) (ARG) # define CHECK_N_NULL_OK(ARG, N) (ARG) # define CHECK_STRING(ARG) (ARG) -# define CHECK_IOCTL(ARG, CMD) (ARG) -# define CHECK_FCNTL(ARG, CMD) (ARG) -# define CHECK_N_PAGES(ARG, NBYTES) (ARG) # define BOUNDED_N(PTR, N) (PTR) #endif /* !__BOUNDED_POINTERS__ */ |