Blame SOURCES/glibc-rh1505492-bounded-9.patch

25845f
commit a2da1673fe32540799c801e8aec374dc1c0e0596
25845f
Author: Joseph Myers <joseph@codesourcery.com>
25845f
Date:   Fri Feb 8 20:06:30 2013 +0000
25845f
25845f
    Remove CHECK_N and bp-checks.h.
25845f
25845f
Conflicts:
25845f
	sysdeps/generic/bp-checks.h
25845f
25845f
Copyright header change; file removed manually.
25845f
25845f
diff --git a/debug/segfault.c b/debug/segfault.c
25845f
index 98886dbf152f6ea3..67435b305b84089b 100644
25845f
--- a/debug/segfault.c
25845f
+++ b/debug/segfault.c
25845f
@@ -32,8 +32,6 @@
25845f
 #include <_itoa.h>
25845f
 #include <ldsodefs.h>
25845f
 
25845f
-#include <bp-checks.h>
25845f
-
25845f
 /* This file defines macros to access the content of the sigcontext element
25845f
    passed up by the signal handler.  */
25845f
 #include <sigcontextinfo.h>
25845f
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/fdatasync.c b/ports/sysdeps/unix/sysv/linux/alpha/fdatasync.c
25845f
index 10f5035787aace19..ecb4a669d37b40c0 100644
25845f
--- a/ports/sysdeps/unix/sysv/linux/alpha/fdatasync.c
25845f
+++ b/ports/sysdeps/unix/sysv/linux/alpha/fdatasync.c
25845f
@@ -23,7 +23,6 @@
25845f
 
25845f
 #include <sysdep-cancel.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 #include <kernel-features.h>
25845f
 
25845f
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/gethostname.c b/ports/sysdeps/unix/sysv/linux/alpha/gethostname.c
25845f
index cec26d9815dfc2c8..0bfdd399ba0d4767 100644
25845f
--- a/ports/sysdeps/unix/sysv/linux/alpha/gethostname.c
25845f
+++ b/ports/sysdeps/unix/sysv/linux/alpha/gethostname.c
25845f
@@ -22,14 +22,13 @@
25845f
 
25845f
 #include <sysdep.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 int
25845f
 __gethostname (char *name, size_t len)
