about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/bp-checks.h49
-rw-r--r--sysdeps/unix/sysv/linux/getdents.c9
-rw-r--r--sysdeps/unix/sysv/linux/i386/brk.c2
-rw-r--r--sysdeps/unix/sysv/linux/i386/getgroups.c3
-rw-r--r--sysdeps/unix/sysv/linux/i386/setgroups.c3
-rw-r--r--sysdeps/unix/sysv/linux/mmap64.c1
-rw-r--r--sysdeps/unix/sysv/linux/msgrcv.c4
-rw-r--r--sysdeps/unix/sysv/linux/msgsnd.c6
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c5
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c5
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c5
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c5
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c7
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c7
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c7
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c7
-rw-r--r--sysdeps/unix/sysv/linux/pread.c3
-rw-r--r--sysdeps/unix/sysv/linux/pread64.c3
-rw-r--r--sysdeps/unix/sysv/linux/pwrite.c3
-rw-r--r--sysdeps/unix/sysv/linux/pwrite64.c3
-rw-r--r--sysdeps/unix/sysv/linux/readv.c5
-rw-r--r--sysdeps/unix/sysv/linux/semop.c4
-rw-r--r--sysdeps/unix/sysv/linux/semtimedop.c3
-rw-r--r--sysdeps/unix/sysv/linux/sh/pread.c5
-rw-r--r--sysdeps/unix/sysv/linux/sh/pread64.c5
-rw-r--r--sysdeps/unix/sysv/linux/sh/pwrite.c5
-rw-r--r--sysdeps/unix/sysv/linux/sh/pwrite64.c5
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/msgrcv.c6
-rw-r--r--sysdeps/unix/sysv/linux/sysctl.c5
-rw-r--r--sysdeps/unix/sysv/linux/writev.c5
30 files changed, 44 insertions, 141 deletions
diff --git a/sysdeps/generic/bp-checks.h b/sysdeps/generic/bp-checks.h
deleted file mode 100644
index 162f785187..0000000000
--- a/sysdeps/generic/bp-checks.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Bounded-pointer checking macros for C.
-   Copyright (C) 2000-2013 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Greg McGary <greg@mcgary.org>
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _bp_checks_h_
-#define _bp_checks_h_ 1
-
-#if __BOUNDED_POINTERS__
-
-# define BOUNDS_VIOLATED (__builtin_trap (), 0)
-
-# define _CHECK_N(ARG, N, COND)				\
-  (((COND)						\
-    && (__ptrvalue (ARG) < __ptrlow (ARG)		\
-	|| __ptrvalue (ARG) + (N) > __ptrhigh (ARG))	\
-    && BOUNDS_VIOLATED),				\
-   __ptrvalue (ARG))
-
-/* Check bounds of a pointer seated to an array of N objects.  */
-# define CHECK_N(ARG, N) _CHECK_N ((ARG), (N), 1)
-/* Same as CHECK_N, but tolerate ARG == NULL.  */
-# define CHECK_N_NULL_OK(ARG, N) _CHECK_N ((ARG), (N), __ptrvalue (ARG))
-
-#else /* !__BOUNDED_POINTERS__ */
-
-/* Do nothing if not compiling with -fbounded-pointers.  */
-
-# define BOUNDS_VIOLATED
-# define CHECK_N(ARG, N) (ARG)
-# define CHECK_N_NULL_OK(ARG, N) (ARG)
-
-#endif /* !__BOUNDED_POINTERS__ */
-
-#endif /* _bp_checks_h_ */
diff --git a/sysdeps/unix/sysv/linux/getdents.c b/sysdeps/unix/sysv/linux/getdents.c
index eebdee8eca..2d588a6021 100644
--- a/sysdeps/unix/sysv/linux/getdents.c
+++ b/sysdeps/unix/sysv/linux/getdents.c
@@ -28,7 +28,6 @@
 
 #include <sysdep.h>
 #include <sys/syscall.h>
-#include <bp-checks.h>
 
 #include <linux/posix_types.h>
 
