This is the mail archive of the 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]

[PATCH 1/5] m68k: Fix sigaction kernel definition (BZ #23960)

Commit b4a5d26d883 (linux: Consolidate sigaction implementation) added
a wrong kernel_sigaction definition for m68k, meant for __NR_sigaction
instead of __NR_rt_sigaction as used on generic Linux sigaction
implementation.  This patch fixes it by using the Linux generic
definition meant for the RT kernel ABI.

Checked the signal tests on emulated m68-linux-gnu (Aranym).  It fixes
the faulty signal/tst-sigaction and man works as expected.

	James Clarke  <>
	Adhemerval Zanella  <>

	[BZ #23960]
	* sysdeps/unix/sysv/linux/kernel_sigaction.h (kernel_sigaction): Add
	comment about the difference due glibc definition.
	* sysdeps/unix/sysv/linux/m68k/kernel_sigaction.h (kernel_sigaction):
	Use Linux generic definition.
 ChangeLog                                      |  9 +++++++++
 sysdeps/unix/sysv/linux/kernel_sigaction.h     |  2 ++
 .../unix/sysv/linux/m68k/kernel_sigaction.h    | 18 ++----------------
 3 files changed, 13 insertions(+), 16 deletions(-)

diff --git a/sysdeps/unix/sysv/linux/kernel_sigaction.h b/sysdeps/unix/sysv/linux/kernel_sigaction.h
index 2dbec08099..b7359054b2 100644
--- a/sysdeps/unix/sysv/linux/kernel_sigaction.h
+++ b/sysdeps/unix/sysv/linux/kernel_sigaction.h
@@ -9,6 +9,8 @@ struct kernel_sigaction
   void (*sa_restorer) (void);
+  /* glibc sigset is larger than kernel expected one, however sigaction
+     passes the kernel expected size on rt_sigaction syscall.  */
   sigset_t sa_mask;
diff --git a/sysdeps/unix/sysv/linux/m68k/kernel_sigaction.h b/sysdeps/unix/sysv/linux/m68k/kernel_sigaction.h
index 54972feb13..eef4bb9b65 100644
--- a/sysdeps/unix/sysv/linux/m68k/kernel_sigaction.h
+++ b/sysdeps/unix/sysv/linux/m68k/kernel_sigaction.h
@@ -1,22 +1,8 @@
-#include <signal.h>
+/* m68k uses the generic Linux UAPI but defines SA_RESTORER.  */
 #define SA_RESTORER 0x04000000
-/* This is the sigaction structure from the Linux 3.2 kernel.  */
-struct kernel_sigaction
-  __sighandler_t k_sa_handler;
-  sigset_t sa_mask;
-  unsigned long sa_flags;
-  void (*sa_restorer) (void);
+#include <sysdeps/unix/sysv/linux/kernel_sigaction.h>
 #define SET_SA_RESTORER(kact, act)			\
   (kact)->sa_restorer = (act)->sa_restorer
 #define RESET_SA_RESTORER(act, kact)			\
   (act)->sa_restorer = (kact)->sa_restorer

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