25845f
 {
25845f
   int result;
25845f
 
25845f
-  result = INLINE_SYSCALL (gethostname, 2, CHECK_N (name, len), len);
25845f
+  result = INLINE_SYSCALL (gethostname, 2, name, len);
25845f
 
25845f
   if (result == 0
25845f
       /* See whether the string is terminated.  If not we will return
25845f
diff --git a/ports/sysdeps/unix/sysv/linux/arm/pread.c b/ports/sysdeps/unix/sysv/linux/arm/pread.c
25845f
index 4efe349e930b778c..ed7be7394307892c 100644
25845f
--- a/ports/sysdeps/unix/sysv/linux/arm/pread.c
25845f
+++ b/ports/sysdeps/unix/sysv/linux/arm/pread.c
25845f
@@ -23,7 +23,6 @@
25845f
 
25845f
 #include <sysdep-cancel.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 ssize_t
25845f
 __libc_pread (fd, buf, count, offset)
25845f
@@ -38,7 +37,7 @@ __libc_pread (fd, buf, count, offset)
25845f
     {
25845f
       /* In the ARM EABI, 64-bit values are aligned to even/odd register
25845f
 	 pairs for syscalls.  */
25845f
-      result = INLINE_SYSCALL (pread64, 6, fd, CHECK_N (buf, count), count, 0,
25845f
+      result = INLINE_SYSCALL (pread64, 6, fd, buf, count, 0,
25845f
 			       __LONG_LONG_PAIR (offset >> 31, offset));
25845f
 
25845f
       return result;
25845f
@@ -48,7 +47,7 @@ __libc_pread (fd, buf, count, offset)
25845f
 
25845f
   /* In the ARM EABI, 64-bit values are aligned to even/odd register
25845f
      pairs for syscalls.  */
25845f
-  result = INLINE_SYSCALL (pread64, 6, fd, CHECK_N (buf, count), count, 0,
25845f
+  result = INLINE_SYSCALL (pread64, 6, fd, buf, count, 0,
25845f
 			   __LONG_LONG_PAIR (offset >> 31, offset));
25845f
 
25845f
   LIBC_CANCEL_RESET (oldtype);
25845f
diff --git a/ports/sysdeps/unix/sysv/linux/arm/pread64.c b/ports/sysdeps/unix/sysv/linux/arm/pread64.c
25845f
index 59bd9cfe0b9133ba..a3e8dfccb7446d76 100644
25845f
--- a/ports/sysdeps/unix/sysv/linux/arm/pread64.c
25845f
+++ b/ports/sysdeps/unix/sysv/linux/arm/pread64.c
25845f
@@ -23,7 +23,6 @@
25845f
 
25845f
 #include <sysdep-cancel.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 ssize_t
25845f
 __libc_pread64 (fd, buf, count, offset)
25845f
@@ -38,7 +37,7 @@ __libc_pread64 (fd, buf, count, offset)
25845f
     {
25845f
       /* In the ARM EABI, 64-bit values are aligned to even/odd register
25845f
 	 pairs for syscalls.  */
25845f
-      result = INLINE_SYSCALL (pread64, 6, fd, CHECK_N (buf, count), count, 0,
25845f
+      result = INLINE_SYSCALL (pread64, 6, fd, buf, count, 0,
25845f
 			       __LONG_LONG_PAIR ((off_t) (offset >> 32),
25845f
 						 (off_t) (offset & 0xffffffff)));
25845f
 
25845f
@@ -49,7 +48,7 @@ __libc_pread64 (fd, buf, count, offset)
25845f
 
25845f
   /* In the ARM EABI, 64-bit values are aligned to even/odd register
25845f
      pairs for syscalls.  */
25845f
-  result = INLINE_SYSCALL (pread64, 6, fd, CHECK_N (buf, count), count, 0,
25845f
+  result = INLINE_SYSCALL (pread64, 6, fd, buf, count, 0,
25845f
 			   __LONG_LONG_PAIR ((off_t) (offset >> 32),
25845f
 					     (off_t) (offset & 0xffffffff)));
25845f
 
25845f
diff --git a/ports/sysdeps/unix/sysv/linux/arm/pwrite.c b/ports/sysdeps/unix/sysv/linux/arm/pwrite.c
25845f
index 43788e5420240b69..a102f307926c2873 100644
25845f
--- a/ports/sysdeps/unix/sysv/linux/arm/pwrite.c
25845f
+++ b/ports/sysdeps/unix/sysv/linux/arm/pwrite.c
25845f
@@ -23,7 +23,6 @@
25845f
 
25845f
 #include <sysdep-cancel.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 ssize_t
25845f
 __libc_pwrite (fd, buf, count, offset)
25845f
@@ -38,7 +37,7 @@ __libc_pwrite (fd, buf, count, offset)
25845f
     {
25845f
       /* In the ARM EABI, 64-bit values are aligned to even/odd register
25845f
 	 pairs for syscalls.  */
25845f
-      result = INLINE_SYSCALL (pwrite64, 6, fd, CHECK_N (buf, count), count, 0,
25845f
+      result = INLINE_SYSCALL (pwrite64, 6, fd, buf, count, 0,
25845f
 			       __LONG_LONG_PAIR (offset >> 31, offset));
25845f
 
25845f
       return result;
25845f
@@ -48,7 +47,7 @@ __libc_pwrite (fd, buf, count, offset)
25845f
 
25845f
   /* In the ARM EABI, 64-bit values are aligned to even/odd register
25845f
      pairs for syscalls.  */
25845f
-  result = INLINE_SYSCALL (pwrite64, 6, fd, CHECK_N (buf, count), count, 0,
25845f
+  result = INLINE_SYSCALL (pwrite64, 6, fd, buf, count, 0,
25845f
 			   __LONG_LONG_PAIR (offset >> 31, offset));
25845f
 
25845f
   LIBC_CANCEL_RESET (oldtype);
25845f
diff --git a/ports/sysdeps/unix/sysv/linux/arm/pwrite64.c b/ports/sysdeps/unix/sysv/linux/arm/pwrite64.c
25845f
index c7bfdaf9f34a15b5..19b15f6bd7cb2e0d 100644
25845f
--- a/ports/sysdeps/unix/sysv/linux/arm/pwrite64.c
25845f
+++ b/ports/sysdeps/unix/sysv/linux/arm/pwrite64.c
25845f
@@ -23,7 +23,6 @@
25845f
 
25845f
 #include <sysdep-cancel.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 ssize_t
25845f
 __libc_pwrite64 (fd, buf, count, offset)
25845f
@@ -38,7 +37,7 @@ __libc_pwrite64 (fd, buf, count, offset)
25845f
     {
25845f
       /* In the ARM EABI, 64-bit values are aligned to even/odd register
25845f
 	 pairs for syscalls.  */
25845f
-      result = INLINE_SYSCALL (pwrite64, 6, fd, CHECK_N (buf, count), count, 0,
25845f
+      result = INLINE_SYSCALL (pwrite64, 6, fd, buf, count, 0,
25845f
 			       __LONG_LONG_PAIR ((off_t) (offset >> 32),
25845f
 						 (off_t) (offset & 0xffffffff)));
25845f
 
25845f
@@ -49,7 +48,7 @@ __libc_pwrite64 (fd, buf, count, offset)
25845f
 
25845f
   /* In the ARM EABI, 64-bit values are aligned to even/odd register
25845f
      pairs for syscalls.  */
25845f
-  result = INLINE_SYSCALL (pwrite64, 6, fd, CHECK_N (buf, count), count, 0,
25845f
+  result = INLINE_SYSCALL (pwrite64, 6, fd, buf, count, 0,
25845f
 			   __LONG_LONG_PAIR ((off_t) (offset >> 32),
25845f
 					     (off_t) (offset & 0xffffffff)));
25845f
 
25845f
diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/fxstat64.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/fxstat64.c
25845f
index 24b517e43846b80a..dda02b14442d5cb5 100644
25845f
--- a/ports/sysdeps/unix/sysv/linux/mips/mips64/fxstat64.c
25845f
+++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/fxstat64.c
25845f
@@ -23,7 +23,6 @@
25845f
 
25845f
 #include <sysdep.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 #include <xstatconv.h>
25845f
 
25845f
diff --git a/ports/sysdeps/unix/sysv/linux/mips/pread.c b/ports/sysdeps/unix/sysv/linux/mips/pread.c
25845f
index a868130ea1144e44..f24e500c10efae99 100644
25845f
--- a/ports/sysdeps/unix/sysv/linux/mips/pread.c
25845f
+++ b/ports/sysdeps/unix/sysv/linux/mips/pread.c
25845f
@@ -26,7 +26,6 @@
25845f
 
25845f
 #include <sysdep-cancel.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 #include <kernel-features.h>
25845f
 
25845f
@@ -54,10 +53,9 @@ __libc_pread (fd, buf, count, offset)
25845f
   if (SINGLE_THREAD_P)
25845f
     {
25845f
 #if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
25845f
-      result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count,
25845f
-			       offset);
25845f
+      result = INLINE_SYSCALL (pread, 4, fd, buf, count, offset);
25845f
 #else
25845f
-      result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
25845f
+      result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0,
25845f
 			       __LONG_LONG_PAIR (offset >> 31, offset));
25845f
 #endif
25845f
       return result;
25845f
@@ -66,9 +64,9 @@ __libc_pread (fd, buf, count, offset)
25845f
   int oldtype = LIBC_CANCEL_ASYNC ();
25845f
 
25845f
 #if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
25845f
-  result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, offset);
25845f
+  result = INLINE_SYSCALL (pread, 4, fd, buf, count, offset);
25845f
 #else
25845f
-  result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
25845f
+  result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0,
25845f
 			   __LONG_LONG_PAIR (offset >> 31, offset));
25845f
 #endif
25845f
 
25845f
diff --git a/ports/sysdeps/unix/sysv/linux/mips/pread64.c b/ports/sysdeps/unix/sysv/linux/mips/pread64.c
25845f
index 6f9b0054a53faf67..d5172a039d7fd269 100644
25845f
--- a/ports/sysdeps/unix/sysv/linux/mips/pread64.c
25845f
+++ b/ports/sysdeps/unix/sysv/linux/mips/pread64.c
25845f
@@ -25,7 +25,6 @@
25845f
 
25845f
 #include <sysdep-cancel.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 #include <kernel-features.h>
25845f
 
25845f
@@ -50,10 +49,9 @@ __libc_pread64 (fd, buf, count, offset)
25845f
   if (SINGLE_THREAD_P)
25845f
     {
25845f
 #if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
25845f
-      result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count,
25845f
-			       offset);
25845f
+      result = INLINE_SYSCALL (pread, 4, fd, buf, count, offset);
25845f
 #else
25845f
-     result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
25845f
+     result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0,
25845f
 			      __LONG_LONG_PAIR ((off_t) (offset >> 32),
25845f
 			      (off_t) (offset & 0xffffffff)));
25845f
 #endif
25845f
@@ -63,9 +61,9 @@ __libc_pread64 (fd, buf, count, offset)
25845f
   int oldtype = LIBC_CANCEL_ASYNC ();
25845f
 
25845f
 #if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
25845f
-  result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, offset);
25845f
+  result = INLINE_SYSCALL (pread, 4, fd, buf, count, offset);
25845f
 #else
25845f
-  result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
25845f
+  result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0,
25845f
 			   __LONG_LONG_PAIR ((off_t) (offset >> 32),
25845f
 					     (off_t) (offset & 0xffffffff)));
25845f
 #endif
25845f
diff --git a/ports/sysdeps/unix/sysv/linux/mips/pwrite.c b/ports/sysdeps/unix/sysv/linux/mips/pwrite.c
25845f
index cc0c3b7c22199cc0..caa69cbb4f7e3e77 100644
25845f
--- a/ports/sysdeps/unix/sysv/linux/mips/pwrite.c
25845f
+++ b/ports/sysdeps/unix/sysv/linux/mips/pwrite.c
25845f
@@ -26,7 +26,6 @@
25845f
 
25845f
 #include <sysdep-cancel.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 #include <kernel-features.h>
25845f
 
25845f
@@ -54,10 +53,9 @@ __libc_pwrite (fd, buf, count, offset)
25845f
   if (SINGLE_THREAD_P)
25845f
     {
25845f
 #if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
25845f
-      result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count,
25845f
-			       offset);
25845f
+      result = INLINE_SYSCALL (pwrite, 4, fd, buf, count, offset);
25845f
 #else
25845f
-      result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
25845f
+      result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0,
25845f
 			       __LONG_LONG_PAIR (offset >> 31, offset));
25845f
 #endif
25845f
       return result;
25845f
@@ -66,9 +64,9 @@ __libc_pwrite (fd, buf, count, offset)
25845f
   int oldtype = LIBC_CANCEL_ASYNC ();
25845f
 
25845f
 #if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
25845f
-  result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset);
25845f
+  result = INLINE_SYSCALL (pwrite, 4, fd, buf, count, offset);
25845f
 #else
25845f
-  result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
25845f
+  result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0,
25845f
 			   __LONG_LONG_PAIR (offset >> 31, offset));
25845f
 #endif
25845f
 
25845f
diff --git a/ports/sysdeps/unix/sysv/linux/mips/pwrite64.c b/ports/sysdeps/unix/sysv/linux/mips/pwrite64.c
25845f
index d60accd57fc3c535..d8ae27a9abf5c606 100644
25845f
--- a/ports/sysdeps/unix/sysv/linux/mips/pwrite64.c
25845f
+++ b/ports/sysdeps/unix/sysv/linux/mips/pwrite64.c
25845f
@@ -25,7 +25,6 @@
25845f
 
25845f
 #include <sysdep-cancel.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 #include <kernel-features.h>
25845f
 
25845f
@@ -49,10 +48,9 @@ __libc_pwrite64 (fd, buf, count, offset)
25845f
   if (SINGLE_THREAD_P)
25845f
     {
25845f
 #if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
25845f
-      result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count,
25845f
-			       offset);
25845f
+      result = INLINE_SYSCALL (pwrite, 4, fd, buf, count, offset);
25845f
 #else
25845f
-     result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
25845f
+     result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0,
25845f
 			      __LONG_LONG_PAIR ((off_t) (offset >> 32),
25845f
 			     (off_t) (offset & 0xffffffff)));
25845f
 #endif
25845f
@@ -63,9 +61,9 @@ __libc_pwrite64 (fd, buf, count, offset)
25845f
   int oldtype = LIBC_CANCEL_ASYNC ();
25845f
 
25845f
 #if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
25845f
-  result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset);
25845f
+  result = INLINE_SYSCALL (pwrite, 4, fd, buf, count, offset);
25845f
 #else
25845f
-  result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
25845f
+  result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0,
25845f
 			   __LONG_LONG_PAIR ((off_t) (offset >> 32),
25845f
 					     (off_t) (offset & 0xffffffff)));
25845f
 #endif
25845f
diff --git a/sysdeps/generic/bp-checks.h b/sysdeps/generic/bp-checks.h
25845f
deleted file mode 100644
25845f
index 90a07fc10fde3a84..0000000000000000
25845f
--- a/sysdeps/generic/bp-checks.h
25845f
+++ /dev/null
25845f
@@ -1,49 +0,0 @@
25845f
-/* Bounded-pointer checking macros for C.
25845f
-   Copyright (C) 2000 Free Software Foundation, Inc.
25845f
-   This file is part of the GNU C Library.
25845f
-   Contributed by Greg McGary <greg@mcgary.org>
25845f
-
25845f
-   The GNU C Library is free software; you can redistribute it and/or
25845f
-   modify it under the terms of the GNU Lesser General Public
25845f
-   License as published by the Free Software Foundation; either
25845f
-   version 2.1 of the License, or (at your option) any later version.
25845f
-
25845f
-   The GNU C Library is distributed in the hope that it will be useful,
25845f
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
25845f
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
25845f
-   Lesser General Public License for more details.
25845f
-
25845f
-   You should have received a copy of the GNU Lesser General Public
25845f
-   License along with the GNU C Library; if not, see
25845f
-   <http://www.gnu.org/licenses/>.  */
25845f
-
25845f
-#ifndef _bp_checks_h_
25845f
-#define _bp_checks_h_ 1
25845f
-
25845f
-#if __BOUNDED_POINTERS__
25845f
-
25845f
-# define BOUNDS_VIOLATED (__builtin_trap (), 0)
25845f
-
25845f
-# define _CHECK_N(ARG, N, COND)				\
25845f
-  (((COND)						\
25845f
-    && (__ptrvalue (ARG) < __ptrlow (ARG)		\
25845f
-	|| __ptrvalue (ARG) + (N) > __ptrhigh (ARG))	\
25845f
-    && BOUNDS_VIOLATED),				\
25845f
-   __ptrvalue (ARG))
25845f
-
25845f
-/* Check bounds of a pointer seated to an array of N objects.  */
25845f
-# define CHECK_N(ARG, N) _CHECK_N ((ARG), (N), 1)
25845f
-/* Same as CHECK_N, but tolerate ARG == NULL.  */
25845f
-# define CHECK_N_NULL_OK(ARG, N) _CHECK_N ((ARG), (N), __ptrvalue (ARG))
25845f
-
25845f
-#else /* !__BOUNDED_POINTERS__ */
25845f
-
25845f
-/* Do nothing if not compiling with -fbounded-pointers.  */
25845f
-
25845f
-# define BOUNDS_VIOLATED
25845f
-# define CHECK_N(ARG, N) (ARG)
25845f
-# define CHECK_N_NULL_OK(ARG, N) (ARG)
25845f
-
25845f
-#endif /* !__BOUNDED_POINTERS__ */
25845f
-
25845f
-#endif /* _bp_checks_h_ */
25845f
diff --git a/sysdeps/unix/sysv/linux/getdents.c b/sysdeps/unix/sysv/linux/getdents.c
25845f
index babfbd0a43a29450..6b64f5d9bdb6b573 100644
25845f
--- a/sysdeps/unix/sysv/linux/getdents.c
25845f
+++ b/sysdeps/unix/sysv/linux/getdents.c
25845f
@@ -28,7 +28,6 @@
25845f
 
25845f
 #include <sysdep.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 #include <linux/posix_types.h>
25845f
 
25845f
@@ -109,7 +108,7 @@ __GETDENTS (int fd, char *buf, size_t nbytes)
25845f
       && (offsetof (struct kernel_dirent, d_reclen)
25845f
 	  == offsetof (struct dirent, d_reclen)))