@@ -109,7 +108,7 @@ __GETDENTS (int fd, char *buf, size_t nbytes)
       && (offsetof (struct kernel_dirent, d_reclen)
 	  == offsetof (struct dirent, d_reclen)))
     {
-      retval = INLINE_SYSCALL (getdents, 3, fd, CHECK_N(buf, nbytes), nbytes);
+      retval = INLINE_SYSCALL (getdents, 3, fd, buf, nbytes);
 
       /* The kernel added the d_type value after the name.  Change
 	 this now.  */
@@ -158,8 +157,7 @@ __GETDENTS (int fd, char *buf, size_t nbytes)
 		   - offsetof (DIRENT_TYPE, d_name);
 	  kbuf = __alloca(kbytes);
 	}
-      retval = INLINE_SYSCALL (getdents64, 3, fd, CHECK_N(kbuf, kbytes),
-			       kbytes);
+      retval = INLINE_SYSCALL (getdents64, 3, fd, kbuf, kbytes);
 # ifndef __ASSUME_GETDENTS64_SYSCALL
       if (retval != -1 || (errno != EINVAL && errno != ENOSYS))
 # endif
@@ -255,8 +253,7 @@ __GETDENTS (int fd, char *buf, size_t nbytes)
 
     skdp = kdp = __alloca (red_nbytes);
 
-    retval = INLINE_SYSCALL (getdents, 3, fd,
-			     CHECK_N ((char *) kdp, red_nbytes), red_nbytes);
+    retval = INLINE_SYSCALL (getdents, 3, fd, (char *) kdp, red_nbytes);
 
     if (retval == -1)
       return -1;
diff --git a/sysdeps/unix/sysv/linux/i386/brk.c b/sysdeps/unix/sysv/linux/i386/brk.c
index eea4e02b0e..47bb01d7fa 100644
--- a/sysdeps/unix/sysv/linux/i386/brk.c
+++ b/sysdeps/unix/sysv/linux/i386/brk.c
@@ -20,8 +20,6 @@
 #include <unistd.h>
 #include <sysdep.h>
 
-#include <bp-checks.h>
-
 /* This must be initialized data because commons can't have aliases.  */
 void *__curbrk = 0;
 
diff --git a/sysdeps/unix/sysv/linux/i386/getgroups.c b/sysdeps/unix/sysv/linux/i386/getgroups.c
index c7e44fd03b..7d85f8f39b 100644
--- a/sysdeps/unix/sysv/linux/i386/getgroups.c
+++ b/sysdeps/unix/sysv/linux/i386/getgroups.c
@@ -22,7 +22,6 @@
 
 #include <sysdep.h>
 #include <sys/syscall.h>
-#include <bp-checks.h>
 
 #include <linux/posix_types.h>
 
@@ -34,7 +33,7 @@
 int
 __getgroups (int n, gid_t *groups)
 {
-  return INLINE_SYSCALL (getgroups32, 2, n, CHECK_N (groups, n));
+  return INLINE_SYSCALL (getgroups32, 2, n, groups);
 }
 
 weak_alias (__getgroups, getgroups)
diff --git a/sysdeps/unix/sysv/linux/i386/setgroups.c b/sysdeps/unix/sysv/linux/i386/setgroups.c
index c0895a19b0..701ce6ee7b 100644
--- a/sysdeps/unix/sysv/linux/i386/setgroups.c
+++ b/sysdeps/unix/sysv/linux/i386/setgroups.c
@@ -22,7 +22,6 @@
 
 #include <sysdep.h>
 #include <sys/syscall.h>
-#include <bp-checks.h>
 
 #include <setxid.h>
 #include <linux/posix_types.h>
@@ -33,6 +32,6 @@
 int
 setgroups (size_t n, const gid_t *groups)
 {
-  return INLINE_SETXID_SYSCALL (setgroups32, 2, n, CHECK_N (groups, n));
+  return INLINE_SETXID_SYSCALL (setgroups32, 2, n, groups);
 }
 libc_hidden_def (setgroups)
diff --git a/sysdeps/unix/sysv/linux/mmap64.c b/sysdeps/unix/sysv/linux/mmap64.c
index 7d94c1db9a..a424092ae3 100644
--- a/sysdeps/unix/sysv/linux/mmap64.c
+++ b/sysdeps/unix/sysv/linux/mmap64.c
@@ -22,7 +22,6 @@
 
 #include <sysdep.h>
 #include <sys/syscall.h>
