Andreas Jaeger | 9 Feb 22:49
Gravatar

Fix for bz#13658 - using fsincos on x86-64

We should not use the inaccurate fsincos instruction on x86-64 (see 
bugzilla and the discussion on the gcc mailing list). Let's just remove 
the double version and use the IBM libm sincos implementation.

Unfortunately the same fix does not work for the long double version - 
since there's no sincos implementation for ldbl-96 yet ;-(. Jakub, you 
wrote the ldb-128 versions - do you have any suggestions?

Andreas

2012-02-09  Andreas Jaeger  <aj <at> suse.de>

	[BZ#13658]
	* sysdeps/x86_64/fpu/s_sincos.S: Remove, let's not use the
	inaccurate fsincos instruction.

--

-- 
  Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
   SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
    GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
     GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126
commit b9443d818d7046f903a5135fa5201c95601a68fa
Author: Andreas Jaeger <aj <at> suse.de>
Date:   Thu Feb 9 22:45:02 2012 +0100

    2012-02-09  Andreas Jaeger  <aj <at> suse.de>

    	[BZ#13658]
(Continue reading)

Richard Henderson | 9 Feb 20:25

[PATCH 1/2] Avoid pointer type mismatch warning.

update_get_addr returns a link_map*, but the return expression
was of type char*.  Fix by relying on gcc's void* arithmetic
extension and auto-conversion from void*.
---
 ChangeLog    |    4 ++++
 elf/dl-tls.c |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)

Committed as obvious.

diff --git a/ChangeLog b/ChangeLog
index 32f174d..8585e5a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-02-09  Richard Henderson  <rth <at> twiddle.net>
+
+	* elf/dl-tls.c (update_get_addr): Avoid pointer type mismatch warning.
+
 2012-02-08  Marek Polacek  <polacek <at> redhat.com>

 	* libio/libio.h: Remove _G_HAVE_SYS_CDEFS conditional.
diff --git a/elf/dl-tls.c b/elf/dl-tls.c
index 4358616..90f7a6d 100644
--- a/elf/dl-tls.c
+++ b/elf/dl-tls.c
@@ -756,7 +756,7 @@ update_get_addr (GET_ADDR_ARGS)
   if (__builtin_expect (p == TLS_DTV_UNALLOCATED, 0))
     return tls_get_addr_tail (GET_ADDR_PARAM, dtv, the_map);

(Continue reading)

Siddhesh Poyarekar | 9 Feb 13:01
Picon
Favicon
Gravatar

[PATCH] Fix allocation in nss_compat for large number of memberships to a group

Hi,

nss_compat allocates buffer space on stack using alloca (and
extend_alloca) for initgroup and keeps extending it to fit in larger
lines. This breaks for cases where the number of members in a gorup
are very large, causing the alloca reference to go beyond thread stack
boundary. Attached patch falls back to malloc/free if the buffer size
needed is beyond __libc_alloca_cutoff.

Regards,
Siddhesh

ChangeLog:

2012-02-09  Siddhesh Poyarekar  <siddhesh <at> redhat.com>

	* nis/nss_compat/compat-initgroups.c (getgrent_next_nss,
	_nss_compat_initgroups_dyn): Fall back to malloc/free for
	large group memberships.
diff --git a/nis/nss_compat/compat-initgroups.c b/nis/nss_compat/compat-initgroups.c
index caff38f..38c66cb 100644
--- a/nis/nss_compat/compat-initgroups.c
+++ b/nis/nss_compat/compat-initgroups.c
@@ -297,6 +297,8 @@ getgrent_next_nss (ent_t *ent, char *buffer, size_t buflen, const char *user,
       if (nss_initgroups_dyn (user, group, &mystart, &mysize, &mygroups,
 			      limit, errnop) == NSS_STATUS_SUCCESS)
 	{
+	  status = NSS_STATUS_NOTFOUND;
(Continue reading)

David Howells | 9 Feb 11:13
Picon
Favicon

[PATCH 1/2] Define ENOAUTHSERVICE to indicate "Authentication service unavailable" [ver #2]

As the kernel has or will have filesystems (and possibly other services) that
want to obtain authentication tokens and/or encryption data on demand (via
GSSAPI for example), it would seem useful to provide an additional error code
to indicate a problem with the lookup, rather than overloading some other error
code.

We already have EKEYREJECTED, EKEYREVOKED and EKEYEXPIRED to indicate problems
with a token that we already have, but what if the authentication server just
isn't available?

Define ENOAUTHSERVICE to indicate "Authentication service unavailable".  This
can be used to indicate, for example, that an attempt was made by request_key()
to retrieve a key, but the authentication server (e.g. a KDC) it is supposed to
contact didn't answer or that it couldn't determine the location of a suitable
server.

One way this can be used is that the user of a network filesystem can get a TGT
from the KDC and stash it in their session keyring, then the filesystem can
attempt to automatically get a ticket for accessing the filesystem - but if the
server is uncontactable then the ticket can be negatively instantiated with
KEYCTL_REJECT, giving the error to be handed to future requests as
ENOAUTHSERVICE and a small timeout so that the key will expire from the cache
and allow a retry after a short while to prevent thrashing.

Signed-off-by: David Howells <dhowells <at> redhat.com>
---

 arch/alpha/include/asm/errno.h  |    2 ++
 arch/mips/include/asm/errno.h   |    1 +
 arch/parisc/include/asm/errno.h |    1 +
(Continue reading)

Andreas Schwab | 8 Feb 22:24

[PATCH] Reduce ldouble ULPs for jn tests on x86

The ULPs for the recently added jn tests were only as big because of the
loss of precision in the argument.

Andreas.

2012-02-08  Andreas Schwab  <schwab <at> linux-m68k.org>

	* sysdeps/i386/fpu/libm-test-ulps: Reduce ldouble ULPs for jn
	tests.
	* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.

diff --git a/sysdeps/i386/fpu/libm-test-ulps b/sysdeps/i386/fpu/libm-test-ulps
index ebd46b0..cb73081 100644
--- a/sysdeps/i386/fpu/libm-test-ulps
+++ b/sysdeps/i386/fpu/libm-test-ulps
@@ -645,47 +645,45 @@ float: 1
 ifloat: 1
 double: 1
 idouble: 1
-ldouble: 82
-ildouble: 82
+ldouble: 1
+ildouble: 1
 Test "jn (3, 2.4048255576957729) == 0.19899990535769083404042146764530813":
-ldouble: 186
-ildouble: 186
+ldouble: 1
+ildouble: 1
 Test "jn (4, 2.4048255576957729) == 0.647466661641779720084932282551219891E-1":
-ldouble: 185
(Continue reading)

Andreas Schwab | 8 Feb 19:36

[PATCH] Remove have-initfini and need-nopic-initfini

2012-02-08  Andreas Schwab <schwab <at> linux-m68k.org>

	* Makeconfig (have-initfini): Don't set.
	* config.make.in (have-initfini, need-nopic-initfini): Don't set.
	* configure.in (nopic_initfini): Don't substitute.
	* config.h.in (HAVE_INITFINI): Don't #undef.
	* csu/Makefile (CPPFLAGS): Don't add -DHAVE_INITFINI.
	* csu/gmon-start.c: Assume HAVE_INITFINI is defined.

diff --git a/Makeconfig b/Makeconfig
index 68547b2..9a847db 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -389,9 +389,6 @@ ifndef asm-CPPFLAGS
 asm-CPPFLAGS =
 endif

-# ELF always supports init/fini sections
-have-initfini = yes
-
 ifeq ($(have-as-needed),yes)
 as-needed := -Wl,--as-needed
 no-as-needed := -Wl,--no-as-needed
@@ -405,14 +402,9 @@ no-whole-archive = -Wl,--no-whole-archive
 whole-archive = -Wl,--whole-archive

 # Installed name of the startup code.
-ifneq ($(have-initfini),yes)
-# When not having init/fini, there is just one startfile, called crt0.o.
-start-installed-name = crt0.o
(Continue reading)

Andreas Schwab | 8 Feb 18:31

[PATCH] powerpc: add crt files

2012-02-08  Andreas Schwab <schwab <at> linux-m68k.org>

	* sysdeps/powerpc/powerpc32/crti.S: New file.
	* sysdeps/powerpc/powerpc32/crtn.S: New file.
	* sysdeps/powerpc/powerpc64/crti.S: New file.
	* sysdeps/powerpc/powerpc64/crtn.S: New file.

diff --git a/sysdeps/powerpc/powerpc32/crti.S b/sysdeps/powerpc/powerpc32/crti.S
new file mode 100644
index 0000000..72e9cf4
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/crti.S
@@ -0,0 +1,90 @@
+/* Special .init and .fini section support for PowerPC.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file with other
+   programs, and to distribute those programs without any restriction
+   coming from the use of this file. (The GNU Lesser General Public
+   License restrictions do apply in other respects; for example, they
+   cover modification of the file, and distribution when not linked
+   into another program.)
(Continue reading)

Marek Polacek | 8 Feb 15:38
Picon
Favicon

[RFC] Provide crt[in].S for x86-64

This is an attempt to add sysdeps/x86_64/crt[in].S support.  I mostly
followed crt[in].S from i386 dir and from builddir/csu.  It looks like
it works, but I don't know how to test this properly apart from running
something like this:

#include <stdio.h>
#include <gnu/libc-version.h>

static void __attribute__ ((constructor))
con (void)
{
  puts ("con");
}

static void __attribute__ ((destructor))
dest (void)
{
  puts ("dest");
}

int
main (void)
{
  puts (gnu_get_libc_version ());
}

It compiles both on x86_64-unknown-linux-gnu and x86_64-redhat-linux and
the aforementioned program runs fine as well.
I'm not attaching the CL entry, license etc yet, I'll do this later.  It also looks
like we don't need any CFLAGS tweak (e.g. like on i386 with
(Continue reading)

David Howells | 8 Feb 13:29
Picon
Favicon

[PATCH 1/2] Define ENOAUTHSERVICE to indicate "Authentication service unavailable"

As the kernel has or will have filesystems (and possibly other services) that
want to obtain authentication tokens and/or encryption data on demand (via
GSSAPI for example), it would seem useful to provide an additional error code
to indicate a problem with the lookup, rather than overloading some other error
code.

We already have EKEYREJECTED, EKEYREVOKED and EKEYEXPIRED to indicate problems
with a token that we already have, but what if the authentication server just
isn't available?

Define ENOAUTHSERVICE to indicate "Authentication service unavailable".  This
can be used to indicate, for example, that an attempt was made by request_key()
to retrieve a key, but the authentication server (e.g. a KDC) it is supposed to
contact didn't answer or that it couldn't determine the location of a suitable
server.

One way this can be used is that the user of a network filesystem can get a TGT
from the KDC and stash it in their session keyring, then the filesystem can
attempt to automatically get a ticket for accessing the filesystem - but if the
server is uncontactable then the ticket can be negatively instantiated with
KEYCTL_REJECT, giving the error to be handed to future requests as
ENOAUTHSERVICE and a small timeout so that the key will expire from the cache
and allow a retry after a short while to prevent thrashing.

Signed-off-by: David Howells <dhowells <at> redhat.com>
---

 arch/alpha/include/asm/errno.h  |    1 +
 arch/mips/include/asm/errno.h   |    1 +
 arch/parisc/include/asm/errno.h |    1 +
(Continue reading)

Marek Polacek | 8 Feb 11:15
Picon
Favicon

[PATCH] Remove _G_HAVE_SYS_CDEFS

This patch removes _G_HAVE_SYS_CDEFS macro, which is always defined to 1.
Compiles on x86_64-unknown-linux-gnu and x86_64-redhat-linux.

Ok for trunk?

2012-02-08  Marek Polacek  <polacek <at> redhat.com>

	* libio/libio.h: Remove _G_HAVE_SYS_CDEFS conditional.
	* sysdeps/mach/hurd/_G_config.h: Remove _G_HAVE_SYS_CDEFS macro.
	* sysdeps/gnu/_G_config.h: Likewise.
	* sysdeps/generic/_G_config.h: Likewise.

--- libc/libio/libio.h.mp	2012-02-08 10:20:08.813327814 +0100
+++ libc/libio/libio.h	2012-02-08 10:20:33.015367270 +0100
@@ -59,12 +59,7 @@
 #endif

 #ifndef __P
-# if _G_HAVE_SYS_CDEFS
-#  include <sys/cdefs.h>
-# else
-#  define __P(p) p
-#  define __PMT(p) p
-# endif
+# include <sys/cdefs.h>
 #endif /*!__P*/

 #define _IO_UNIFIED_JUMPTABLES 1
--- libc/sysdeps/mach/hurd/_G_config.h.mp	2012-02-08 10:20:08.815327817 +0100
+++ libc/sysdeps/mach/hurd/_G_config.h	2012-02-08 10:23:57.585700780 +0100
(Continue reading)

Joseph S. Myers | 8 Feb 02:56

Arch maintainers: new approach for crti.o and crtn.o

glibc now supports building crti.o and crtn.o (both the csu/ versions and 
the nptl/ versions) from .S files, instead of the very fragile approach 
(which kept breaking with GCC changes) of postprocessing .s output from 
initfini.c and pt-initfini.c to separate function prologues and epilogues 
into separate files.

I have converted i386 to the new scheme so it serves as an example.  The 
maintainers of each other architecture should convert it; the crt[in].S 
files generated in csu/ and nptl/ in the object directory from a glibc 
build may serve as a starting point to clean up and check in.

(You will of course want the checked-in files to work on all supported 
variants of your architecture, not just the one for which your compiler 
was configured when building initfini.c and pt-initfini.c.  Some 
architectures have CFLAGS settings forcing particular CPU options when 
building those C files, others do not.  In any case, after the conversion 
for a particular architecture, any special makefile settings for the old 
approach with that architecture can be removed, as can any 
architecture-specific versions of initfini.c and pt-initfini.c.)

The deadline for the conversion, after which the transitional support for 
the old mechanism is expected to be removed, is 1 April (it may be removed 
before then if all libc architectures are converted sooner).

--

-- 
Joseph S. Myers
joseph <at> codesourcery.com


Gmane