Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian Kernel (http://www.linux-archive.org/debian-kernel/)
-   -   Bug#689351: unblock: klibc/2.0.1-2 (http://www.linux-archive.org/debian-kernel/708889-bug-689351-unblock-klibc-2-0-1-2-a.html)

maximilian attems 10-01-2012 07:54 PM

Bug#689351: unblock: klibc/2.0.1-2
 
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package klibc

Has 3 fixes for armhf RC bug, plus security fix for dash
and a fix for x86 cross building.

See the diff:

diff --git a/debian/changelog b/debian/changelog
index 2e3a3c5..f595336 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,20 @@
+klibc (2.0.1-2) unstable; urgency=low
+
+ [ Sven Joachim ]
+ * [08c03cf] klibc: produces 64-bit binaries on i386 with x86_64 kernel
+ (Closes: #677087)
+
+ [ Thorsten Glaser ]
+ * [d8eae3a] [klibc] arm: fix trashing of callee-saved registers in thumb
+ setjmp() (Closes: #634890)
+ * [81170b5] [klibc] arm: unbreak armhf shared binaries (those with thumb)
+ * [aeb7847] armhf builds are always thumb
+
+ [ Jim Meyering ]
+ * [9ba90cd] [klibc] Avoid overflow for very long variable name
+
+ -- maximilian attems <maks@debian.org> Mon, 01 Oct 2012 15:54:05 +0200
+
klibc (2.0.1-1) unstable; urgency=high

* New upstream release (nfsmount, get{host,domain}name())
diff --git a/debian/patches/0001-klibc-Avoid-overflow-for-very-long-variable-name.patch b/debian/patches/0001-klibc-Avoid-overflow-for-very-long-variable-name.patch
new file mode 100644
index 0000000..3f151fa
--- /dev/null
+++ b/debian/patches/0001-klibc-Avoid-overflow-for-very-long-variable-name.patch
@@ -0,0 +1,62 @@
+From 127b17bb38dbfc95386a52b2159f059221d33497 Mon Sep 17 00:00:00 2001
+From: Jim Meyering <jim@meyering.net>
+Date: Tue, 3 Jul 2012 17:32:33 +0800
+Subject: [PATCH] [klibc] Avoid overflow for very long variable name
+
+Otherwise, this:
+ $ perl -le 'print "v"x(2**31+1) ."=1"' | dash
+provokes integer overflow:
+
+ (gdb) bt
+ #0 doformat (dest=0x61d580, f=0x416a08 "%s: %d: %s: ", ap=0x7fffffffd308)
+ at output.c:310
+ #1 0x00000000004128c1 in outfmt (file=0x61d580, fmt=0x416a08 "%s: %d: %s: ")
+ at output.c:257
+ #2 0x000000000040382e in exvwarning2 (msg=0x417339 "Out of space",
+ ap=0x7fffffffd468) at error.c:125
+ #3 0x000000000040387e in exverror (cond=1, msg=0x417339 "Out of space",
+ ap=0x7fffffffd468) at error.c:156
+ #4 0x0000000000403938 in sh_error (msg=0x417339 "Out of space") at error.c:172
+ #5 0x000000000040c970 in ckmalloc (nbytes=18446744071562067984)
+ at memalloc.c:57
+ #6 0x000000000040ca78 in stalloc (nbytes=18446744071562067972)
+ at memalloc.c:132
+ #7 0x000000000040ece9 in grabstackblock (len=18446744071562067972)
+ at memalloc.h:67
+ #8 0x00000000004106b5 in readtoken1 (firstc=118, syntax=0x419522 "",
+ eofmark=0x0, striptabs=0) at parser.c:1040
+ #9 0x00000000004101a4 in xxreadtoken () at parser.c:826
+ #10 0x000000000040fe1d in readtoken () at parser.c:697
+ #11 0x000000000040edcc in parsecmd (interact=0) at parser.c:145
+ #12 0x000000000040c679 in cmdloop (top=1) at main.c:224
+ #13 0x000000000040c603 in main (argc=2, argv=0x7fffffffd9f8) at main.c:178
+
+ #8 0x00000000004106b5 in readtoken1 (firstc=118, syntax=0x419522 "",
+ eofmark=0x0, striptabs=0) at parser.c:1040
+ 1040 grabstackblock(len);
+ (gdb) p len
+ $30 = -2147483644
+
+Signed-off-by: Jim Meyering <meyering@redhat.com>
+Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+Signed-off-by: maximilian attems <max@stro.at>
+---
+ usr/dash/parser.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/usr/dash/parser.c b/usr/dash/parser.c
+index 528d005..6e076a5 100644
+--- a/usr/dash/parser.c
++++ b/usr/dash/parser.c
+@@ -852,7 +852,7 @@ readtoken1(int firstc, char const *syntax, char *eofmark, int striptabs)
+ {
+ int c = firstc;
+ char *out;
+- int len;
++ size_t len;
+ struct nodelist *bqlist;
+ int quotef;
+ int dblquote;
+--
+1.7.10.4
+
diff --git a/debian/patches/0001-klibc-arm-fix-trashing-of-callee-saved-registers-in-.patch b/debian/patches/0001-klibc-arm-fix-trashing-of-callee-saved-registers-in-.patch
new file mode 100644
index 0000000..2b700ca
--- /dev/null
+++ b/debian/patches/0001-klibc-arm-fix-trashing-of-callee-saved-registers-in-.patch
@@ -0,0 +1,39 @@
+From 9bdffde924573bf1c2f795a4b57a302d9485d248 Mon Sep 17 00:00:00 2001
+From: Thorsten Glaser <tg@mirbsd.org>
+Date: Sat, 29 Sep 2012 19:20:37 +0000
+Subject: [PATCH 1/2] [klibc] arm: fix trashing of callee-saved registers in
+ thumb setjmp()
+
+fixes http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=634890
+(although dynamically-linked binaries seem to have another bug)
+
+Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
+Signed-off-by: maximilian attems <max@stro.at>
+---
+ usr/klibc/arch/arm/setjmp.S | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/usr/klibc/arch/arm/setjmp.S b/usr/klibc/arch/arm/setjmp.S
+index d351e0e..92ffc43 100644
+--- a/usr/klibc/arch/arm/setjmp.S
++++ b/usr/klibc/arch/arm/setjmp.S
+@@ -70,6 +70,7 @@ longjmp:
+ .type setjmp, #function
+ .thumb_func
+ setjmp:
++ mov r2, r0
+ mov r3, lr
+ stmia r0!, {r3, r4, r5, r6, r7}
+ mov r3, r8
+@@ -78,6 +79,8 @@ setjmp:
+ mov r6, fp
+ mov r7, sp
+ stmia r0!, {r3, r4, r5, r6, r7}
++ /* Do not trash r4 .. r7 */
++ ldmia r2!, {r3, r4, r5, r6, r7}
+ mov r0, #0
+ BX(lr)
+ .size setjmp,.-setjmp
+--
+1.7.10.4
+
diff --git a/debian/patches/0002-klibc-arm-unbreak-armhf-shared-binaries-those-with-t.patch b/debian/patches/0002-klibc-arm-unbreak-armhf-shared-binaries-those-with-t.patch
new file mode 100644
index 0000000..29d5714
--- /dev/null
+++ b/debian/patches/0002-klibc-arm-unbreak-armhf-shared-binaries-those-with-t.patch
@@ -0,0 +1,30 @@
+From 62d84fb8793fdf21c5267688de231cc1a111e070 Mon Sep 17 00:00:00 2001
+From: Thorsten Glaser <tg@mirbsd.org>
+Date: Sat, 29 Sep 2012 20:18:48 +0000
+Subject: [PATCH 2/2] [klibc] arm: unbreak armhf shared binaries (those with
+ thumb)
+
+The linker command was wrong.
+
+Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
+Signed-off-by: maximilian attems <max@stro.at>
+---
+ usr/klibc/arch/arm/MCONFIG | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/usr/klibc/arch/arm/MCONFIG b/usr/klibc/arch/arm/MCONFIG
+index addbe40..53bc1dc 100644
+--- a/usr/klibc/arch/arm/MCONFIG
++++ b/usr/klibc/arch/arm/MCONFIG
+@@ -19,7 +19,7 @@ ifeq ($(CONFIG_KLIBC_THUMB),y)
+ CPU_ARCH := $(CPU_ARCH)t
+ KLIBCREQFLAGS += -mthumb
+ KLIBCLDFLAGS += --thumb-entry _start
+-KLIBCEMAIN = --thumb-entry _start
++KLIBCEMAIN = --thumb-entry main
+ KLIBCREQFLAGS += -mabi=aapcs-linux
+ KLIBCSHAREDFLAGS = -Ttext 0x380200
+ else
+--
+1.7.10.4
+
diff --git a/debian/patches/series b/debian/patches/series
index c3df0dc..b9b1598 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,7 @@ klibc-linux-libc-dev
insmod
multiarch-include-path
Fix-minimal-mv-to-work-across-fs
+0001-klibc-Avoid-overflow-for-very-long-variable-name.patch
+0001-klibc-arm-fix-trashing-of-callee-saved-registers-in-.patch
+0002-klibc-arm-unbreak-armhf-shared-binaries-those-with-t.patch
+
diff --git a/debian/rules b/debian/rules
index 52f70e6..ec55d7d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,11 +10,14 @@ ifeq ($(DEB_HOST_ARCH),armel)
DEB_MAKE_ENVVARS := ARCH=arm CONFIG_AEABI=y
endif
ifeq ($(DEB_HOST_ARCH),armhf)
-DEB_MAKE_ENVVARS := ARCH=arm CONFIG_AEABI=y CPU_ARCH=armv7-a CPU_TUNE=cortex-a8
+DEB_MAKE_ENVVARS := ARCH=arm CONFIG_AEABI=y CPU_ARCH=armv7-a CPU_TUNE=cortex-a8 CONFIG_KLIBC_THUMB=y
endif
ifeq ($(DEB_HOST_ARCH),ia64)
DEB_MAKE_ENVVARS := ARCH=ia64
endif
+ifeq ($(DEB_HOST_ARCH),i386)
+DEB_MAKE_ENVVARS := ARCH=i386
+endif
ifeq ($(DEB_HOST_ARCH),sparc)
DEB_MAKE_ENVVARS := ARCH=sparc
endif

unblock klibc/2.0.1-2

-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (900, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.5-trunk-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash


--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/20121001195417.11458.56269.reportbug@shockwave


All times are GMT. The time now is 02:48 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.