-#include <bp-checks.h>
 
 #include <kernel-features.h>
 
diff --git a/sysdeps/unix/sysv/linux/msgrcv.c b/sysdeps/unix/sysv/linux/msgrcv.c
index f9b399ebd8..edf81a53d3 100644
--- a/sysdeps/unix/sysv/linux/msgrcv.c
+++ b/sysdeps/unix/sysv/linux/msgrcv.c
@@ -23,8 +23,6 @@
 #include <sysdep-cancel.h>
 #include <sys/syscall.h>
 
-#include <bp-checks.h>
-
 /* Kludge to work around Linux' restriction of only up to five
    arguments to a system call.  */
 struct ipc_kludge
@@ -46,7 +44,7 @@ __libc_msgrcv (msqid, msgp, msgsz, msgtyp, msgflg)
      fives parameters to a system call.  */
   struct ipc_kludge tmp;
 
-  tmp.msgp = CHECK_N (msgp, msgsz);
+  tmp.msgp = msgp;
   tmp.msgtyp = msgtyp;
 
   if (SINGLE_THREAD_P)
diff --git a/sysdeps/unix/sysv/linux/msgsnd.c b/sysdeps/unix/sysv/linux/msgsnd.c
index 853ea91741..556159b327 100644
--- a/sysdeps/unix/sysv/linux/msgsnd.c
+++ b/sysdeps/unix/sysv/linux/msgsnd.c
@@ -23,8 +23,6 @@
 #include <sysdep-cancel.h>
 #include <sys/syscall.h>
 
-#include <bp-checks.h>
-
 int
 __libc_msgsnd (msqid, msgp, msgsz, msgflg)
      int msqid;
@@ -34,12 +32,12 @@ __libc_msgsnd (msqid, msgp, msgsz, msgflg)
 {
   if (SINGLE_THREAD_P)
     return INLINE_SYSCALL (ipc, 5, IPCOP_msgsnd, msqid, msgsz,
-			   msgflg, (void *) CHECK_N (msgp, msgsz));
+			   msgflg, (void *) msgp);
 
   int oldtype = LIBC_CANCEL_ASYNC ();
 
   int result = INLINE_SYSCALL (ipc, 5, IPCOP_msgsnd, msqid, msgsz,
-			       msgflg, (void *) CHECK_N (msgp, msgsz));
+			       msgflg, (void *) msgp);
 
   LIBC_CANCEL_RESET (oldtype);
 
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c
index 3695d8fb9a..619db32618 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c
@@ -22,7 +22,6 @@
 
 #include <sysdep-cancel.h>
 #include <sys/syscall.h>
-#include <bp-checks.h>
 
 #include <kernel-features.h>
 
