[Armadeus-commitlog] armadeus branch, master, updated. release-3.4-301-gaa49ae2
Brought to you by:
sszy
|
From: Julien B a. A. <ar...@us...> - 2011-07-06 19:14:06
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via aa49ae2a8c3d25a154e80159cf92e55b57dae3ba (commit)
from 1300aa2c3d7035f97473e3a5440da8eda1e75f89 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit aa49ae2a8c3d25a154e80159cf92e55b57dae3ba
Author: Julien Boibessot <jul...@ar...>
Date: Wed Jul 6 21:12:56 2011 +0200
[BUILDROOT] uclibc: move times syscall patch as real BR patch and add its 0.9.30 counterpart
-----------------------------------------------------------------------
Summary of changes:
...s_syscall_return_value_as_standard_errors.patch | 55 ---------
.../152-uclibc-add_times_syscall_patches.patch | 120 ++++++++++++++++++++
2 files changed, 120 insertions(+), 55 deletions(-)
delete mode 100644 buildroot/toolchain/uClibc/uClibc-0.9.29-z-001-sysdeps-common-do_not_handle_times_syscall_return_value_as_standard_errors.patch
create mode 100644 patches/buildroot/2010.11/152-uclibc-add_times_syscall_patches.patch
diff --git a/buildroot/toolchain/uClibc/uClibc-0.9.29-z-001-sysdeps-common-do_not_handle_times_syscall_return_value_as_standard_errors.patch b/buildroot/toolchain/uClibc/uClibc-0.9.29-z-001-sysdeps-common-do_not_handle_times_syscall_return_value_as_standard_errors.patch
deleted file mode 100644
index 1878545..0000000
--- a/buildroot/toolchain/uClibc/uClibc-0.9.29-z-001-sysdeps-common-do_not_handle_times_syscall_return_value_as_standard_errors.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-Implements "times" syscall like on glibc: only EFAULT is considered as a valid
-error code from Linux kernel.
-To handle architectures that can't distinguish the error from a return value,
-make the application segfault in case of error (== bad struct tms parameter).
-
-Signed-off-by: Julien Boibessot <jul...@ar...>
-
-Reported to uClibc. Integrated in a different way in uClibc > 0.9.30.2 with this
-commit: http://git.uclibc.org/uClibc/commit/?id=779c35b7c4e47d9fc8f69ee582e822a2f6f45411
-
-Index: uClibc-0.9.29/libc/sysdeps/linux/common/times.c
-===================================================================
---- uClibc-0.9.29.orig/libc/sysdeps/linux/common/times.c 2010-01-27 10:15:38.000000000 +0100
-+++ uClibc-0.9.29/libc/sysdeps/linux/common/times.c 2010-01-27 10:49:37.000000000 +0100
-@@ -12,5 +12,39 @@
-
- libc_hidden_proto(times)
-
--_syscall1(clock_t, times, struct tms *, buf);
-+clock_t times(struct tms *buf)
-+{
-+ INTERNAL_SYSCALL_DECL (err);
-+ clock_t ret = INTERNAL_SYSCALL (times, err, 1, buf);
-+ if (INTERNAL_SYSCALL_ERROR_P (ret, err)
-+ && __builtin_expect (INTERNAL_SYSCALL_ERRNO (ret, err) == EFAULT, 0))
-+ {
-+ /* This might be an error or not. For architectures which have
-+ no separate return value and error indicators we cannot
-+ distinguish a return value of -1 from an error. Do it the
-+ hard way. We crash applications which pass in an invalid BUF
-+ pointer. */
-+#define touch(v) \
-+ do { \
-+ clock_t temp = v; \
-+ asm volatile ("" : "+r" (temp)); \
-+ v = temp; \
-+ } while (0)
-+ touch (buf->tms_utime);
-+ touch (buf->tms_stime);
-+ touch (buf->tms_cutime);
-+ touch (buf->tms_cstime);
-+
-+ /* If we come here the tms struct is valid and the kernel did not
-+ return an EFAULT error. Return the value given by the kernel. */
-+ }
-+
-+ /* Return value (clock_t) -1 signals an error to userspace, but if there
-+ wasn't any, return 0 instead. */
-+ if (ret == (clock_t) -1)
-+ return (clock_t) 0;
-+
-+ return ret;
-+}
-+
- libc_hidden_def(times)
diff --git a/patches/buildroot/2010.11/152-uclibc-add_times_syscall_patches.patch b/patches/buildroot/2010.11/152-uclibc-add_times_syscall_patches.patch
new file mode 100644
index 0000000..ec25816
--- /dev/null
+++ b/patches/buildroot/2010.11/152-uclibc-add_times_syscall_patches.patch
@@ -0,0 +1,120 @@
+Index: buildroot/toolchain/uClibc/uClibc-0.9.29-z-001-sysdeps-common-do_not_handle_times_syscall_return_value_as_standard_errors.patch
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ buildroot/toolchain/uClibc/uClibc-0.9.29-z-001-sysdeps-common-do_not_handle_times_syscall_return_value_as_standard_errors.patch 2011-07-06 20:31:43.000000000 +0200
+@@ -0,0 +1,55 @@
++Implements "times" syscall like on glibc: only EFAULT is considered as a valid
++error code from Linux kernel.
++To handle architectures that can't distinguish the error from a return value,
++make the application segfault in case of error (== bad struct tms parameter).
++
++Signed-off-by: Julien Boibessot <jul...@ar...>
++
++Reported to uClibc. Integrated in a different way in uClibc > 0.9.30.2 with this
++commit: http://git.uclibc.org/uClibc/commit/?id=779c35b7c4e47d9fc8f69ee582e822a2f6f45411
++
++Index: uClibc-0.9.29/libc/sysdeps/linux/common/times.c
++===================================================================
++--- uClibc-0.9.29.orig/libc/sysdeps/linux/common/times.c 2010-01-27 10:15:38.000000000 +0100
+++++ uClibc-0.9.29/libc/sysdeps/linux/common/times.c 2010-01-27 10:49:37.000000000 +0100
++@@ -12,5 +12,39 @@
++
++ libc_hidden_proto(times)
++
++-_syscall1(clock_t, times, struct tms *, buf);
+++clock_t times(struct tms *buf)
+++{
+++ INTERNAL_SYSCALL_DECL (err);
+++ clock_t ret = INTERNAL_SYSCALL (times, err, 1, buf);
+++ if (INTERNAL_SYSCALL_ERROR_P (ret, err)
+++ && __builtin_expect (INTERNAL_SYSCALL_ERRNO (ret, err) == EFAULT, 0))
+++ {
+++ /* This might be an error or not. For architectures which have
+++ no separate return value and error indicators we cannot
+++ distinguish a return value of -1 from an error. Do it the
+++ hard way. We crash applications which pass in an invalid BUF
+++ pointer. */
+++#define touch(v) \
+++ do { \
+++ clock_t temp = v; \
+++ asm volatile ("" : "+r" (temp)); \
+++ v = temp; \
+++ } while (0)
+++ touch (buf->tms_utime);
+++ touch (buf->tms_stime);
+++ touch (buf->tms_cutime);
+++ touch (buf->tms_cstime);
+++
+++ /* If we come here the tms struct is valid and the kernel did not
+++ return an EFAULT error. Return the value given by the kernel. */
+++ }
+++
+++ /* Return value (clock_t) -1 signals an error to userspace, but if there
+++ wasn't any, return 0 instead. */
+++ if (ret == (clock_t) -1)
+++ return (clock_t) 0;
+++
+++ return ret;
+++}
+++
++ libc_hidden_def(times)
+Index: buildroot/toolchain/uClibc/uClibc-0.9.30.3-z-001-sysdeps-common-do_not_handle_times_syscall_return_value_as_standard_errors.patch
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ buildroot/toolchain/uClibc/uClibc-0.9.30.3-z-001-sysdeps-common-do_not_handle_times_syscall_return_value_as_standard_errors.patch 2011-07-06 20:32:17.000000000 +0200
+@@ -0,0 +1,55 @@
++Implements "times" syscall like on glibc: only EFAULT is considered as a valid
++error code from Linux kernel.
++To handle architectures that can't distinguish the error from a return value,
++make the application segfault in case of error (== bad struct tms parameter).
++
++Signed-off-by: Julien Boibessot <jul...@ar...>
++
++Reported to uClibc. Integrated in a different way in uClibc > 0.9.30.2 with this
++commit: http://git.uclibc.org/uClibc/commit/?id=779c35b7c4e47d9fc8f69ee582e822a2f6f45411
++
++Index: uClibc-0.9.30/libc/sysdeps/linux/common/times.c
++===================================================================
++--- uClibc-0.9.30.orig/libc/sysdeps/linux/common/times.c 2010-01-27 10:15:38.000000000 +0100
+++++ uClibc-0.9.30/libc/sysdeps/linux/common/times.c 2010-01-27 10:49:37.000000000 +0100
++@@ -12,5 +12,39 @@
++
++ libc_hidden_proto(times)
++
++-_syscall1(clock_t, times, struct tms *, buf)
+++clock_t times(struct tms *buf)
+++{
+++ INTERNAL_SYSCALL_DECL (err);
+++ clock_t ret = INTERNAL_SYSCALL (times, err, 1, buf);
+++ if (INTERNAL_SYSCALL_ERROR_P (ret, err)
+++ && __builtin_expect (INTERNAL_SYSCALL_ERRNO (ret, err) == EFAULT, 0))
+++ {
+++ /* This might be an error or not. For architectures which have
+++ no separate return value and error indicators we cannot
+++ distinguish a return value of -1 from an error. Do it the
+++ hard way. We crash applications which pass in an invalid BUF
+++ pointer. */
+++#define touch(v) \
+++ do { \
+++ clock_t temp = v; \
+++ __asm__ __volatile__ ("" : "+r" (temp)); \
+++ v = temp; \
+++ } while (0)
+++ touch (buf->tms_utime);
+++ touch (buf->tms_stime);
+++ touch (buf->tms_cutime);
+++ touch (buf->tms_cstime);
+++
+++ /* If we come here the tms struct is valid and the kernel did not
+++ return an EFAULT error. Return the value given by the kernel. */
+++ }
+++
+++ /* Return value (clock_t) -1 signals an error to userspace, but if there
+++ wasn't any, return 0 instead. */
+++ if (ret == (clock_t) -1)
+++ return (clock_t) 0;
+++
+++ return ret;
+++}
+++
++ libc_hidden_def(times)
hooks/post-receive
--
armadeus
|