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

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