@@ -38,7 +37,7 @@ __libc_pread (fd, buf, count, offset)
   if (SINGLE_THREAD_P)
     {
       /* On PPC32 64bit values are aligned in odd/even register pairs.  */
-      result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count,
+      result = INLINE_SYSCALL (pread, 6, fd, buf, count,
 			       0, offset >> 31, offset);
 
       return result;
@@ -47,7 +46,7 @@ __libc_pread (fd, buf, count, offset)
   int oldtype = LIBC_CANCEL_ASYNC ();
 
   /* On PPC32 64bit values are aligned in odd/even register pairs.  */
-  result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count,
+  result = INLINE_SYSCALL (pread, 6, fd, buf, count,
 			       0, offset >> 31, offset);
 
   LIBC_CANCEL_RESET (oldtype);
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c
index 12e83aa95b..75407b3165 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c
@@ -21,7 +21,6 @@
 
 #include <sysdep-cancel.h>
 #include <sys/syscall.h>
-#include <bp-checks.h>
 
 #include <kernel-features.h>
 
@@ -38,7 +37,7 @@ __libc_pread64 (fd, buf, count, offset)
   if (SINGLE_THREAD_P)
     {
       /* On PPC32 64bit values are aligned in odd/even register pairs.  */
-      result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count,
+      result = INLINE_SYSCALL (pread, 6, fd, buf, count,
 			       0, (long) (offset >> 32),
 			       (long) offset);
 
@@ -48,7 +47,7 @@ __libc_pread64 (fd, buf, count, offset)
   int oldtype = LIBC_CANCEL_ASYNC ();
 
   /* On PPC32 64bit values are aligned in odd/even register pairs.  */
-  result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count,
+  result = INLINE_SYSCALL (pread, 6, fd, buf, count,
 			   0, (long) (offset >> 32),
 			   (long) offset);
 
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c
index 005e24f964..e71c91b261 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c
@@ -22,7 +22,6 @@
 
 #include <sysdep-cancel.h>
 #include <sys/syscall.h>
-#include <bp-checks.h>
 
 #include <kernel-features.h>
 
@@ -39,7 +38,7 @@ __libc_pwrite (fd, buf, count, offset)
   if (SINGLE_THREAD_P)
     {
       /* On PPC32 64bit values are aligned in odd/even register pairs.  */
-      result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count,
+      result = INLINE_SYSCALL (pwrite, 6, fd, buf, count,
 			       0, offset >> 31, offset);
 
       return result;
@@ -48,7 +47,7 @@ __libc_pwrite (fd, buf, count, offset)
   int oldtype = LIBC_CANCEL_ASYNC ();
 
   /* On PPC32 64bit values are aligned in odd/even register pairs.  */
-  result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count,
+  result = INLINE_SYSCALL (pwrite, 6, fd, buf, count,
 			   0, offset >> 31, offset);
 
   LIBC_CANCEL_RESET (oldtype);
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c
index f001c6e97d..7094e93d3c 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c
@@ -21,7 +21,6 @@
 
 #include <sysdep-cancel.h>
 #include <sys/syscall.h>
-#include <bp-checks.h>
 
 #include <kernel-features.h>
 
@@ -38,7 +37,7 @@ __libc_pwrite64 (fd, buf, count, offset)
   if (SINGLE_THREAD_P)
     {
   /* On PPC32 64bit values are aligned in odd/even register pairs.  */
-      result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count,
+      result = INLINE_SYSCALL (pwrite, 6, fd, buf, count,
 			       0, (long) (offset >> 32),
 			       (long) offset);
 
@@ -48,7 +47,7 @@ __libc_pwrite64 (fd, buf, count, offset)
   int oldtype = LIBC_CANCEL_ASYNC ();
 
   /* On PPC32 64bit values are aligned in odd/even register pairs.  */
-  result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count,
+  result = INLINE_SYSCALL (pwrite, 6, fd, buf, count,
 			   0, (long) (offset >> 32),
 			   (long) offset);
 
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c
index 896a415d87..70f1d6c580 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c
@@ -22,7 +22,6 @@
 
 #include <sysdep-cancel.h>
 #include <sys/syscall.h>
-#include <bp-checks.h>
 
 #include <kernel-features.h>
 
@@ -40,16 +39,14 @@ __libc_pread (fd, buf, count, offset)
 
   if (SINGLE_THREAD_P)
     {
-      result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count,
-                                offset);
+      result = INLINE_SYSCALL (pread, 4, fd, buf, count, offset);
 
       return result;
     }
 
   int oldtype = LIBC_CANCEL_ASYNC ();
 
-  result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count,
-                            offset);
+  result = INLINE_SYSCALL (pread, 4, fd, buf, count, offset);
 
   LIBC_CANCEL_RESET (oldtype);
 
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c
index aaf18e5daa..a11f6e31f4 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c
@@ -21,7 +21,6 @@
 
 #include <sysdep-cancel.h>
 #include <sys/syscall.h>
-#include <bp-checks.h>
 
 #include <kernel-features.h>
 
@@ -39,16 +38,14 @@ __libc_pread64 (fd, buf, count, offset)
 
   if (SINGLE_THREAD_P)
     {
-      result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count,
-                                offset);
+      result = INLINE_SYSCALL (pread, 4, fd, buf, count, offset);
 
       return result;
     }
 
   int oldtype = LIBC_CANCEL_ASYNC ();
 
-   result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count,
-                            offset);
+   result = INLINE_SYSCALL (pread, 4, fd, buf, count, offset);
 
   LIBC_CANCEL_RESET (oldtype);
 
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c
index 9795756f2b..0ccb0a98a3 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c
@@ -22,7 +22,6 @@
 
 #include <sysdep-cancel.h>
 #include <sys/syscall.h>
