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

[commits] r9816 - in /fsf/trunk/libc: ./ sysdeps/ia64/ sysdeps/unix/sysv/linux/s390/s390-32/ sysdeps/unix/sysv/linux/sparc/



Author: eglibc
Date: Sun Feb  7 00:03:03 2010
New Revision: 9816

Log:
Import glibc-mainline for 2010-02-07

Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/sysdeps/ia64/memchr.S
    fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/utmp32.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/Versions

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Sun Feb  7 00:03:03 2010
@@ -1,3 +1,20 @@
+2010-02-05  H.J. Lu  <hongjiu.lu@xxxxxxxxx>
+
+	[BZ #11230]
+	* sysdeps/ia64/memchr.S: Don't read beyond the last byte
+	during recovery.
+
+2010-01-26  Andreas Schwab  <schwab@xxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/s390/s390-32/utmp32.c: Use internal
+	interface.
+	* sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.c: Likewise.
+	* sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.h: Declare internal
+	utmpx interface.
+
+	* sysdeps/unix/sysv/linux/sparc/Versions: Add new errlist compat
+	entry for 2.12.
+
 2010-02-03  Ulrich Drepper  <drepper@xxxxxxxxxx>
 
 	[BZ #11235]

Modified: fsf/trunk/libc/sysdeps/ia64/memchr.S
==============================================================================
--- fsf/trunk/libc/sysdeps/ia64/memchr.S (original)
+++ fsf/trunk/libc/sysdeps/ia64/memchr.S Sun Feb  7 00:03:03 2010
@@ -1,6 +1,6 @@
 /* Optimized version of the standard memchr() function.
    This file is part of the GNU C Library.
-   Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001, 2003, 2010 Free Software Foundation, Inc.
    Contributed by Dan Pop <Dan.Pop@xxxxxxx>.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -21,9 +21,9 @@
 /* Return: the address of the first occurence of chr in str or NULL
 
    Inputs:
-  	in0:	str
-  	in1:	chr
-  	in2:	byte count
+	in0:	str
+	in1:	chr
+	in2:	byte count
 
    This implementation assumes little endian mode.  For big endian mode,
    the instruction czx1.r should be replaced by czx1.l.
@@ -47,7 +47,7 @@
 #define saved_lc	r16
 #define	chr		r17
 #define len		r18
-#define pos0		r20
+#define last		r20
 #define val		r21
 #define tmp		r24
 #define chrx8		r25
@@ -62,12 +62,13 @@
 	.rotr	value[MEMLAT+1], addr[MEMLAT+3], aux[2], poschr[2]
 	.rotp	p[MEMLAT+3]
 	.save ar.lc, saved_lc
-        mov 	saved_lc = ar.lc 	// save the loop counter
+	mov	saved_lc = ar.lc	// save the loop counter
 	.save pr, saved_pr
 	mov	saved_pr = pr		// save the predicates
 	.body
-	mov 	ret0 = str
-	and 	tmp = 7, str		// tmp = str % 8
+	mov	ret0 = str
+	add	last = str, in2		// last byte
+	and	tmp = 7, str		// tmp = str % 8
 	cmp.ne	p7, p0 = r0, r0		// clear p7
 	extr.u	chr = in1, 0, 8		// chr = (unsigned char) in1
 	mov	len = in2
@@ -88,7 +89,7 @@
 .str_aligned:
 	cmp.ne	p6, p0 = r0, r0		// clear p6
 	shr.u	loopcnt = len, 3	// loopcnt = len / 8
-	and 	len = 7, len ;;		// remaining len = len & 7
+	and	len = 7, len ;;		// remaining len = len & 7
 	adds	loopcnt = -1, loopcnt
 	mov	ar.ec = MEMLAT + 3
 	mux1	chrx8 = chr, @brcst ;;	// get a word full of chr
@@ -119,7 +120,7 @@
 	mov	ret0 = r0 ;;	// return NULL
 .foundit:
 	.pred.rel "mutex" p6, p7
-(p6)	adds	ret0 = -1, ret0 		   // if we got here from l1 or l3
+(p6)	adds	ret0 = -1, ret0			   // if we got here from l1 or l3
 (p7)	add	ret0 = addr[MEMLAT+2], poschr[1]   // if we got here from l2
 	mov	pr = saved_pr, -1
 	mov	ar.lc = saved_lc
@@ -143,7 +144,10 @@
 	ld8	tmp = [ret0];;		// load the first unchecked 8byte
 	xor	aux[1] = tmp, chrx8;;
 	czx1.r	poschr[1] = aux[1];;
-	cmp.ne	p7, p0 = 8, poschr[1]
+	cmp.ne	p7, p0 = 8, poschr[1];;
+(p7)	add	ret0 = addr[MEMLAT+2], poschr[1];;
+(p7)	cmp.geu	p6, p7 = ret0, last	// don't go over the last byte
+(p6)	br.cond.spnt	.notfound;;
 (p7)	br.cond.spnt	.foundit;;
 	adds	ret0 = 8, ret0		// load the next unchecked 8byte
 	br.sptk	.l4;;

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/utmp32.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/utmp32.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/utmp32.c Sun Feb  7 00:03:03 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2008, 2010 Free Software Foundation, Inc.
    Contributed by Andreas Krebbel <Andreas.Krebbel@xxxxxxxxxx>.
    This file is part of the GNU C Library.
 
@@ -31,7 +31,7 @@
    calls.  */
 #define ALLOCATE_UTMP32_OUT(OUT)			\
   static struct utmp32 *OUT = NULL;			\
-  							\
+							\
   if (OUT == NULL)					\
     {							\
       OUT = malloc (sizeof (struct utmp32));		\
@@ -62,7 +62,7 @@
 struct utmp32 *
 getutid32 (const struct utmp32 *id)
 {
-  ACCESS_UTMP_ENTRY (getutid, id)
+  ACCESS_UTMP_ENTRY (__getutid, id)
 }
 symbol_version (getutid32, getutid, GLIBC_2.0);
 
@@ -71,7 +71,7 @@
 struct utmp32 *
 getutline32 (const struct utmp32 *line)
 {
-  ACCESS_UTMP_ENTRY (getutline, line)
+  ACCESS_UTMP_ENTRY (__getutline, line)
 }
 symbol_version (getutline32, getutline, GLIBC_2.0);
 
@@ -79,7 +79,7 @@
 struct utmp32 *
 pututline32 (const struct utmp32 *utmp_ptr)
 {
-  ACCESS_UTMP_ENTRY (pututline, utmp_ptr)
+  ACCESS_UTMP_ENTRY (__pututline, utmp_ptr)
 }
 symbol_version (pututline32, pututline, GLIBC_2.0);
 
@@ -90,7 +90,7 @@
   struct utmp *out64;
   ALLOCATE_UTMP32_OUT (out32);
 
-  out64 = getutent ();
+  out64 = __getutent ();
   if (!out64)
     return NULL;
 
@@ -108,7 +108,7 @@
   struct utmp *out64p;
   int ret;
 
-  ret = getutent_r (&out64, &out64p);
+  ret = __getutent_r (&out64, &out64p);
   if (ret == -1)
     {
       *result = NULL;
@@ -133,7 +133,7 @@
 
   utmp_convert32to64 (id, &in64);
 
-  ret = getutid_r (&in64, &out64, &out64p);
+  ret = __getutid_r (&in64, &out64, &out64p);
   if (ret == -1)
     {
       *result = NULL;
@@ -158,7 +158,7 @@
 
   utmp_convert32to64 (line, &in64);
 
-  ret = getutline_r (&in64, &out64, &out64p);
+  ret = __getutline_r (&in64, &out64, &out64p);
   if (ret == -1)
     {
       *result = NULL;
@@ -180,6 +180,6 @@
   struct utmp in32;
 
   utmp_convert32to64 (utmp, &in32);
-  updwtmp (wtmp_file, &in32);
+  __updwtmp (wtmp_file, &in32);
 }
 symbol_version (updwtmp32, updwtmp, GLIBC_2.0);

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.c Sun Feb  7 00:03:03 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2008, 2010 Free Software Foundation, Inc.
    Contributed by Andreas Krebbel <Andreas.Krebbel@xxxxxxxxxx>.
    This file is part of the GNU C Library.
 
@@ -34,7 +34,7 @@
    calls.  */
 #define ALLOCATE_UTMPX32_OUT(OUT)			\
   static struct utmpx32 *OUT = NULL;			\
-  							\
+							\
   if (OUT == NULL)					\
     {							\
       OUT = malloc (sizeof (struct utmpx32));		\
@@ -68,7 +68,7 @@
   struct utmpx *out64;
   ALLOCATE_UTMPX32_OUT (out32);
 
-  out64 = getutxent ();
+  out64 = __getutxent ();
   if (!out64)
     return NULL;
 
@@ -82,7 +82,7 @@
 struct utmpx32 *
 getutxid32 (const struct utmpx32 *id)
 {
-  ACCESS_UTMPX_ENTRY (getutxid, id);
+  ACCESS_UTMPX_ENTRY (__getutxid, id);
 }
 symbol_version (getutxid32, getutxid, GLIBC_2.1);
 
@@ -90,7 +90,7 @@
 struct utmpx32 *
 getutxline32 (const struct utmpx32 *line)
 {
-  ACCESS_UTMPX_ENTRY (getutxline, line);
+  ACCESS_UTMPX_ENTRY (__getutxline, line);
 }
 symbol_version (getutxline32, getutxline, GLIBC_2.1);
 
@@ -98,7 +98,7 @@
 struct utmpx32 *
 pututxline32 (const struct utmpx32 *utmpx)
 {
-  ACCESS_UTMPX_ENTRY (pututxline, utmpx);
+  ACCESS_UTMPX_ENTRY (__pututxline, utmpx);
 }
 symbol_version (pututxline32, pututxline, GLIBC_2.1);
 
@@ -109,7 +109,7 @@
   struct utmpx in64;
 
   utmpx_convert32to64 (utmpx, &in64);
-  updwtmpx (wtmpx_file, &in64);
+  __updwtmpx (wtmpx_file, &in64);
 }
 symbol_version (updwtmpx32, updwtmpx, GLIBC_2.1);
 
@@ -121,7 +121,7 @@
   struct utmp out64;
 
   utmpx_convert32to64 (utmpx, &in64);
-  getutmp (&in64, &out64);
+  __getutmp (&in64, &out64);
   utmp_convert64to32 (&out64, utmp);
 }
 symbol_version (getutmp32, getutmp, GLIBC_2.1.1);
@@ -134,7 +134,7 @@
   struct utmpx out64;
 
   utmp_convert32to64 (utmp, &in64);
-  getutmpx (&in64, &out64);
+  __getutmpx (&in64, &out64);
   utmpx_convert64to32 (&out64, utmpx);
 }
 symbol_version (getutmpx32, getutmpx, GLIBC_2.1.1);

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.h Sun Feb  7 00:03:03 2010
@@ -1,5 +1,5 @@
 /* The `struct utmp' type, describing entries in the utmp file.  GNU version.
-   Copyright (C) 1993, 1996, 1997, 1998, 1999, 2002, 2008
+   Copyright (C) 1993, 1996, 1997, 1998, 1999, 2002, 2008, 2010
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -49,4 +49,16 @@
   char __unused[20];		/* Reserved for future use.  */
 };
 
+/* The internal interface needed by the compat wrapper functions.  */
+extern struct utmpx *__getutxent (void);
+extern struct utmpx *__getutxid (__const struct utmpx *__id);
+extern struct utmpx *__getutxline (__const struct utmpx *__line);
+extern struct utmpx *__pututxline (__const struct utmpx *__utmpx);
+extern void __updwtmpx (__const char *__wtmpx_file,
+			__const struct utmpx *__utmpx);
+extern void __getutmp (__const struct utmpx *__utmpx,
+		       struct utmp *__utmp);
+extern void __getutmpx (__const struct utmp *__utmp,
+			struct utmpx *__utmpx);
+
 #endif /* utmpx32.h */

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/Versions
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/Versions (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/Versions Sun Feb  7 00:03:03 2010
@@ -19,6 +19,10 @@
     #errlist-compat	134
     _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
   }
+  GLIBC_2.12 {
+    #errlist-compat	135
+    _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
+  }
 }
 librt {
   GLIBC_2.3 {