25845f
     {
25845f
-      retval = INLINE_SYSCALL (getdents, 3, fd, CHECK_N(buf, nbytes), nbytes);
25845f
+      retval = INLINE_SYSCALL (getdents, 3, fd, buf, nbytes);
25845f
 
25845f
       /* The kernel added the d_type value after the name.  Change
25845f
 	 this now.  */
25845f
@@ -158,8 +157,7 @@ __GETDENTS (int fd, char *buf, size_t nbytes)
25845f
 		   - offsetof (DIRENT_TYPE, d_name);
25845f
 	  kbuf = __alloca(kbytes);
25845f
 	}
25845f
-      retval = INLINE_SYSCALL (getdents64, 3, fd, CHECK_N(kbuf, kbytes),
25845f
-			       kbytes);
25845f
+      retval = INLINE_SYSCALL (getdents64, 3, fd, kbuf, kbytes);
25845f
 # ifndef __ASSUME_GETDENTS64_SYSCALL
25845f
       if (retval != -1 || (errno != EINVAL && errno != ENOSYS))
25845f
 # endif
25845f
@@ -255,8 +253,7 @@ __GETDENTS (int fd, char *buf, size_t nbytes)
25845f
 
25845f
     skdp = kdp = __alloca (red_nbytes);
25845f
 