-#include <bp-checks.h>
 
 #include <kernel-features.h>
 
@@ -40,16 +39,14 @@ __libc_pwrite (fd, buf, count, offset)
 
   if (SINGLE_THREAD_P)
     {
-      result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count,
-                              offset);
+      result = INLINE_SYSCALL (pwrite, 4, fd, buf, count, offset);
 
       return result;
     }
 
   int oldtype = LIBC_CANCEL_ASYNC ();
 
-  result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count,
-			                     offset);
+  result = INLINE_SYSCALL (pwrite, 4, fd, buf, count, offset);
 
   LIBC_CANCEL_RESET (oldtype);
 
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c
index 65ddefd3c4..6a8acb4512 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c
@@ -21,7 +21,6 @@
 
 #include <sysdep-cancel.h>
 #include <sys/syscall.h>
-#include <bp-checks.h>
 
 #include <kernel-features.h>
 
@@ -39,16 +38,14 @@ __libc_pwrite64 (fd, buf, count, offset)
 
   if (SINGLE_THREAD_P)
     {
-      result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count,
-                                offset);
+      result = INLINE_SYSCALL (pwrite, 4, fd, buf, count, offset);
 
       return result;
     }
 
   int oldtype = LIBC_CANCEL_ASYNC ();
 
-  result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count,
-                            offset);
+  result = INLINE_SYSCALL (pwrite, 4, fd, buf, count, offset);
 
   LIBC_CANCEL_RESET (oldtype);
 
diff --git a/sysdeps/unix/sysv/linux/pread.c b/sysdeps/unix/sysv/linux/pread.c
index aa3ee63792..1494879ab9 100644
--- a/sysdeps/unix/sysv/linux/pread.c
+++ b/sysdeps/unix/sysv/linux/pread.c
@@ -23,7 +23,6 @@
 
 #include <sysdep-cancel.h>
 #include <sys/syscall.h>
-#include <bp-checks.h>
 
 #include <kernel-features.h>
 
@@ -44,7 +43,7 @@ do_pread (int fd, void *buf, size_t count, off_t offset)
   ssize_t result;
 
   assert (sizeof (offset) == 4);
-  result = INLINE_SYSCALL (pread, 5, fd, CHECK_N (buf, count), count,
+  result = INLINE_SYSCALL (pread, 5, fd, buf, count,
 			   __LONG_LONG_PAIR (offset >> 31, offset));
 
   return result;
diff --git a/sysdeps/unix/sysv/linux/pread64.c b/sysdeps/unix/sysv/linux/pread64.c
index 36cb66b8b8..be829ce3f6 100644
--- a/sysdeps/unix/sysv/linux/pread64.c
+++ b/sysdeps/unix/sysv/linux/pread64.c
@@ -22,7 +22,6 @@
 
 #include <sysdep-cancel.h>
 #include <sys/syscall.h>
-#include <bp-checks.h>
 
 #include <kernel-features.h>
 
@@ -39,7 +38,7 @@ do_pread64 (int fd, void *buf, size_t count, off64_t offset)
 {
   ssize_t result;
 
-  result = INLINE_SYSCALL (pread, 5, fd, CHECK_N (buf, count), count,
+  result = INLINE_SYSCALL (pread, 5, fd, buf, count,
 			   __LONG_LONG_PAIR ((off_t) (offset >> 32),
 					     (off_t) (offset & 0xffffffff)));
 
diff --git a/sysdeps/unix/sysv/linux/pwrite.c b/sysdeps/unix/sysv/linux/pwrite.c
index 25147167d4..5a31d17ed4 100644
--- a/sysdeps/unix/sysv/linux/pwrite.c
+++ b/sysdeps/unix/sysv/linux/pwrite.c
@@ -23,7 +23,6 @@
 
 #include <sysdep-cancel.h>
 #include <sys/syscall.h>
-#include <bp-checks.h>
 
 #include <kernel-features.h>
 
@@ -44,7 +43,7 @@ do_pwrite (int fd, const void *buf, size_t count, off_t offset)
   ssize_t result;
 
   assert (sizeof (offset) == 4);
-  result = INLINE_SYSCALL (pwrite, 5, fd, CHECK_N (buf, count), count,
+  result = INLINE_SYSCALL (pwrite, 5, fd, buf, count,
 			   __LONG_LONG_PAIR (offset >> 31, offset));
 
   return result;
diff --git a/sysdeps/unix/sysv/linux/pwrite64.c b/sysdeps/unix/sysv/linux/pwrite64.c
index f2a99b6620..fb46e4ba53 100644
--- a/sysdeps/unix/sysv/linux/pwrite64.c
+++ b/sysdeps/unix/sysv/linux/pwrite64.c
@@ -22,7 +22,6 @@
 
 #include <sysdep-cancel.h>
 #include <sys/syscall.h>
-#include <bp-checks.h>
 
 #include <kernel-features.h>
 
@@ -39,7 +38,7 @@ do_pwrite64 (int fd, const void *buf, size_t count, off64_t offset)
 {
   ssize_t result;
 
-  result = INLINE_SYSCALL (pwrite, 5, fd, CHECK_N (buf, count), count,
+  result = INLINE_SYSCALL (pwrite, 5, fd, buf, count,
 			   __LONG_LONG_PAIR ((off_t) (offset >> 32),
 					     (off_t) (offset & 0xffffffff)));
 
diff --git a/sysdeps/unix/sysv/linux/readv.c b/sysdeps/unix/sysv/linux/readv.c
index efee11d4e0..8bdb97a0b1 100644
--- a/sysdeps/unix/sysv/linux/readv.c
+++ b/sysdeps/unix/sysv/linux/readv.c
@@ -23,7 +23,6 @@
 
 #include <sysdep-cancel.h>
 #include <sys/syscall.h>
-#include <bp-checks.h>
 #include <kernel-features.h>
 
 #ifndef __ASSUME_COMPLETE_READV_WRITEV
@@ -47,12 +46,12 @@ __libc_readv (fd, vector, count)
   ssize_t result;
 
   if (SINGLE_THREAD_P)
-    result = INLINE_SYSCALL (readv, 3, fd, CHECK_N (vector, count), count);
+    result = INLINE_SYSCALL (readv, 3, fd, vector, count);
   else
     {
       int oldtype = LIBC_CANCEL_ASYNC ();
 
-      result = INLINE_SYSCALL (readv, 3, fd, CHECK_N (vector, count), count);
+      result = INLINE_SYSCALL (readv, 3, fd, vector, count);
 
       LIBC_CANCEL_RESET (oldtype);
     }
diff --git a/sysdeps/unix/sysv/linux/semop.c b/sysdeps/unix/sysv/linux/semop.c
index f0ea7780b8..cbe42ac62d 100644
--- a/sysdeps/unix/sysv/linux/semop.c
+++ b/sysdeps/unix/sysv/linux/semop.c
@@ -22,7 +22,6 @@
 
 #include <sysdep.h>
 #include <sys/syscall.h>
-#include <bp-checks.h>
 
 /* Perform user-defined atomical operation of array of semaphores.  */
 
@@ -32,6 +31,5 @@ semop (semid, sops, nsops)
      struct sembuf *sops;
      size_t nsops;
 {
-  return INLINE_SYSCALL (ipc, 5, IPCOP_semop,
-			 semid, (int) nsops, 0, CHECK_N (sops, nsops));
+  return INLINE_SYSCALL (ipc, 5, IPCOP_semop, semid, (int) nsops, 0, sops);
 }
diff --git a/sysdeps/unix/sysv/linux/semtimedop.c b/sysdeps/unix/sysv/linux/semtimedop.c
index 22a50375fa..3da3554700 100644
--- a/sysdeps/unix/sysv/linux/semtimedop.c
+++ b/sysdeps/unix/sysv/linux/semtimedop.c
@@ -22,7 +22,6 @@
 
 #include <sysdep.h>
 #include <sys/syscall.h>
-#include <bp-checks.h>
 
 /* Perform user-defined atomical operation of array of semaphores.  */
 
@@ -34,6 +33,6 @@ semtimedop (semid, sops, nsops, timeout)
      const struct timespec *timeout;
 {
   return INLINE_SYSCALL (ipc, 6, IPCOP_semtimedop,
-			 semid, (int) nsops, 0, CHECK_N (sops, nsops),
+			 semid, (int) nsops, 0, sops,
 			 timeout);
 }
diff --git a/sysdeps/unix/sysv/linux/sh/pread.c b/sysdeps/unix/sysv/linux/sh/pread.c
index 6f0c3badb2..ae338dc218 100644
--- a/sysdeps/unix/sysv/linux/sh/pread.c
+++ b/sysdeps/unix/sysv/linux/sh/pread.c
@@ -23,7 +23,6 @@
 
 #include <sysdep-cancel.h>
 #include <sys/syscall.h>
-#include <bp-checks.h>
 
 #include <kernel-features.h>
 
@@ -46,14 +45,14 @@ __libc_pread (fd, buf, count, offset)
 
   if (SINGLE_THREAD_P)
     {
-      result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
+      result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0,
 			       __LONG_LONG_PAIR (offset >> 31, offset));
       return result;
     }
 
   int oldtype = LIBC_CANCEL_ASYNC ();
 
-  result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
+  result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0,
 			   __LONG_LONG_PAIR (offset >> 31, offset));
 
   LIBC_CANCEL_RESET (oldtype);
diff --git a/sysdeps/unix/sysv/linux/sh/pread64.c b/sysdeps/unix/sysv/linux/sh/pread64.c
index acce914c70..2a46d7034c 100644
--- a/sysdeps/unix/sysv/linux/sh/pread64.c
+++ b/sysdeps/unix/sysv/linux/sh/pread64.c
@@ -22,7 +22,6 @@
 
 #include <sysdep-cancel.h>
 #include <sys/syscall.h>
-#include <bp-checks.h>
 
 #include <kernel-features.h>
 
@@ -45,7 +44,7 @@ __libc_pread64 (fd, buf, count, offset)
 
   if (SINGLE_THREAD_P)
     {
-     result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
+     result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0,
 			      __LONG_LONG_PAIR ((off_t) (offset >> 32),
 			      (off_t) (offset & 0xffffffff)));
      return result;
@@ -53,7 +52,7 @@ __libc_pread64 (fd, buf, count, offset)
 
   int oldtype = LIBC_CANCEL_ASYNC ();
 
-  result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
+  result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0,
 			   __LONG_LONG_PAIR ((off_t) (offset >> 32),
 					     (off_t) (offset & 0xffffffff)));
 
diff --git a/sysdeps/unix/sysv/linux/sh/pwrite.c b/sysdeps/unix/sysv/linux/sh/pwrite.c
index 441c867bf5..4b20e518cd 100644
--- a/sysdeps/unix/sysv/linux/sh/pwrite.c
+++ b/sysdeps/unix/sysv/linux/sh/pwrite.c
@@ -23,7 +23,6 @@
 
 #include <sysdep-cancel.h>
 #include <sys/syscall.h>
-#include <bp-checks.h>
 
 #include <kernel-features.h>
 
@@ -46,14 +45,14 @@ __libc_pwrite (fd, buf, count, offset)
 
   if (SINGLE_THREAD_P)
     {
-      result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
+      result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0,
 			       __LONG_LONG_PAIR (offset >> 31, offset));
       return result;
     }
 
   int oldtype = LIBC_CANCEL_ASYNC ();
 
-  result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
+  result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0,
 			   __LONG_LONG_PAIR (offset >> 31, offset));
 
   LIBC_CANCEL_RESET (oldtype);
diff --git a/sysdeps/unix/sysv/linux/sh/pwrite64.c b/sysdeps/unix/sysv/linux/sh/pwrite64.c
index a4ca56077d..5639b3c419 100644
--- a/sysdeps/unix/sysv/linux/sh/pwrite64.c
+++ b/sysdeps/unix/sysv/linux/sh/pwrite64.c
@@ -22,7 +22,6 @@
 
 #include <sysdep-cancel.h>
 #include <sys/syscall.h>
-#include <bp-checks.h>
 
 #include <kernel-features.h>
 
@@ -45,7 +44,7 @@ __libc_pwrite64 (fd, buf, count, offset)
 
   if (SINGLE_THREAD_P)
     {
-     result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
+     result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0,
 			      __LONG_LONG_PAIR ((off_t) (offset >> 32),
 			     (off_t) (offset & 0xffffffff)));
 
@@ -54,7 +53,7 @@ __libc_pwrite64 (fd, buf, count, offset)
 
   int oldtype = LIBC_CANCEL_ASYNC ();
 
-  result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
+  result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0,
 			   __LONG_LONG_PAIR ((off_t) (offset >> 32),
 					     (off_t) (offset & 0xffffffff)));
 
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/msgrcv.c b/sysdeps/unix/sysv/linux/sparc/sparc64/msgrcv.c
index bce7a58d2c..625eeb27cf 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/msgrcv.c
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/msgrcv.c
@@ -22,8 +22,6 @@
 #include <sysdep-cancel.h>
 #include <sys/syscall.h>
 
