All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] uclibc: add upstream 0.9.33 fixes
@ 2013-09-06 13:28 Peter Korsgaard
  2013-09-06 14:35 ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Korsgaard @ 2013-09-06 13:28 UTC (permalink / raw)
  To: buildroot

commit: http://git.buildroot.net/buildroot/commit/?id=055f1c02d35068d0b089f3b29ffdd4fb2717bb5c
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Upstream has a large number of patches lined up for the next 0.9.33.x bugfix
release;

http://git.uclibc.org/uClibc/log/?h=0.9.33

Add them here, as atleast some of them are quite critical (E.G. the eventfd
issue gets triggered by recent glib versions).

I've skipped the microblaze and xtensa fixes as we don't currently support
those with 0.9.33.2.

Drop uclibc-0002-Add-definition-of-MSG_WAITFORONE-and-MSG_CMSG_CMSG_CLOEXE.patch
as that is a subset of uclibc-0035-socket.h-pull-socket_type.h-from-eglibc.patch

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 ...ion-of-MSG_WAITFORONE-and-MSG_CMSG_CLOEXE.patch |   39 -
 ...ventfd-Implement-eventfd2-and-fix-eventfd.patch |   64 +
 .../uclibc-0014-pread-pwrite-backport-fix.patch    |  219 ++++
 .../0.9.33.2/uclibc-0015-add-posix_madvise.c.patch |   61 +
 ...ptl-sh-fix-race-condition-in-lll_wait_tid.patch |   38 +
 ...d-SIGCANCEL-to-the-list-of-blocked-signal.patch |   37 +
 ...18-ldso-include-dlfcn.h-for-RTLD_NODELETE.patch |   52 +
 ...nclude-elf.h-update-for-ELFOSABI_-changes.patch |   34 +
 ...0020-update-ptrace.h-to-latest-from-glibc.patch |  113 ++
 .../uclibc-0021-pread-pwrite-fix-for-threads.patch |   37 +
 ...x-authnone_marshal-in-multithreading-cont.patch |  128 ++
 ...t-__syscall_error-callers-to-use-a0-for-a.patch |   57 +
 ...-instead-of-v0-for-__syscall_error-argume.patch |   63 +
 ...se-.arm-mode-for-resolver-unconditionally.patch |   29 +
 ...s-getpid-behave-similar-to-the-common-one.patch |   53 +
 ...yscalls.h-allow-immediate-values-as-6th-s.patch |   33 +
 ...-0028-dl-fix-dlsym-lookups-with-RTLD_NEXT.patch |   57 +
 ...libc-0029-inet-rpc-fix-build-in-NPTL-case.patch |   58 +
 ...plement-assignment-allocation-m-character.patch |  190 +++
 ...map-sys_mmap2-do-unsigned-shift-of-offset.patch |   35 +
 ...e-handle-renamed-syscalls-in-common-ppc-x.patch |  114 ++
 .../uclibc-0033-rpmatch-backport-function.patch    |   78 ++
 .../uclibc-0034-statfs-support-f_frsize.patch      |  189 +++
 ...5-socket.h-pull-socket_type.h-from-eglibc.patch | 1374 ++++++++++++++++++++
 .../0.9.33.2/uclibc-0036-mount.h-update.patch      |   91 ++
 ...n_bits_syscall_h-do-not-leave-undefined-S.patch |   38 +
 ...38-libc-sysdeps-sync-bits-in.h-with-glibc.patch |  117 ++
 ...-reuse-free-slots-at-the-end-of-exit-func.patch |   43 +
 ...ame-MAP_UNINITIALIZE-to-MAP_UNINITIALIZED.patch |  200 +++
 .../uclibc-0041-libc-add-posix_fallocate.patch     |  337 +++++
 ...-fix-overflow-checking-in-int_add_no_wrap.patch |   44 +
 ...Add-missing-SYMBOL_PREFIX-to-symbol-names.patch |   86 ++
 ...inet-do-not-filter-responses-in-res_query.patch |   46 +
 ...-Remove-pragma-weak-for-undeclared-symbol.patch |   39 +
 ...tting-the-nameserver-from-_res-state-afte.patch |   34 +
 ...-use-fputws_unlocked-S-F-instead-of-fputw.patch |   30 +
 ...48-Fix-a-problem-with-scanning-wide-chars.patch |   66 +
 ...agileness-in-dlopen-do_dlopen-wrapper-wor.patch |   66 +
 ...lopen-implementation-from-statically-link.patch |   60 +
 ...ce-fix-backtrace-for-statically-linked-ap.patch |  168 +++
 ...libubacktrace-fix-build-due-to-some-typos.patch |   39 +
 ...plicitly-include-uClibc_page.h-to-make-PA.patch |   30 +
 42 files changed, 4647 insertions(+), 39 deletions(-)

Patch is too large, so refusing to show it

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [git commit] uclibc: add upstream 0.9.33 fixes
  2013-09-06 13:28 [Buildroot] [git commit] uclibc: add upstream 0.9.33 fixes Peter Korsgaard
@ 2013-09-06 14:35 ` Thomas Petazzoni
  2013-09-06 20:53   ` Peter Korsgaard
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2013-09-06 14:35 UTC (permalink / raw)
  To: buildroot

Dear Peter Korsgaard,

On Fri, 6 Sep 2013 15:28:51 +0200, Peter Korsgaard wrote:
> commit: http://git.buildroot.net/buildroot/commit/?id=055f1c02d35068d0b089f3b29ffdd4fb2717bb5c
> branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master
> 
> Upstream has a large number of patches lined up for the next 0.9.33.x bugfix
> release;
> 
> http://git.uclibc.org/uClibc/log/?h=0.9.33
> 
> Add them here, as atleast some of them are quite critical (E.G. the eventfd
> issue gets triggered by recent glib versions).
> 
> I've skipped the microblaze and xtensa fixes as we don't currently support
> those with 0.9.33.2.
> 
> Drop uclibc-0002-Add-definition-of-MSG_WAITFORONE-and-MSG_CMSG_CMSG_CLOEXE.patch
> as that is a subset of uclibc-0035-socket.h-pull-socket_type.h-from-eglibc.patch

Shouldn't we switch to using the git version of uClibc instead of
carrying 40+ patches? The uClibc project seems to have issues getting
releases out, maybe we should just use their git version, and bump it
from time to time when appropriate?

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [git commit] uclibc: add upstream 0.9.33 fixes
  2013-09-06 14:35 ` Thomas Petazzoni
@ 2013-09-06 20:53   ` Peter Korsgaard
  2013-09-09 16:26     ` Arnout Vandecappelle
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Korsgaard @ 2013-09-06 20:53 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

Hi,

 >> Drop uclibc-0002-Add-definition-of-MSG_WAITFORONE-and-MSG_CMSG_CMSG_CLOEXE.patch
 >> as that is a subset of uclibc-0035-socket.h-pull-socket_type.h-from-eglibc.patch

 Thomas> Shouldn't we switch to using the git version of uClibc instead of
 Thomas> carrying 40+ patches? The uClibc project seems to have issues getting
 Thomas> releases out, maybe we should just use their git version, and bump it
 Thomas> from time to time when appropriate?

Yes, Perhaps. When I started this, I only thought I would add 2-3
patches to fix the eventfd issue - but looking closer, the other patches
seemed worthwhile as well.

We do carry a few patches that aren't (yet?) part of upstream git on the
0.9.33 branch, so it wouldn't get rid of all patches (but most). Another
potential issue is that git almost becomes a hard buildroot dependency,
but that's probably not a big problem.

What do others say?

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [git commit] uclibc: add upstream 0.9.33 fixes
  2013-09-06 20:53   ` Peter Korsgaard
@ 2013-09-09 16:26     ` Arnout Vandecappelle
  0 siblings, 0 replies; 5+ messages in thread
From: Arnout Vandecappelle @ 2013-09-09 16:26 UTC (permalink / raw)
  To: buildroot

On 06/09/13 22:53, Peter Korsgaard wrote:
>>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
>
> Hi,
>
>   >> Drop uclibc-0002-Add-definition-of-MSG_WAITFORONE-and-MSG_CMSG_CMSG_CLOEXE.patch
>   >> as that is a subset of uclibc-0035-socket.h-pull-socket_type.h-from-eglibc.patch
>
>   Thomas> Shouldn't we switch to using the git version of uClibc instead of
>   Thomas> carrying 40+ patches? The uClibc project seems to have issues getting
>   Thomas> releases out, maybe we should just use their git version, and bump it
>   Thomas> from time to time when appropriate?
>
> Yes, Perhaps. When I started this, I only thought I would add 2-3
> patches to fix the eventfd issue - but looking closer, the other patches
> seemed worthwhile as well.
>
> We do carry a few patches that aren't (yet?) part of upstream git on the
> 0.9.33 branch, so it wouldn't get rid of all patches (but most). Another
> potential issue is that git almost becomes a hard buildroot dependency,
> but that's probably not a big problem.
>
> What do others say?

  I don't like the idea of using an unreleased version of something as 
essential as the standard library... It kind of shifts the burden of 
making sure that uclibc actually works to buildroot. If we do that, we 
could just as well use git versions of all packages.

  But of course, carrying such a large patchset is almost the same as 
using an unreleased version anyway.

  Regards,
  Arnout


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [git commit] uClibc: add upstream 0.9.33 fixes
@ 2012-02-16 11:20 Peter Korsgaard
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2012-02-16 11:20 UTC (permalink / raw)
  To: buildroot

commit: http://git.buildroot.net/buildroot/commit/?id=7553f043ad7e682e65867e3504f7dbf220b10bd7
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Fixes build on E.G. powerpc.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 ...__err-and-pass-it-to-INTERNAL_SYSCALL_NCS.patch |   30 ++++
 ...t-stat-fstat-Use-64bit-version-of-syscall.patch |  179 ++++++++++++++++++++
 2 files changed, 209 insertions(+), 0 deletions(-)

diff --git a/toolchain/uClibc/uClibc-0.9.33--Declare-__err-and-pass-it-to-INTERNAL_SYSCALL_NCS.patch b/toolchain/uClibc/uClibc-0.9.33--Declare-__err-and-pass-it-to-INTERNAL_SYSCALL_NCS.patch
new file mode 100644
index 0000000..68077f5
--- /dev/null
+++ b/toolchain/uClibc/uClibc-0.9.33--Declare-__err-and-pass-it-to-INTERNAL_SYSCALL_NCS.patch
@@ -0,0 +1,30 @@
+From ca457af92be7835edf77f34bead94f504fbc2d4b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 3 Feb 2012 10:57:44 -0800
+Subject: [PATCH 2/4] Declare __err and pass it to INTERNAL_SYSCALL_NCS so
+ subsequent macros can use it
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
+---
+ libc/sysdeps/linux/common/bits/syscalls-common.h |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libc/sysdeps/linux/common/bits/syscalls-common.h b/libc/sysdeps/linux/common/bits/syscalls-common.h
+index faebd1b..0f5a929 100644
+--- a/libc/sysdeps/linux/common/bits/syscalls-common.h
++++ b/libc/sysdeps/linux/common/bits/syscalls-common.h
+@@ -59,8 +59,8 @@
+ #ifndef INLINE_SYSCALL_NOERR_NCS
+ # define INLINE_SYSCALL_NOERR_NCS(name, nr, args...)			\
+ ({									\
+-	/*INTERNAL_SYSCALL_DECL(__err);*/					\
+-	long __res = INTERNAL_SYSCALL_NCS(name, /*__err*/, nr, args);	\
++	INTERNAL_SYSCALL_DECL(__err);					\
++	long __res = INTERNAL_SYSCALL_NCS(name, __err, nr, args);	\
+ 	__res;								\
+ })
+ #endif
+-- 
+1.7.8.3
+
diff --git a/toolchain/uClibc/uClibc-0.9.33-lstat-stat-fstat-Use-64bit-version-of-syscall.patch b/toolchain/uClibc/uClibc-0.9.33-lstat-stat-fstat-Use-64bit-version-of-syscall.patch
new file mode 100644
index 0000000..a9d1c96
--- /dev/null
+++ b/toolchain/uClibc/uClibc-0.9.33-lstat-stat-fstat-Use-64bit-version-of-syscall.patch
@@ -0,0 +1,179 @@
+From b813377f6c746118a9d2625e6b29ffeec4233663 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 3 Feb 2012 20:06:55 -0800
+Subject: [PATCH 3/4] lstat/stat/fstat: Use 64bit version of syscall if
+ available
+
+This is needed for stat'ing loop devices > 255
+since otherwise kernel returns EOVERFLOW becasue
+it needs st_rdev/st_dev to be larger than 16bits but
+in kernel it uses __old_kernel_stat for stat
+syscall which has st_rdev/st_dev as unsigned short
+
+Add a testcase
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
+---
+ libc/sysdeps/linux/common/fstat.c |   18 ++++++++++++++----
+ libc/sysdeps/linux/common/lstat.c |   19 ++++++++++++++-----
+ libc/sysdeps/linux/common/stat.c  |   18 ++++++++++++++----
+ test/stat/stat-loop256.c          |   32 ++++++++++++++++++++++++++++++++
+ 4 files changed, 74 insertions(+), 13 deletions(-)
+ create mode 100644 test/stat/stat-loop256.c
+
+diff --git a/libc/sysdeps/linux/common/fstat.c b/libc/sysdeps/linux/common/fstat.c
+index acc639b..4726a68 100644
+--- a/libc/sysdeps/linux/common/fstat.c
++++ b/libc/sysdeps/linux/common/fstat.c
+@@ -12,18 +12,28 @@
+ #include <sys/stat.h>
+ #include "xstatconv.h"
+ 
+-#define __NR___syscall_fstat __NR_fstat
+-static __inline__ _syscall2(int, __syscall_fstat, int, fd, struct kernel_stat *, buf)
+-
+ int fstat(int fd, struct stat *buf)
+ {
+ 	int result;
++#ifdef __NR_fstat64
++	/* normal stat call has limited values for various stat elements
++	 * e.g. uid device major/minor etc.
++	 * so we use 64 variant if available
++	 * in order to get newer versions of stat elements
++	 */
++	struct kernel_stat64 kbuf;
++	result = INLINE_SYSCALL(fstat64, 2, fd, &kbuf);
++	if (result == 0) {
++		__xstat32_conv(&kbuf, buf);
++	}
++#else
+ 	struct kernel_stat kbuf;
+ 
+-	result = __syscall_fstat(fd, &kbuf);
++	result = INLINE_SYSCALL(fstat, 2, fd, &kbuf);
+ 	if (result == 0) {
+ 		__xstat_conv(&kbuf, buf);
+ 	}
++#endif
+ 	return result;
+ }
+ libc_hidden_def(fstat)
+diff --git a/libc/sysdeps/linux/common/lstat.c b/libc/sysdeps/linux/common/lstat.c
+index aa77447..db72d1f 100644
+--- a/libc/sysdeps/linux/common/lstat.c
++++ b/libc/sysdeps/linux/common/lstat.c
+@@ -12,19 +12,28 @@
+ #include <sys/stat.h>
+ #include "xstatconv.h"
+ 
+-#define __NR___syscall_lstat __NR_lstat
+-static __inline__ _syscall2(int, __syscall_lstat,
+-		const char *, file_name, struct kernel_stat *, buf)
+-
+ int lstat(const char *file_name, struct stat *buf)
+ {
+ 	int result;
++#ifdef __NR_lstat64
++	/* normal stat call has limited values for various stat elements
++	 * e.g. uid device major/minor etc.
++	 * so we use 64 variant if available
++	 * in order to get newer versions of stat elements
++	 */
++	struct kernel_stat64 kbuf;
++	result = INLINE_SYSCALL(lstat64, 2, file_name, &kbuf);
++	if (result == 0) {
++		__xstat32_conv(&kbuf, buf);
++	}
++#else
+ 	struct kernel_stat kbuf;
+ 
+-	result = __syscall_lstat(file_name, &kbuf);
++	result = INLINE_SYSCALL(lstat, 2, file_name, &kbuf);
+ 	if (result == 0) {
+ 		__xstat_conv(&kbuf, buf);
+ 	}
++#endif
+ 	return result;
+ }
+ libc_hidden_def(lstat)
+diff --git a/libc/sysdeps/linux/common/stat.c b/libc/sysdeps/linux/common/stat.c
+index a6ab291..829f35a 100644
+--- a/libc/sysdeps/linux/common/stat.c
++++ b/libc/sysdeps/linux/common/stat.c
+@@ -12,20 +12,30 @@
+ #include <sys/stat.h>
+ #include "xstatconv.h"
+ 
+-#define __NR___syscall_stat __NR_stat
+ #undef stat
+-static __inline__ _syscall2(int, __syscall_stat,
+-		const char *, file_name, struct kernel_stat *, buf)
+ 
+ int stat(const char *file_name, struct stat *buf)
+ {
+ 	int result;
++#ifdef __NR_stat64
++	/* normal stat call has limited values for various stat elements
++	 * e.g. uid device major/minor etc.
++	 * so we use 64 variant if available
++	 * in order to get newer versions of stat elements
++	 */
++	struct kernel_stat64 kbuf;
++	result = INLINE_SYSCALL(stat64, 2, file_name, &kbuf);
++	if (result == 0) {
++		__xstat32_conv(&kbuf, buf);
++	}
++#else
+ 	struct kernel_stat kbuf;
+ 
+-	result = __syscall_stat(file_name, &kbuf);
++	result = INLINE_SYSCALL(stat, 2, file_name, &kbuf);
+ 	if (result == 0) {
+ 		__xstat_conv(&kbuf, buf);
+ 	}
++#endif
+ 	return result;
+ }
+ libc_hidden_def(stat)
+diff --git a/test/stat/stat-loop256.c b/test/stat/stat-loop256.c
+new file mode 100644
+index 0000000..14284c1
+--- /dev/null
++++ b/test/stat/stat-loop256.c
+@@ -0,0 +1,32 @@
++#include <stdio.h>
++#include <unistd.h>
++#include <stdlib.h>
++#include <sys/stat.h>
++int main()
++{
++    struct stat statbuf;
++    int ret = 0;
++    char* loop255 = "/dev/loop255";
++    char* loop256 = "/dev/loop256";
++    mode_t mode = 0660;
++    mknod(loop255, mode, 0x7ff);
++    mknod(loop256, mode, 0x100700);
++    ret = stat(loop255, &statbuf);
++    if(ret < 0) {
++	printf("stat: Cant stat %s\n",loop255);
++	unlink(loop255);
++	exit(1);
++    }
++    ret = stat(loop256, &statbuf);
++    if(ret < 0) {
++        printf("stat: Cant stat %s\n",loop256);
++	unlink(loop255);
++	unlink(loop256);
++        exit(1);
++    }
++
++    unlink(loop255);
++    unlink(loop256);
++    exit(0);
++}
++
+-- 
+1.7.8.3
+

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-09-09 16:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-06 13:28 [Buildroot] [git commit] uclibc: add upstream 0.9.33 fixes Peter Korsgaard
2013-09-06 14:35 ` Thomas Petazzoni
2013-09-06 20:53   ` Peter Korsgaard
2013-09-09 16:26     ` Arnout Vandecappelle
  -- strict thread matches above, loose matches on Subject: below --
2012-02-16 11:20 [Buildroot] [git commit] uClibc: " Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.