25845f
-    retval = INLINE_SYSCALL (getdents, 3, fd,
25845f
-			     CHECK_N ((char *) kdp, red_nbytes), red_nbytes);
25845f
+    retval = INLINE_SYSCALL (getdents, 3, fd, (char *) kdp, red_nbytes);
25845f
 
25845f
     if (retval == -1)
25845f
       return -1;
25845f
diff --git a/sysdeps/unix/sysv/linux/i386/brk.c b/sysdeps/unix/sysv/linux/i386/brk.c
25845f
index 68451f1b17e52c45..0b367096f47007ce 100644
25845f
--- a/sysdeps/unix/sysv/linux/i386/brk.c
25845f
+++ b/sysdeps/unix/sysv/linux/i386/brk.c
25845f
@@ -20,8 +20,6 @@
25845f
 #include <unistd.h>
25845f
 #include <sysdep.h>
25845f
 
25845f
-#include <bp-checks.h>
25845f
-
25845f
 /* This must be initialized data because commons can't have aliases.  */
25845f
 void *__curbrk = 0;
25845f
 
25845f
diff --git a/sysdeps/unix/sysv/linux/i386/getgroups.c b/sysdeps/unix/sysv/linux/i386/getgroups.c
25845f
index e0871ec2d29258ab..7759c17a9bbfb37c 100644
25845f
--- a/sysdeps/unix/sysv/linux/i386/getgroups.c
25845f
+++ b/sysdeps/unix/sysv/linux/i386/getgroups.c
25845f
@@ -22,7 +22,6 @@
25845f
 
25845f
 #include <sysdep.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 #include <linux/posix_types.h>
25845f
 
25845f
@@ -34,7 +33,7 @@
25845f
 int
25845f
 __getgroups (int n, gid_t *groups)
25845f
 {
25845f
-  return INLINE_SYSCALL (getgroups32, 2, n, CHECK_N (groups, n));
25845f
+  return INLINE_SYSCALL (getgroups32, 2, n, groups);
25845f
 }
25845f
 
25845f
 weak_alias (__getgroups, getgroups)
25845f
diff --git a/sysdeps/unix/sysv/linux/i386/setgroups.c b/sysdeps/unix/sysv/linux/i386/setgroups.c
25845f
index 73b341ac53010d2b..e9466fd9e1eef27f 100644
25845f
--- a/sysdeps/unix/sysv/linux/i386/setgroups.c
25845f
+++ b/sysdeps/unix/sysv/linux/i386/setgroups.c
25845f
@@ -22,7 +22,6 @@
25845f
 
25845f
 #include <sysdep.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 #include <setxid.h>
25845f
 #include <linux/posix_types.h>
25845f
@@ -33,6 +32,6 @@
25845f
 int
25845f
 setgroups (size_t n, const gid_t *groups)
25845f
 {
25845f
-  return INLINE_SETXID_SYSCALL (setgroups32, 2, n, CHECK_N (groups, n));
25845f
+  return INLINE_SETXID_SYSCALL (setgroups32, 2, n, groups);
25845f
 }
25845f
 libc_hidden_def (setgroups)
25845f
diff --git a/sysdeps/unix/sysv/linux/mmap64.c b/sysdeps/unix/sysv/linux/mmap64.c
25845f
index bca15f9c5dd4c590..87bd532c5e350c56 100644
25845f
--- a/sysdeps/unix/sysv/linux/mmap64.c
25845f
+++ b/sysdeps/unix/sysv/linux/mmap64.c
25845f
@@ -22,7 +22,6 @@
25845f
 
25845f
 #include <sysdep.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 #include <kernel-features.h>
25845f
 
25845f
diff --git a/sysdeps/unix/sysv/linux/msgrcv.c b/sysdeps/unix/sysv/linux/msgrcv.c
25845f
index 0b47ce7bbe125945..dc0e34fe3d7f2ffd 100644
25845f
--- a/sysdeps/unix/sysv/linux/msgrcv.c
25845f
+++ b/sysdeps/unix/sysv/linux/msgrcv.c
25845f
@@ -23,8 +23,6 @@
25845f
 #include <sysdep-cancel.h>
25845f
 #include <sys/syscall.h>
25845f
 
25845f
-#include <bp-checks.h>
25845f
-
25845f
 /* Kludge to work around Linux' restriction of only up to five
25845f
    arguments to a system call.  */
25845f
 struct ipc_kludge
25845f
@@ -46,7 +44,7 @@ __libc_msgrcv (msqid, msgp, msgsz, msgtyp, msgflg)
25845f
      fives parameters to a system call.  */
25845f
   struct ipc_kludge tmp;
25845f
 
25845f
-  tmp.msgp = CHECK_N (msgp, msgsz);
25845f
+  tmp.msgp = msgp;
25845f
   tmp.msgtyp = msgtyp;
25845f
 
25845f
   if (SINGLE_THREAD_P)
25845f
diff --git a/sysdeps/unix/sysv/linux/msgsnd.c b/sysdeps/unix/sysv/linux/msgsnd.c
25845f
index 2f57fe74f10dae31..2883cad8aa370c6c 100644
25845f
--- a/sysdeps/unix/sysv/linux/msgsnd.c
25845f
+++ b/sysdeps/unix/sysv/linux/msgsnd.c
25845f
@@ -23,8 +23,6 @@
25845f
 #include <sysdep-cancel.h>
25845f
 #include <sys/syscall.h>
25845f
 
25845f
-#include <bp-checks.h>
25845f
-
25845f
 int