-#include <bp-checks.h>
-
 ssize_t
 __libc_msgrcv (msqid, msgp, msgsz, msgtyp, msgflg)
      int msqid;
@@ -34,12 +32,12 @@ __libc_msgrcv (msqid, msgp, msgsz, msgtyp, msgflg)
 {
   if (SINGLE_THREAD_P)
     return INLINE_SYSCALL (ipc, 6, IPCOP_msgrcv, msqid, msgsz, msgflg,
-			   CHECK_N (msgp, msgsz), msgtyp);
+			   msgp, msgtyp);
 
   int oldtype = LIBC_CANCEL_ASYNC ();
 
   ssize_t result = INLINE_SYSCALL (ipc, 6, IPCOP_msgrcv, msqid, msgsz, msgflg,
-				   CHECK_N (msgp, msgsz), msgtyp);
+				   msgp, msgtyp);
 
   LIBC_CANCEL_RESET (oldtype);
 
diff --git a/sysdeps/unix/sysv/linux/sysctl.c b/sysdeps/unix/sysv/linux/sysctl.c
index 5c6b1fb301..2d37de7336 100644
--- a/sysdeps/unix/sysv/linux/sysctl.c
+++ b/sysdeps/unix/sysv/linux/sysctl.c
@@ -22,13 +22,11 @@
 
 #include <sysdep.h>
 #include <sys/syscall.h>
