diff options
author | Greg McGary <greg@mcgary.org> | 2000-09-08 08:41:45 +0000 |
---|---|---|
committer | Greg McGary <greg@mcgary.org> | 2000-09-08 08:41:45 +0000 |
commit | e694422de52750c6a0469e1be89fbf97d3ff8bf2 (patch) | |
tree | 0b2bcd452740874ce1ad25a55cb42af0efe141a7 /sysdeps/generic | |
parent | 9b4a6eac68b7997e93f0d09bfe703b7c429a8fee (diff) | |
download | glibc-e694422de52750c6a0469e1be89fbf97d3ff8bf2.tar.gz glibc-e694422de52750c6a0469e1be89fbf97d3ff8bf2.tar.xz glibc-e694422de52750c6a0469e1be89fbf97d3ff8bf2.zip |
* sysdeps/unix/sysv/linux/syscalls.list (mincore): Fix arg signature.
* sysdeps/unix/make-syscalls.sh: New signature keyletter `V'. * sysdeps/generic/bp-checks.h (CHECK_N_PAGES): New macro. 2000-09-08 Greg McGary <greg@mcgary.org> * sysdeps/unix/sysv/linux/syscalls.list (mincore): Fix arg signature. * sysdeps/unix/make-syscalls.sh: New signature keyletter `V'. * sysdeps/generic/bp-checks.h (CHECK_N_PAGES): New macro.
Diffstat (limited to 'sysdeps/generic')
-rw-r--r-- | sysdeps/generic/bp-checks.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sysdeps/generic/bp-checks.h b/sysdeps/generic/bp-checks.h index 01acf9f4ae..41ffad71e1 100644 --- a/sysdeps/generic/bp-checks.h +++ b/sysdeps/generic/bp-checks.h @@ -90,6 +90,14 @@ extern void *__unbounded __ubp_memchr (const void *__unbounded, int, unsigned); (((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_; \ @@ -113,6 +121,7 @@ extern void *__unbounded __ubp_memchr (const void *__unbounded, int, unsigned); # define CHECK_SIGSET_NULL_OK(SET) (SET) # 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__ */ |