25845f
 __libc_msgsnd (msqid, msgp, msgsz, msgflg)
25845f
      int msqid;
25845f
@@ -34,12 +32,12 @@ __libc_msgsnd (msqid, msgp, msgsz, msgflg)
25845f
 {
25845f
   if (SINGLE_THREAD_P)
25845f
     return INLINE_SYSCALL (ipc, 5, IPCOP_msgsnd, msqid, msgsz,
25845f
-			   msgflg, (void *) CHECK_N (msgp, msgsz));
25845f
+			   msgflg, (void *) msgp);
25845f
 
25845f
   int oldtype = LIBC_CANCEL_ASYNC ();
25845f
 
25845f
   int result = INLINE_SYSCALL (ipc, 5, IPCOP_msgsnd, msqid, msgsz,
25845f
-			       msgflg, (void *) CHECK_N (msgp, msgsz));
25845f
+			       msgflg, (void *) msgp);
25845f
 
25845f
   LIBC_CANCEL_RESET (oldtype);
25845f
 
25845f
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c
25845f
index 364834f1d0c717e7..9a9d0d456e5db1c0 100644
25845f
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c
25845f
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c
25845f
@@ -22,7 +22,6 @@
25845f
 
25845f
 #include <sysdep-cancel.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 #include <kernel-features.h>
25845f
 
25845f
@@ -38,7 +37,7 @@ __libc_pread (fd, buf, count, offset)
25845f
   if (SINGLE_THREAD_P)
25845f
     {
25845f
       /* On PPC32 64bit values are aligned in odd/even register pairs.  */
25845f
-      result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count,
25845f
+      result = INLINE_SYSCALL (pread, 6, fd, buf, count,
25845f
 			       0, offset >> 31, offset);
25845f
 
25845f
       return result;
25845f
@@ -47,7 +46,7 @@ __libc_pread (fd, buf, count, offset)
25845f
   int oldtype = LIBC_CANCEL_ASYNC ();
25845f
 
25845f
   /* On PPC32 64bit values are aligned in odd/even register pairs.  */
25845f
-  result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count,
25845f
+  result = INLINE_SYSCALL (pread, 6, fd, buf, count,
25845f
 			       0, offset >> 31, offset);
25845f
 
25845f
   LIBC_CANCEL_RESET (oldtype);
25845f
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c
25845f
index 5b1445ff23ef9ab4..1435b293b143159b 100644
25845f
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c
25845f
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c
25845f
@@ -21,7 +21,6 @@
25845f
 
25845f
 #include <sysdep-cancel.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 #include <kernel-features.h>
25845f
 
25845f
@@ -38,7 +37,7 @@ __libc_pread64 (fd, buf, count, offset)
25845f
   if (SINGLE_THREAD_P)
25845f
     {
25845f
       /* On PPC32 64bit values are aligned in odd/even register pairs.  */
25845f
-      result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count,
25845f
+      result = INLINE_SYSCALL (pread, 6, fd, buf, count,
25845f
 			       0, (long) (offset >> 32),
25845f
 			       (long) offset);
25845f
 
25845f
@@ -48,7 +47,7 @@ __libc_pread64 (fd, buf, count, offset)
25845f
   int oldtype = LIBC_CANCEL_ASYNC ();
25845f
 
25845f
   /* On PPC32 64bit values are aligned in odd/even register pairs.  */
25845f
-  result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count,
25845f
+  result = INLINE_SYSCALL (pread, 6, fd, buf, count,
25845f
 			   0, (long) (offset >> 32),
25845f
 			   (long) offset);
25845f
 
25845f
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c
25845f
index ed1878bc5ee94a5e..d3a551c5a97550ca 100644
25845f
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c
25845f
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c
25845f
@@ -22,7 +22,6 @@
25845f
 
25845f
 #include <sysdep-cancel.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 #include <kernel-features.h>
25845f
 
25845f
@@ -39,7 +38,7 @@ __libc_pwrite (fd, buf, count, offset)
25845f
   if (SINGLE_THREAD_P)
25845f
     {
25845f
       /* On PPC32 64bit values are aligned in odd/even register pairs.  */
25845f
-      result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count,
25845f
+      result = INLINE_SYSCALL (pwrite, 6, fd, buf, count,
25845f
 			       0, offset >> 31, offset);
25845f
 
25845f
       return result;
25845f
@@ -48,7 +47,7 @@ __libc_pwrite (fd, buf, count, offset)
25845f
   int oldtype = LIBC_CANCEL_ASYNC ();
25845f
 
25845f
   /* On PPC32 64bit values are aligned in odd/even register pairs.  */
25845f
-  result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count,
25845f
+  result = INLINE_SYSCALL (pwrite, 6, fd, buf, count,
25845f
 			   0, offset >> 31, offset);
25845f
 
25845f
   LIBC_CANCEL_RESET (oldtype);
25845f
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c
25845f
index dedeb7e97d8ed14b..d89a1759d1903eba 100644
25845f
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c
25845f
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c
25845f
@@ -21,7 +21,6 @@
25845f
 
25845f
 #include <sysdep-cancel.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 #include <kernel-features.h>
25845f
 
25845f
@@ -38,7 +37,7 @@ __libc_pwrite64 (fd, buf, count, offset)
25845f
   if (SINGLE_THREAD_P)
25845f
     {
25845f
   /* On PPC32 64bit values are aligned in odd/even register pairs.  */
25845f
-      result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count,
25845f
+      result = INLINE_SYSCALL (pwrite, 6, fd, buf, count,
25845f
 			       0, (long) (offset >> 32),
25845f
 			       (long) offset);
25845f
 
25845f
@@ -48,7 +47,7 @@ __libc_pwrite64 (fd, buf, count, offset)
25845f
   int oldtype = LIBC_CANCEL_ASYNC ();
25845f
 
25845f
   /* On PPC32 64bit values are aligned in odd/even register pairs.  */
25845f
-  result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count,
25845f
+  result = INLINE_SYSCALL (pwrite, 6, fd, buf, count,
25845f
 			   0, (long) (offset >> 32),
25845f
 			   (long) offset);
25845f
 
25845f
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c
25845f
index ed4708f2dee6b9a7..43ead1af67b0c0da 100644
25845f
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c
25845f
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c
25845f
@@ -22,7 +22,6 @@
25845f
 
25845f
 #include <sysdep-cancel.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 #include <kernel-features.h>
25845f
 
25845f
@@ -40,16 +39,14 @@ __libc_pread (fd, buf, count, offset)
25845f
 
25845f
   if (SINGLE_THREAD_P)
25845f
     {
25845f
-      result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count,
25845f
-                                offset);
25845f
+      result = INLINE_SYSCALL (pread, 4, fd, buf, count, offset);
25845f
 
25845f
       return result;
25845f
     }
25845f
 
25845f
   int oldtype = LIBC_CANCEL_ASYNC ();
25845f
 
25845f
-  result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count,
25845f
-                            offset);
25845f
+  result = INLINE_SYSCALL (pread, 4, fd, buf, count, offset);
25845f
 
25845f
   LIBC_CANCEL_RESET (oldtype);
25845f
 
25845f
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c
25845f
index 63ba30df297b703a..dc9fc81c4ccf067e 100644
25845f
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c
25845f
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c
25845f
@@ -21,7 +21,6 @@
25845f
 
25845f
 #include <sysdep-cancel.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 #include <kernel-features.h>
25845f
 
25845f
@@ -39,16 +38,14 @@ __libc_pread64 (fd, buf, count, offset)
25845f
 
25845f
   if (SINGLE_THREAD_P)
25845f
     {
25845f
-      result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count,
25845f
-                                offset);
25845f
+      result = INLINE_SYSCALL (pread, 4, fd, buf, count, offset);
25845f
 
25845f
       return result;
25845f
     }
25845f
 
25845f
   int oldtype = LIBC_CANCEL_ASYNC ();
25845f
 
25845f
-   result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count,
25845f
-                            offset);
25845f
+   result = INLINE_SYSCALL (pread, 4, fd, buf, count, offset);
25845f
 