-#include <bp-checks.h>
 
 int
 __sysctl (int *name, int nlen, void *oldval, size_t *oldlenp,
 	  void *newval, size_t newlen)
 {
-  /* GKM FIXME: force __sysctl_args decl to have unbounded pointers.  */
   struct __sysctl_args args =
   {
     .name = name,
@@ -38,9 +36,6 @@ __sysctl (int *name, int nlen, void *oldval, size_t *oldlenp,
     .newval = newval,
     .newlen = newlen
   };
-  (void) CHECK_N (name, nlen);
-  (void) CHECK_N (oldval, *oldlenp);
-  (void) CHECK_N (newval, newlen);
 
   return INLINE_SYSCALL (_sysctl, 1, __ptrvalue (&args));
 }
diff --git a/sysdeps/unix/sysv/linux/writev.c b/sysdeps/unix/sysv/linux/writev.c
index 993660a119..e53c0d345a 100644
--- a/sysdeps/unix/sysv/linux/writev.c
+++ b/sysdeps/unix/sysv/linux/writev.c
@@ -23,7 +23,6 @@
 
 #include <sysdep-cancel.h>
 #include <sys/syscall.h>
-#include <bp-checks.h>
 #include <kernel-features.h>
 
 #ifndef __ASSUME_COMPLETE_READV_WRITEV
@@ -47,12 +46,12 @@ __libc_writev (fd, vector, count)
   ssize_t result;
 
   if (SINGLE_THREAD_P)
-    result = INLINE_SYSCALL (writev, 3, fd, CHECK_N (vector, count), count);
+    result = INLINE_SYSCALL (writev, 3, fd, vector, count);
   else
     {
       int oldtype = LIBC_CANCEL_ASYNC ();
 
-      result = INLINE_SYSCALL (writev, 3, fd, CHECK_N (vector, count), count);
+      result = INLINE_SYSCALL (writev, 3, fd, vector, count);
 
       LIBC_CANCEL_RESET (oldtype);
     }