aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog18
-rw-r--r--ports/ChangeLog.alpha7
-rw-r--r--ports/ChangeLog.mips7
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/semctl.c6
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/mips64/semctl.c5
-rw-r--r--sysdeps/generic/bp-semctl.h66
-rw-r--r--sysdeps/unix/sysv/linux/i386/semctl.c7
-rw-r--r--sysdeps/unix/sysv/linux/semctl.c13
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/semctl.c7
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c5
10 files changed, 44 insertions, 97 deletions
diff --git a/ChangeLog b/ChangeLog
index f5b0bc7875..5f7bf5499d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,24 @@
2013-01-31 Joseph Myers <joseph@codesourcery.com>
[BZ #13550]
+ * sysdeps/generic/bp-semctl.h: Remove file.
+ * sysdeps/unix/sysv/linux/i386/semctl.c: Don't include
+ <bp-checks.h> and <bp-semctl.h>.
+ (__old_semctl): Don't use CHECK_SEMCTL.
+ (__new_semctl): Likewise.
+ * sysdeps/unix/sysv/linux/semctl.c: Don't include <bp-checks.h>
+ and <bp-semctl.h>.
+ (__old_semctl): Don't use CHECK_SEMCTL.
+ (__new_semctl): Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sparc32/semctl.c: Don't include
+ <bp-checks.h> and <bp-semctl.h>.
+ (__old_semctl): Don't use CHECK_SEMCTL.
+ (__new_semctl): Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c: Don't include
+ <bp-checks.h> and <bp-semctl.h>.
+ (semctl): Don't use CHECK_SEMCTL.
+
+ [BZ #13550]
* Makerules (elide-bp-thunks): Remove variable.
(elide-routines.oS): Don't use $(elide-bp-thunks).
(elide-routines.os): Likewise.
diff --git a/ports/ChangeLog.alpha b/ports/ChangeLog.alpha
index 2284ae3faa..758e97c950 100644
--- a/ports/ChangeLog.alpha
+++ b/ports/ChangeLog.alpha
@@ -1,3 +1,10 @@
+2013-01-31 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #13550]
+ * sysdeps/unix/sysv/linux/alpha/semctl.c: Don't include
+ <bp-checks.h> and <bp-semctl.h>.
+ (__new_semctl): Don't use CHECK_SEMCTL.
+
2013-01-08 Andreas Jaeger <aj@suse.de>
[BZ# 14985]
diff --git a/ports/ChangeLog.mips b/ports/ChangeLog.mips
index 92553e7299..49a3938314 100644
--- a/ports/ChangeLog.mips
+++ b/ports/ChangeLog.mips
@@ -1,3 +1,10 @@
+2013-01-31 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #13550]
+ * sysdeps/unix/sysv/linux/mips/mips64/semctl.c: Don't include
+ <bp-checks.h> and <bp-semctl.h>.
+ (__semctl): Don't use CHECK_SEMCTL.
+
2013-01-29 Maciej W. Rozycki <macro@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h: Correct
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/semctl.c b/ports/sysdeps/unix/sysv/linux/alpha/semctl.c
index c18c695e3a..31278a06cf 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/semctl.c
+++ b/ports/sysdeps/unix/sysv/linux/alpha/semctl.c
@@ -33,10 +33,6 @@ union semun
struct seminfo *__buf; /* buffer for IPC_INFO */
};
-#include <bp-checks.h>
-#include <bp-semctl.h>
-
-
int
__new_semctl (int semid, int semnum, int cmd, ...)
{
@@ -51,7 +47,7 @@ __new_semctl (int semid, int semnum, int cmd, ...)
va_end (ap);
return INLINE_SYSCALL (semctl, 4, semid, semnum, cmd | __IPC_64,
- CHECK_SEMCTL (&arg, semid, cmd | __IPC_64)->array);
+ arg.array);
}
#include <shlib-compat.h>
diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/semctl.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/semctl.c
index 7e5488dbdc..e43e8937a5 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/mips64/semctl.c
+++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/semctl.c
@@ -30,9 +30,6 @@ union semun
struct seminfo *__buf; /* buffer for IPC_INFO */
};
-#include <bp-checks.h>
-#include <bp-semctl.h> /* definition of CHECK_SEMCTL needs union semum */
-
int __semctl (int semid, int semnum, int cmd, ...);
int
@@ -49,7 +46,7 @@ __semctl (int semid, int semnum, int cmd, ...)
va_end (ap);
return INLINE_SYSCALL (semctl, 4, semid, semnum, cmd | __IPC_64,
- CHECK_SEMCTL (&arg, semid, cmd | __IPC_64)->array);
+ arg.array);
}
#include <shlib-compat.h>
diff --git a/sysdeps/generic/bp-semctl.h b/sysdeps/generic/bp-semctl.h
deleted file mode 100644
index 1f3ab92c67..0000000000
--- a/sysdeps/generic/bp-semctl.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* Bounded-pointer checking macros for C.
- Copyright (C) 2000-2013 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Greg McGary <greg@mcgary.org>
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#ifndef _bp_semctl_h_
-#define _bp_semctl_h_ 1
-
-#if __BOUNDED_POINTERS__
-
-# define CHECK_SEMCTL(ARGP, SEMID, CMD) check_semctl (ARGP, SEMID, CMD)
-
-union semun *__unbounded
-check_semctl (union semun *arg, int semid, int cmd)
-{
- int ipc64 = (cmd & __IPC_64);
-
- switch (cmd & ~__IPC_64)
- {
- case IPC_STAT:
- case IPC_SET:
- (void) CHECK_1 (arg->buf);
- break;
-
- case GETALL:
- case SETALL:
- {
- struct semid_ds ds;
- union semun un = { .buf = &ds };
- unsigned int length = ~0;
-
- /* It's unfortunate that we need to make a recursive
- system call to get the size of the semaphore set... */
- if (semctl (semid, 0, IPC_STAT | ipc64, un) == 0)
- length = ds.sem_nsems;
- (void) CHECK_N (arg->array, length);
- break;
- }
-
- case IPC_INFO:
- (void) CHECK_1 (arg->__buf);
- break;
- }
-
- return __ptrvalue (arg);
-}
-
-#else
-# define CHECK_SEMCTL(ARGP, SEMID, CMD) (ARGP)
-#endif
-
-#endif /* _bp_semctl_h_ */
diff --git a/sysdeps/unix/sysv/linux/i386/semctl.c b/sysdeps/unix/sysv/linux/i386/semctl.c
index f3299eace2..67e75a1c74 100644
--- a/sysdeps/unix/sysv/linux/i386/semctl.c
+++ b/sysdeps/unix/sysv/linux/i386/semctl.c
@@ -49,9 +49,6 @@ union semun
struct __old_semid_ds *__old_buf;
};
-#include <bp-checks.h>
-#include <bp-semctl.h> /* definition of CHECK_SEMCTL needs union semum */
-
/* Return identifier for array of NSEMS semaphores associated with
KEY. */
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
@@ -75,7 +72,7 @@ __old_semctl (int semid, int semnum, int cmd, ...)
va_end (ap);
return INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd,
- CHECK_SEMCTL (&arg, semid, cmd));
+ &arg);
}
compat_symbol (libc, __old_semctl, semctl, GLIBC_2_0);
#endif
@@ -94,7 +91,7 @@ __new_semctl (int semid, int semnum, int cmd, ...)
va_end (ap);
return INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd | __IPC_64,
- CHECK_SEMCTL (&arg, semid, cmd | __IPC_64));
+ &arg);
}
versioned_symbol (libc, __new_semctl, semctl, GLIBC_2_2);
diff --git a/sysdeps/unix/sysv/linux/semctl.c b/sysdeps/unix/sysv/linux/semctl.c
index 40d31f9149..6c5c51e930 100644
--- a/sysdeps/unix/sysv/linux/semctl.c
+++ b/sysdeps/unix/sysv/linux/semctl.c
@@ -50,9 +50,6 @@ union semun
struct __old_semid_ds *__old_buf;
};
-#include <bp-checks.h>
-#include <bp-semctl.h> /* definition of CHECK_SEMCTL needs union semum */
-
/* Return identifier for array of NSEMS semaphores associated with
KEY. */
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
@@ -91,7 +88,7 @@ __old_semctl (int semid, int semnum, int cmd, ...)
va_end (ap);
return INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd,
- CHECK_SEMCTL (&arg, semid, cmd));
+ &arg);
}
compat_symbol (libc, __old_semctl, semctl, GLIBC_2_0);
#endif
@@ -126,7 +123,7 @@ __new_semctl (int semid, int semnum, int cmd, ...)
#if __ASSUME_IPC64 > 0
return INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd | __IPC_64,
- CHECK_SEMCTL (&arg, semid, cmd | __IPC_64));
+ &arg);
#else
switch (cmd)
{
@@ -136,7 +133,7 @@ __new_semctl (int semid, int semnum, int cmd, ...)
break;
default:
return INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd,
- CHECK_SEMCTL (&arg, semid, cmd));
+ &arg);
}
{
@@ -147,7 +144,7 @@ __new_semctl (int semid, int semnum, int cmd, ...)
/* Unfortunately there is no way how to find out for sure whether
we should use old or new semctl. */
result = INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd | __IPC_64,
- CHECK_SEMCTL (&arg, semid, cmd | __IPC_64));
+ &arg);
if (result != -1 || errno != EINVAL)
return result;
@@ -167,7 +164,7 @@ __new_semctl (int semid, int semnum, int cmd, ...)
}
}
result = INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd,
- CHECK_SEMCTL (&arg, semid, cmd));
+ &arg);
if (result != -1 && cmd != IPC_SET)
{
memset(buf, 0, sizeof(*buf));
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/semctl.c b/sysdeps/unix/sysv/linux/sparc/sparc32/semctl.c
index ef93f8c531..1a4bbac8f1 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/semctl.c
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/semctl.c
@@ -50,9 +50,6 @@ union semun
struct __old_semid_ds *__old_buf;
};
-#include <bp-checks.h>
-#include <bp-semctl.h> /* definition of CHECK_SEMCTL needs union semum */
-
/* Return identifier for array of NSEMS semaphores associated with
KEY. */
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
@@ -87,7 +84,7 @@ __old_semctl (int semid, int semnum, int cmd, ...)
}
return INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd,
- CHECK_SEMCTL (&arg, semid, cmd));
+ &arg);
}
compat_symbol (libc, __old_semctl, semctl, GLIBC_2_0);
#endif
@@ -117,7 +114,7 @@ __new_semctl (int semid, int semnum, int cmd, ...)
}
return INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd | __IPC_64,
- CHECK_SEMCTL (&arg, semid, cmd | __IPC_64));
+ &arg);
}
versioned_symbol (libc, __new_semctl, semctl, GLIBC_2_2);
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c b/sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c
index 4303d10e0e..9ada8e847c 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c
@@ -33,9 +33,6 @@ union semun
struct seminfo *__buf; /* buffer for IPC_INFO */
};
-#include <bp-checks.h>
-#include <bp-semctl.h> /* definition of CHECK_SEMCTL needs union semum */
-
/* Return identifier for array of NSEMS semaphores associated with
KEY. */
@@ -53,5 +50,5 @@ semctl (int semid, int semnum, int cmd, ...)
va_end (ap);
return INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd,
- CHECK_SEMCTL (&arg, semid, cmd)->array);
+ arg.array);
}