25845f
   LIBC_CANCEL_RESET (oldtype);
25845f
 
25845f
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c
25845f
index 68f26dfb7e2c8d4e..57c62bdb74805836 100644
25845f
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c
25845f
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c
25845f
@@ -22,7 +22,6 @@
25845f
 
25845f
 #include <sysdep-cancel.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 #include <kernel-features.h>
25845f
 
25845f
@@ -40,16 +39,14 @@ __libc_pwrite (fd, buf, count, offset)
25845f
 
25845f
   if (SINGLE_THREAD_P)
25845f
     {
25845f
-      result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count,
25845f
-                              offset);
25845f
+      result = INLINE_SYSCALL (pwrite, 4, fd, buf, count, offset);
25845f
 
25845f
       return result;
25845f
     }
25845f
 
25845f
   int oldtype = LIBC_CANCEL_ASYNC ();
25845f
 
25845f
-  result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count,
25845f
-			                     offset);
25845f
+  result = INLINE_SYSCALL (pwrite, 4, fd, buf, count, offset);
25845f
 
25845f
   LIBC_CANCEL_RESET (oldtype);
25845f
 
25845f
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c
25845f
index 71ffa17c5befd899..430bb4ef2bd2eb3e 100644
25845f
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c
25845f
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c
25845f
@@ -21,7 +21,6 @@
25845f
 
25845f
 #include <sysdep-cancel.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 #include <kernel-features.h>
25845f
 
25845f
@@ -39,16 +38,14 @@ __libc_pwrite64 (fd, buf, count, offset)
25845f
 
25845f
   if (SINGLE_THREAD_P)
25845f
     {
25845f
-      result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count,
25845f
-                                offset);
25845f
+      result = INLINE_SYSCALL (pwrite, 4, fd, buf, count, offset);
25845f
 
25845f
       return result;
25845f
     }
25845f
 
25845f
   int oldtype = LIBC_CANCEL_ASYNC ();
25845f
 
25845f
-  result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count,
25845f
-                            offset);
25845f
+  result = INLINE_SYSCALL (pwrite, 4, fd, buf, count, offset);
25845f
 
25845f
   LIBC_CANCEL_RESET (oldtype);
25845f
 
25845f
diff --git a/sysdeps/unix/sysv/linux/pread.c b/sysdeps/unix/sysv/linux/pread.c
25845f
index 4ea67fcb0b04c271..7322e42d6ed990c1 100644
25845f
--- a/sysdeps/unix/sysv/linux/pread.c
25845f
+++ b/sysdeps/unix/sysv/linux/pread.c
25845f
@@ -23,7 +23,6 @@
25845f
 
25845f
 #include <sysdep-cancel.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 #include <kernel-features.h>
25845f
 
25845f
@@ -44,7 +43,7 @@ do_pread (int fd, void *buf, size_t count, off_t offset)
25845f
   ssize_t result;
25845f
 
25845f
   assert (sizeof (offset) == 4);
25845f
-  result = INLINE_SYSCALL (pread, 5, fd, CHECK_N (buf, count), count,
25845f
+  result = INLINE_SYSCALL (pread, 5, fd, buf, count,
25845f
 			   __LONG_LONG_PAIR (offset >> 31, offset));
25845f
 
25845f
   return result;
25845f
diff --git a/sysdeps/unix/sysv/linux/pread64.c b/sysdeps/unix/sysv/linux/pread64.c
25845f
index 897b5674a75c23be..03e5f1402bf8b888 100644
25845f
--- a/sysdeps/unix/sysv/linux/pread64.c
25845f
+++ b/sysdeps/unix/sysv/linux/pread64.c
25845f
@@ -22,7 +22,6 @@
25845f
 
25845f
 #include <sysdep-cancel.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 #include <kernel-features.h>
25845f
 
25845f
@@ -39,7 +38,7 @@ do_pread64 (int fd, void *buf, size_t count, off64_t offset)
25845f
 {
25845f
   ssize_t result;
25845f
 
25845f
-  result = INLINE_SYSCALL (pread, 5, fd, CHECK_N (buf, count), count,
25845f
+  result = INLINE_SYSCALL (pread, 5, fd, buf, count,
25845f
 			   __LONG_LONG_PAIR ((off_t) (offset >> 32),
25845f
 					     (off_t) (offset & 0xffffffff)));
25845f
 
25845f
diff --git a/sysdeps/unix/sysv/linux/pwrite.c b/sysdeps/unix/sysv/linux/pwrite.c
25845f
index c4940fcdd09b0726..e773d65f2e5602a8 100644
25845f
--- a/sysdeps/unix/sysv/linux/pwrite.c
25845f
+++ b/sysdeps/unix/sysv/linux/pwrite.c
25845f
@@ -23,7 +23,6 @@
25845f
 
25845f
 #include <sysdep-cancel.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 #include <kernel-features.h>
25845f
 
25845f
@@ -44,7 +43,7 @@ do_pwrite (int fd, const void *buf, size_t count, off_t offset)
25845f
   ssize_t result;
25845f
 
25845f
   assert (sizeof (offset) == 4);
25845f
-  result = INLINE_SYSCALL (pwrite, 5, fd, CHECK_N (buf, count), count,
25845f
+  result = INLINE_SYSCALL (pwrite, 5, fd, buf, count,
25845f
 			   __LONG_LONG_PAIR (offset >> 31, offset));
25845f
 
25845f
   return result;
25845f
diff --git a/sysdeps/unix/sysv/linux/pwrite64.c b/sysdeps/unix/sysv/linux/pwrite64.c
25845f
index ad945a2903a44714..558a08e735616649 100644
25845f
--- a/sysdeps/unix/sysv/linux/pwrite64.c
25845f
+++ b/sysdeps/unix/sysv/linux/pwrite64.c
25845f
@@ -22,7 +22,6 @@
25845f
 
25845f
 #include <sysdep-cancel.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 #include <kernel-features.h>
25845f
 
25845f
@@ -39,7 +38,7 @@ do_pwrite64 (int fd, const void *buf, size_t count, off64_t offset)
25845f
 {
25845f
   ssize_t result;
25845f
 
25845f
-  result = INLINE_SYSCALL (pwrite, 5, fd, CHECK_N (buf, count), count,
25845f
+  result = INLINE_SYSCALL (pwrite, 5, fd, buf, count,
25845f
 			   __LONG_LONG_PAIR ((off_t) (offset >> 32),
25845f
 					     (off_t) (offset & 0xffffffff)));
25845f
 
25845f
diff --git a/sysdeps/unix/sysv/linux/readv.c b/sysdeps/unix/sysv/linux/readv.c
25845f
index 440e1039c3a8f3ac..e8acd65ce377963a 100644
25845f
--- a/sysdeps/unix/sysv/linux/readv.c
25845f
+++ b/sysdeps/unix/sysv/linux/readv.c
25845f
@@ -24,7 +24,6 @@
25845f
 
25845f
 #include <sysdep-cancel.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 #include <kernel-features.h>
25845f
 
25845f
 #ifndef __ASSUME_COMPLETE_READV_WRITEV
25845f
@@ -48,12 +47,12 @@ __libc_readv (fd, vector, count)
25845f
   ssize_t result;
25845f
 
25845f
   if (SINGLE_THREAD_P)
25845f
-    result = INLINE_SYSCALL (readv, 3, fd, CHECK_N (vector, count), count);
25845f
+    result = INLINE_SYSCALL (readv, 3, fd, vector, count);
25845f
   else
25845f
     {
25845f
       int oldtype = LIBC_CANCEL_ASYNC ();
25845f
 
25845f
-      result = INLINE_SYSCALL (readv, 3, fd, CHECK_N (vector, count), count);
25845f
+      result = INLINE_SYSCALL (readv, 3, fd, vector, count);
25845f
 
25845f
       LIBC_CANCEL_RESET (oldtype);
25845f
     }
25845f
diff --git a/sysdeps/unix/sysv/linux/semop.c b/sysdeps/unix/sysv/linux/semop.c
25845f
index 22bdeeb0f19bef15..4cd6891976858cc2 100644
25845f
--- a/sysdeps/unix/sysv/linux/semop.c
25845f
+++ b/sysdeps/unix/sysv/linux/semop.c
25845f
@@ -22,7 +22,6 @@
25845f
 
25845f
 #include <sysdep.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 /* Perform user-defined atomical operation of array of semaphores.  */
25845f
 
25845f
@@ -32,6 +31,5 @@ semop (semid, sops, nsops)
25845f
      struct sembuf *sops;
25845f
      size_t nsops;
25845f
 {
25845f
-  return INLINE_SYSCALL (ipc, 5, IPCOP_semop,
25845f
-			 semid, (int) nsops, 0, CHECK_N (sops, nsops));
25845f
+  return INLINE_SYSCALL (ipc, 5, IPCOP_semop, semid, (int) nsops, 0, sops);
25845f
 }
25845f
diff --git a/sysdeps/unix/sysv/linux/semtimedop.c b/sysdeps/unix/sysv/linux/semtimedop.c
25845f
index 6e2c40f3758483a9..5a43f53975aeafcc 100644
25845f
--- a/sysdeps/unix/sysv/linux/semtimedop.c
25845f
+++ b/sysdeps/unix/sysv/linux/semtimedop.c
25845f
@@ -22,7 +22,6 @@
25845f
 
25845f
 #include <sysdep.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 /* Perform user-defined atomical operation of array of semaphores.  */
25845f
 
25845f
@@ -34,6 +33,6 @@ semtimedop (semid, sops, nsops, timeout)
25845f
      const struct timespec *timeout;
25845f
 {
25845f
   return INLINE_SYSCALL (ipc, 6, IPCOP_semtimedop,
25845f
-			 semid, (int) nsops, 0, CHECK_N (sops, nsops),
25845f
+			 semid, (int) nsops, 0, sops,
25845f
 			 timeout);
25845f
 }
25845f
diff --git a/sysdeps/unix/sysv/linux/sh/pread.c b/sysdeps/unix/sysv/linux/sh/pread.c
25845f
index 3e7702f10d26c347..160c906a4d0197fd 100644
25845f
--- a/sysdeps/unix/sysv/linux/sh/pread.c
25845f
+++ b/sysdeps/unix/sysv/linux/sh/pread.c
25845f
@@ -23,7 +23,6 @@
25845f
 
25845f
 #include <sysdep-cancel.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 #include <kernel-features.h>
25845f
 
25845f
@@ -46,14 +45,14 @@ __libc_pread (fd, buf, count, offset)
25845f
 
25845f
   if (SINGLE_THREAD_P)
25845f
     {
25845f
-      result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
25845f
+      result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0,
25845f
 			       __LONG_LONG_PAIR (offset >> 31, offset));
25845f
       return result;
25845f
     }
25845f
 
25845f
   int oldtype = LIBC_CANCEL_ASYNC ();
25845f
 
25845f
-  result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
25845f
+  result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0,
25845f
 			   __LONG_LONG_PAIR (offset >> 31, offset));
25845f
 
25845f
   LIBC_CANCEL_RESET (oldtype);
25845f
diff --git a/sysdeps/unix/sysv/linux/sh/pread64.c b/sysdeps/unix/sysv/linux/sh/pread64.c
25845f
index 523ed7f82f5e5de7..bb4f13d06b72fdf1 100644
25845f
--- a/sysdeps/unix/sysv/linux/sh/pread64.c
25845f
+++ b/sysdeps/unix/sysv/linux/sh/pread64.c
25845f
@@ -22,7 +22,6 @@
25845f
 
25845f
 #include <sysdep-cancel.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 #include <kernel-features.h>
25845f
 
25845f
@@ -45,7 +44,7 @@ __libc_pread64 (fd, buf, count, offset)
25845f
 
25845f
   if (SINGLE_THREAD_P)
25845f
     {
25845f
-     result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
25845f
+     result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0,
25845f
 			      __LONG_LONG_PAIR ((off_t) (offset >> 32),
25845f
 			      (off_t) (offset & 0xffffffff)));
25845f
      return result;
25845f
@@ -53,7 +52,7 @@ __libc_pread64 (fd, buf, count, offset)
25845f
 
25845f
   int oldtype = LIBC_CANCEL_ASYNC ();
25845f
 
25845f
-  result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
25845f
+  result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0,
25845f
 			   __LONG_LONG_PAIR ((off_t) (offset >> 32),
25845f
 					     (off_t) (offset & 0xffffffff)));
25845f
 
25845f
diff --git a/sysdeps/unix/sysv/linux/sh/pwrite.c b/sysdeps/unix/sysv/linux/sh/pwrite.c
25845f
index e8052757aae56afe..b17bd87a5d4f74cc 100644
25845f
--- a/sysdeps/unix/sysv/linux/sh/pwrite.c
25845f
+++ b/sysdeps/unix/sysv/linux/sh/pwrite.c
25845f
@@ -23,7 +23,6 @@
25845f
 
25845f
 #include <sysdep-cancel.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 #include <kernel-features.h>
25845f
 
25845f
@@ -46,14 +45,14 @@ __libc_pwrite (fd, buf, count, offset)
25845f
 
25845f
   if (SINGLE_THREAD_P)
25845f
     {
25845f
-      result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
25845f
+      result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0,
25845f
 			       __LONG_LONG_PAIR (offset >> 31, offset));
25845f
       return result;
25845f
     }
25845f
 
25845f
   int oldtype = LIBC_CANCEL_ASYNC ();
25845f
 
25845f
-  result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
25845f
+  result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0,
25845f
 			   __LONG_LONG_PAIR (offset >> 31, offset));
25845f
 
25845f
   LIBC_CANCEL_RESET (oldtype);
25845f
diff --git a/sysdeps/unix/sysv/linux/sh/pwrite64.c b/sysdeps/unix/sysv/linux/sh/pwrite64.c
25845f
index 8f80fea49501ed2b..d9f41ec34cf01fb4 100644
25845f
--- a/sysdeps/unix/sysv/linux/sh/pwrite64.c
25845f
+++ b/sysdeps/unix/sysv/linux/sh/pwrite64.c
25845f
@@ -22,7 +22,6 @@
25845f
 
25845f
 #include <sysdep-cancel.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 #include <kernel-features.h>
25845f
 
25845f
@@ -45,7 +44,7 @@ __libc_pwrite64 (fd, buf, count, offset)
25845f
 
25845f
   if (SINGLE_THREAD_P)
25845f
     {
25845f
-     result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
25845f
+     result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0,
25845f
 			      __LONG_LONG_PAIR ((off_t) (offset >> 32),
25845f
 			     (off_t) (offset & 0xffffffff)));
25845f
 
25845f
@@ -54,7 +53,7 @@ __libc_pwrite64 (fd, buf, count, offset)
25845f
 
25845f
   int oldtype = LIBC_CANCEL_ASYNC ();
25845f
 
25845f
-  result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
25845f
+  result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0,
25845f
 			   __LONG_LONG_PAIR ((off_t) (offset >> 32),
25845f
 					     (off_t) (offset & 0xffffffff)));
