[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commits] r25891 - in /branches/eglibc-2_18: ./ libc/ libc/nptl/ libc/nptl/sysdeps/sparc/sparc32/ libc/nptl/sysdeps/sparc/sparc64/ lib...



Author: joseph
Date: Mon Sep 29 13:32:49 2014
New Revision: 25891

Log:
Merge changes between r25237 and r25890 from /fsf/glibc-2_18-branch.

Added:
    branches/eglibc-2_18/libc/nptl/tst-spin4.c
      - copied unchanged from r25890, fsf/glibc-2_18-branch/libc/nptl/tst-spin4.c
Modified:
    branches/eglibc-2_18/   (props changed)
    branches/eglibc-2_18/libc/ChangeLog
    branches/eglibc-2_18/libc/NEWS
    branches/eglibc-2_18/libc/nptl/Makefile
    branches/eglibc-2_18/libc/nptl/sysdeps/sparc/sparc32/pthread_spin_lock.S
    branches/eglibc-2_18/libc/nptl/sysdeps/sparc/sparc64/pthread_spin_lock.S
    branches/eglibc-2_18/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/nptl/c++-types.data   (props changed)
    branches/eglibc-2_18/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/nptl/localplt.data   (props changed)
    branches/eglibc-2_18/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/single/nptl/c++-types.data   (props changed)
    branches/eglibc-2_18/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/single/nptl/localplt.data   (props changed)
    branches/eglibc-2_18/libc/string/test-strcmp.c
    branches/eglibc-2_18/libc/sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S
    branches/eglibc-2_18/libc/sysdeps/sparc/sparc64/strcmp.S
    branches/eglibc-2_18/libc/sysdeps/unix/sysv/linux/sparc/bits/eventfd.h
    branches/eglibc-2_18/libc/sysdeps/unix/sysv/linux/sparc/bits/resource.h

Propchange: branches/eglibc-2_18/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Sep 29 13:32:49 2014
@@ -1,2 +1,2 @@
-/fsf/glibc-2_18-branch:23787-25237
+/fsf/glibc-2_18-branch:23787-25890
 /fsf/trunk:15224-23715

