This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.27.9000-310-gd8abfab


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  d8abfab7d46a02aa1d7f2985e2df8a890ad7054f (commit)
      from  583a27d525ae189bdfaa6784021b92a9a1dae12e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d8abfab7d46a02aa1d7f2985e2df8a890ad7054f

commit d8abfab7d46a02aa1d7f2985e2df8a890ad7054f
Author: Stefan Liebler <stli@linux.vnet.ibm.com>
Date:   Thu Apr 12 09:37:26 2018 +0200

    S390: Fix struct sigaction for 31bit in kernel_sigaction.h.
    
    The recent commit b4a5d26d8835d972995f0a0a2f805a8845bafa0b
    "linux: Consolidate sigaction implementation" changed the definition
    of struct sigaction for s390 (31bit). Unfortunately the order of the
    fields were wrong.
    
    This leads to blocking testcases e.g. nptl/tst-sem11.
    A thread which blocks due to sem_wait() is cancelled via pthread_cancel()
    and the signal-handler sigcancel_handler (see <glibc-src>/nptl/nptl-init.c
    is called.
    But it just returns as the siginfo_t argument is not setup by the kernel.
    Then the main-thread is blocking due to pthread_join().
    
    The flag SA_SIGINFO is set in sa_flags in struct sigaction and
    is copied to the "kernel_sigaction.h" struct by the sigaction() call,
    but due to the wrong ordering of the struct fields,
    the kernel does not recognize it.

diff --git a/ChangeLog b/ChangeLog
index 2b15609..dac4fff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2018-04-12  Stefan Liebler  <stli@linux.vnet.ibm.com>
+
+	* sysdeps/unix/sysv/linux/s390/kernel_sigaction.h
+	(struct kernel_sigaction): Use the same definition on 31bit as is used
+	on 64bit.
+
 2018-04-09  Florian Weimer  <fweimer@redhat.com>
 
 	[BZ #23037]
diff --git a/sysdeps/unix/sysv/linux/s390/kernel_sigaction.h b/sysdeps/unix/sysv/linux/s390/kernel_sigaction.h
index a8beaf7..7a6a2c4 100644
--- a/sysdeps/unix/sysv/linux/s390/kernel_sigaction.h
+++ b/sysdeps/unix/sysv/linux/s390/kernel_sigaction.h
@@ -11,15 +11,19 @@ struct kernel_sigaction
     void (*_sa_sigaction)(int, siginfo_t *, void *);
   } _u;
 #define k_sa_handler _u._sa_handler
-#ifndef __s390x__
-  sigset_t sa_mask;
-  unsigned long sa_flags;
-  void (*sa_restorer)(void);
-#else
+  /* The 'struct sigaction' definition in s390 kernel header
+     arch/s390/include/uapi/asm/signal.h is used for __NR_rt_sigaction
+     on 64 bits and for __NR_sigaction for 31 bits.
+
+     The expected layout for __NR_rt_sigaction for 31 bits is either
+     'struct sigaction' from include/linux/signal_types.h or
+     'struct compat_sigaction' from include/linux/compat.h.
+
+     So for __NR_rt_sigaction we can use the same layout for both s390x
+     and s390.  */
   unsigned long sa_flags;
   void (*sa_restorer)(void);
   sigset_t sa_mask;
-#endif
 };
 
 #define SET_SA_RESTORER(kact, act)             \

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                       |    6 ++++++
 sysdeps/unix/sysv/linux/s390/kernel_sigaction.h |   16 ++++++++++------
 2 files changed, 16 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]