25845f
 
25845f
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/msgrcv.c b/sysdeps/unix/sysv/linux/sparc/sparc64/msgrcv.c
25845f
index 15eb7983c6ebd3f9..3684a01142f68323 100644
25845f
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/msgrcv.c
25845f
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/msgrcv.c
25845f
@@ -22,8 +22,6 @@
25845f
 #include <sysdep-cancel.h>
25845f
 #include <sys/syscall.h>
25845f
 
25845f
-#include <bp-checks.h>
25845f
-
25845f
 ssize_t
25845f
 __libc_msgrcv (msqid, msgp, msgsz, msgtyp, msgflg)
25845f
      int msqid;
25845f
@@ -34,12 +32,12 @@ __libc_msgrcv (msqid, msgp, msgsz, msgtyp, msgflg)
25845f
 {
25845f
   if (SINGLE_THREAD_P)
25845f
     return INLINE_SYSCALL (ipc, 6, IPCOP_msgrcv, msqid, msgsz, msgflg,
25845f
-			   CHECK_N (msgp, msgsz), msgtyp);
25845f
+			   msgp, msgtyp);
25845f
 
25845f
   int oldtype = LIBC_CANCEL_ASYNC ();
25845f
 
25845f
   ssize_t result = INLINE_SYSCALL (ipc, 6, IPCOP_msgrcv, msqid, msgsz, msgflg,
25845f
-				   CHECK_N (msgp, msgsz), msgtyp);
25845f
+				   msgp, msgtyp);
25845f
 
25845f
   LIBC_CANCEL_RESET (oldtype);
25845f
 
25845f
diff --git a/sysdeps/unix/sysv/linux/sysctl.c b/sysdeps/unix/sysv/linux/sysctl.c
25845f
index f69c8229643ae5a9..e00ecfe85cfc0281 100644
25845f
--- a/sysdeps/unix/sysv/linux/sysctl.c
25845f
+++ b/sysdeps/unix/sysv/linux/sysctl.c
25845f
@@ -22,13 +22,11 @@
25845f
 
25845f
 #include <sysdep.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 
25845f
 int
25845f
 __sysctl (int *name, int nlen, void *oldval, size_t *oldlenp,
25845f
 	  void *newval, size_t newlen)
25845f
 {
25845f
-  /* GKM FIXME: force __sysctl_args decl to have unbounded pointers.  */
25845f
   struct __sysctl_args args =
25845f
   {
25845f
     .name = name,
25845f
@@ -38,9 +36,6 @@ __sysctl (int *name, int nlen, void *oldval, size_t *oldlenp,
25845f
     .newval = newval,
25845f
     .newlen = newlen
25845f
   };
25845f
-  (void) CHECK_N (name, nlen);
25845f
-  (void) CHECK_N (oldval, *oldlenp);
25845f
-  (void) CHECK_N (newval, newlen);
25845f
 
25845f
   return INLINE_SYSCALL (_sysctl, 1, __ptrvalue (&args));
25845f
 }
25845f
diff --git a/sysdeps/unix/sysv/linux/writev.c b/sysdeps/unix/sysv/linux/writev.c
25845f
index 26a68df6b902a6fc..8b018ecdf6fbc323 100644
25845f
--- a/sysdeps/unix/sysv/linux/writev.c
25845f
+++ b/sysdeps/unix/sysv/linux/writev.c
25845f
@@ -23,7 +23,6 @@
25845f
 
25845f
 #include <sysdep-cancel.h>
25845f
 #include <sys/syscall.h>
25845f
-#include <bp-checks.h>
25845f
 #include <kernel-features.h>
25845f
 
25845f
 #ifndef __ASSUME_COMPLETE_READV_WRITEV
25845f
@@ -47,12 +46,12 @@ __libc_writev (fd, vector, count)
25845f
   ssize_t result;
25845f
 
25845f
   if (SINGLE_THREAD_P)
25845f
-    result = INLINE_SYSCALL (writev, 3, fd, CHECK_N (vector, count), count);
25845f
+    result = INLINE_SYSCALL (writev, 3, fd, vector, count);
25845f
   else
25845f
     {
25845f
       int oldtype = LIBC_CANCEL_ASYNC ();
25845f
 
25845f
-      result = INLINE_SYSCALL (writev, 3, fd, CHECK_N (vector, count), count);
25845f
+      result = INLINE_SYSCALL (writev, 3, fd, vector, count);
25845f
 
25845f
       LIBC_CANCEL_RESET (oldtype);
25845f
     }