Modified: branches/eglibc-2_18/libc/ChangeLog
==============================================================================
--- branches/eglibc-2_18/libc/ChangeLog (original)
+++ branches/eglibc-2_18/libc/ChangeLog Mon Sep 29 13:32:49 2014
@@ -1,3 +1,42 @@
+2014-06-03  Guo Yixuan  <culu.gyx@xxxxxxxxx>
+
+	[BZ #16882]
+	* nptl/sysdeps/sparc/sparc32/pthread_spin_lock.S
+	(pthread_spin_lock): Branch out of spin loop to proper location.
+	* nptl/sysdeps/sparc/sparc64/pthread_spin_lock.S
+	(pthread_spin_lock): Likewise.
+
+	* nptl/tst-spin4.c: New test.
+	* nptl/Makefile (tests): Add tst-spin4.
+
+2014-05-17  Jose E. Marchesi  <jose.marchesi@xxxxxxxxxx>
+
+	[BZ #16958]
+	* sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S: Add missing
+	membar to avoid block loads/stores to overlap previous stores.
+
+2014-05-16  Aurelien Jarno  <aurelien@xxxxxxxxxxx>
+
+	[BZ #16943]
+	* sysdeps/unix/sysv/linux/sparc/bits/resource.h: Declare prlimit
+	and prlimit64.
+
+2014-05-06  Aurelien Jarno  <aurelien@xxxxxxxxxxx>
+
+        [BZ# 16916]
+        * sysdeps/unix/sysv/linux/sparc/bits/eventfd.h (EFD_SEMAPHORE):
+        Define.
+
+2014-05-01  David S. Miller  <davem@xxxxxxxxxxxxx>
+
+	[BZ #16885]
+	* sysdeps/sparc/sparc64/strcmp.S: Fix end comparison handling when
+	multiple zero bytes exist at the end of a string.
+	Reported by Aurelien Jarno <aurelien@xxxxxxxxxxx>
+
+	* string/test-strcmp.c (check): Add explicit test for situations where
+	there are multiple zero bytes after the first.
+
 2014-01-29  H.J. Lu  <hongjiu.lu@xxxxxxxxx>
 
 	[BZ #16510]

Modified: branches/eglibc-2_18/libc/NEWS
==============================================================================
--- branches/eglibc-2_18/libc/NEWS (original)
+++ branches/eglibc-2_18/libc/NEWS Mon Sep 29 13:32:49 2014
@@ -9,7 +9,8 @@
 
 * The following bugs are resolved with this release:
 
-  15073, 15128, 15909, 15996, 16150, 16169, 16387, 16510.
+  15073, 15128, 15909, 15996, 16150, 16169, 16387, 16510, 16885, 16916,
+  16943, 16958.
 
 Version 2.18
 
@@ -28,7 +29,7 @@
   15429, 15431, 15432, 15441, 15442, 15448, 15465, 15480, 15485, 15488,
   15490, 15492, 15493, 15497, 15506, 15529, 15536, 15553, 15577, 15583,
   15618, 15627, 15631, 15654, 15655, 15666, 15667, 15674, 15711, 15755,
-  15759, 15985.
+  15759, 15985, 16882.
 
 * CVE-2013-2207 Incorrectly granting access to another user's pseudo-terminal
   has been fixed by disabling the use of pt_chown (Bugzilla #15755).

Modified: branches/eglibc-2_18/libc/nptl/Makefile
==============================================================================
--- branches/eglibc-2_18/libc/nptl/Makefile (original)
+++ branches/eglibc-2_18/libc/nptl/Makefile Mon Sep 29 13:32:49 2014
@@ -212,7 +212,7 @@
 	tst-mutexpi1 tst-mutexpi2 tst-mutexpi3 tst-mutexpi4 tst-mutexpi5 \
 	tst-mutexpi5a tst-mutexpi6 tst-mutexpi7 tst-mutexpi7a tst-mutexpi8 \
 	tst-mutexpi9 \
-	tst-spin1 tst-spin2 tst-spin3 \
+	tst-spin1 tst-spin2 tst-spin3 tst-spin4 \
 	tst-cond1 tst-cond2 tst-cond3 tst-cond4 tst-cond5 tst-cond6 tst-cond7 \
 	tst-cond8 tst-cond9 tst-cond10 tst-cond11 tst-cond12 tst-cond13 \
 	tst-cond14 tst-cond15 tst-cond16 tst-cond17 tst-cond18 tst-cond19 \

Modified: branches/eglibc-2_18/libc/nptl/sysdeps/sparc/sparc32/pthread_spin_lock.S
==============================================================================
--- branches/eglibc-2_18/libc/nptl/sysdeps/sparc/sparc32/pthread_spin_lock.S (original)
+++ branches/eglibc-2_18/libc/nptl/sysdeps/sparc/sparc32/pthread_spin_lock.S Mon Sep 29 13:32:49 2014
@@ -19,11 +19,11 @@
 
 	.text
 ENTRY(pthread_spin_lock)
-	ldstub		[%o0], %g1
+1:	ldstub		[%o0], %g1
 	orcc		%g1, 0x0, %g0
 	bne,a		2f
 	 ldub		[%o0], %g1
-1:	retl
+	retl
 	 mov		0, %o0
 2:	orcc		%g1, 0x0, %g0
 	bne,a		2b

Modified: branches/eglibc-2_18/libc/nptl/sysdeps/sparc/sparc64/pthread_spin_lock.S
==============================================================================
--- branches/eglibc-2_18/libc/nptl/sysdeps/sparc/sparc64/pthread_spin_lock.S (original)
+++ branches/eglibc-2_18/libc/nptl/sysdeps/sparc/sparc64/pthread_spin_lock.S Mon Sep 29 13:32:49 2014
@@ -19,10 +19,10 @@
 
 	.text
 ENTRY(pthread_spin_lock)
-	ldstub		[%o0], %g1
+1:	ldstub		[%o0], %g1
 	brnz,pn		%g1, 2f
 	 membar		#StoreLoad | #StoreStore
-1:	retl
+	retl
 	 mov		0, %o0
 2:	ldub		[%o0], %g1
 	brnz,pt		%g1, 2b

Propchange: branches/eglibc-2_18/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/nptl/c++-types.data
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Sep 29 13:32:49 2014
@@ -1,3 +1,3 @@
-/fsf/glibc-2_18-branch/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/nptl/c++-types.data:23787-25237
+/fsf/glibc-2_18-branch/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/nptl/c++-types.data:23787-25890
 /fsf/trunk/libc/ports/data/c++-types-powerpce500v2-linux-gnu.data:15224-19464
 /fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/nptl/c++-types.data:19921-23715

Propchange: branches/eglibc-2_18/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/nptl/localplt.data
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Sep 29 13:32:49 2014
@@ -1,3 +1,3 @@
-/fsf/glibc-2_18-branch/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/nptl/localplt.data:23787-25237
+/fsf/glibc-2_18-branch/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/nptl/localplt.data:23787-25890
 /fsf/trunk/libc/ports/data/localplt-powerpce500v2-linux-gnu.data:15224-19464
 /fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/nptl/localplt.data:19921-23715

Propchange: branches/eglibc-2_18/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/single/nptl/c++-types.data
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Sep 29 13:32:49 2014
@@ -1,3 +1,3 @@
-/fsf/glibc-2_18-branch/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/single/nptl/c++-types.data:23787-25237
+/fsf/glibc-2_18-branch/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/single/nptl/c++-types.data:23787-25890
 /fsf/trunk/libc/ports/data/c++-types-powerpce500v1-linux-gnu.data:15224-19464
 /fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/single/nptl/c++-types.data:19921-23715

Propchange: branches/eglibc-2_18/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/single/nptl/localplt.data
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Sep 29 13:32:49 2014
@@ -1,3 +1,3 @@
-/fsf/glibc-2_18-branch/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/single/nptl/localplt.data:23787-25237
+/fsf/glibc-2_18-branch/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/single/nptl/localplt.data:23787-25890
 /fsf/trunk/libc/ports/data/localplt-powerpce500v1-linux-gnu.data:15224-19464
 /fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/single/nptl/localplt.data:19921-23715

Modified: branches/eglibc-2_18/libc/string/test-strcmp.c
==============================================================================
--- branches/eglibc-2_18/libc/string/test-strcmp.c (original)
+++ branches/eglibc-2_18/libc/string/test-strcmp.c Mon Sep 29 13:32:49 2014
@@ -329,6 +329,34 @@
 		FOR_EACH_IMPL (impl, 0)
 		check_result (impl, s1 + i1, s2 + i2, exp_result);
       }
+
+  /* Test cases where there are multiple zero bytes after the first.  */
+
+  for (size_t i = 0; i < 16 + 1; i++)
+    {
+      s1[i] = 0x00;
+      s2[i] = 0x00;
+    }
+
+  for (size_t i = 0; i < 16; i++)
+    {
+      int exp_result;
+
+      for (int val = 0x01; val < 0x100; val++)
+	{
+	  for (size_t j = 0; j < i; j++)
+	    {
+	      s1[j] = val;
+	      s2[j] = val;
+	    }
+
+	  s2[i] = val;
+
+	  exp_result = SIMPLE_STRCMP (s1, s2);
+	  FOR_EACH_IMPL (impl, 0)
+	    check_result (impl, s1, s2, exp_result);
+	}
+    }
 }
 
 

Modified: branches/eglibc-2_18/libc/sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S
==============================================================================
--- branches/eglibc-2_18/libc/sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S (original)
+++ branches/eglibc-2_18/libc/sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S Mon Sep 29 13:32:49 2014
@@ -211,6 +211,7 @@
 	 */
 	VISEntryHalf
 
+	membar		#Sync
 	alignaddr	%o1, %g0, %g0
 
 	add		%o1, (64 - 1), %o4

Modified: branches/eglibc-2_18/libc/sysdeps/sparc/sparc64/strcmp.S
==============================================================================
--- branches/eglibc-2_18/libc/sysdeps/sparc/sparc64/strcmp.S (original)
+++ branches/eglibc-2_18/libc/sysdeps/sparc/sparc64/strcmp.S Mon Sep 29 13:32:49 2014
@@ -121,6 +121,37 @@
 	movleu	%xcc, -1, %o0
 	srlx	rTMP1, 7, rTMP1
 
+	/* In order not to be influenced by bytes after the zero byte, we
+	 * have to retain only the highest bit in the mask for the comparison
+	 * with rSTRXOR to work properly.
+	 */
+	mov	0, rTMP2
+	andcc	rTMP1, 0x0100, %g0
+
+	movne	%xcc, 8, rTMP2
+	sllx	rTMP1, 63 - 16, %o1
+
+	movrlz	%o1, 16, rTMP2
+	sllx	rTMP1, 63 - 24, %o1
+
+	movrlz	%o1, 24, rTMP2
+	sllx	rTMP1, 63 - 32, %o1
+
+	movrlz	%o1, 32, rTMP2
+	sllx	rTMP1, 63 - 40, %o1
+
+	movrlz	%o1, 40, rTMP2
+	sllx	rTMP1, 63 - 48, %o1
+
+	movrlz	%o1, 48, rTMP2
+	sllx	rTMP1, 63 - 56, %o1
+
+	movrlz	%o1, 56, rTMP2
+
+	srlx	rTMP1, rTMP2, rTMP1
+
+	sllx	rTMP1, rTMP2, rTMP1
+
 	cmp	rTMP1, rSTRXOR
 	retl
 	 movgu	%xcc, 0, %o0

Modified: branches/eglibc-2_18/libc/sysdeps/unix/sysv/linux/sparc/bits/eventfd.h
==============================================================================
--- branches/eglibc-2_18/libc/sysdeps/unix/sysv/linux/sparc/bits/eventfd.h (original)
+++ branches/eglibc-2_18/libc/sysdeps/unix/sysv/linux/sparc/bits/eventfd.h Mon Sep 29 13:32:49 2014
@@ -22,6 +22,8 @@
 /* Flags for eventfd.  */
 enum
   {
+    EFD_SEMAPHORE = 0x000001,
+#define EFD_SEMAPHORE EFD_SEMAPHORE
     EFD_CLOEXEC = 0x400000,
 #define EFD_CLOEXEC EFD_CLOEXEC
     EFD_NONBLOCK = 0x004000

Modified: branches/eglibc-2_18/libc/sysdeps/unix/sysv/linux/sparc/bits/resource.h
==============================================================================
--- branches/eglibc-2_18/libc/sysdeps/unix/sysv/linux/sparc/bits/resource.h (original)
+++ branches/eglibc-2_18/libc/sysdeps/unix/sysv/linux/sparc/bits/resource.h Mon Sep 29 13:32:49 2014
@@ -252,3 +252,30 @@
   PRIO_USER = 2			/* WHO is a user ID.  */
 #define PRIO_USER PRIO_USER
 };
+
+__BEGIN_DECLS
+
+#ifdef __USE_GNU
+/* Modify and return resource limits of a process atomically.  */
+# ifndef __USE_FILE_OFFSET64
+extern int prlimit (__pid_t __pid, enum __rlimit_resource __resource,
+		    const struct rlimit *__new_limit,
+		    struct rlimit *__old_limit) __THROW;
+# else
+#  ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (prlimit, (__pid_t __pid,
+				     enum __rlimit_resource __resource,
+				     const struct rlimit *__new_limit,
+				     struct rlimit *__old_limit), prlimit64);
+#  else
+#   define prlimit prlimit64
+#  endif
+# endif
+# ifdef __USE_LARGEFILE64
+extern int prlimit64 (__pid_t __pid, enum __rlimit_resource __resource,
+		      const struct rlimit64 *__new_limit,
+		      struct rlimit64 *__old_limit) __THROW;
+# endif
+#endif
+
+__END_DECLS

_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits