This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.28.9000-469-g64dd7a1
- From: azanella at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 18 Dec 2018 21:53:29 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.28.9000-469-g64dd7a1
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 64dd7a16305441a7d6ed752c192c68b6c2a54ca5 (commit)
via 8b1d5da56601ba7e59340dda235a6f3dbaa98ec9 (commit)
via f9eabb197fce8bab43376758fcb281bf2e4e88e0 (commit)
via 56b98bf1fb819b357318f39fccf2901d3c6b41ec (commit)
via 43a45c2d829f164c1fb94d5f44afe326fae946e1 (commit)
from 646ce7e0be9218f644ab50681b4d5a13d1050dd4 (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=64dd7a16305441a7d6ed752c192c68b6c2a54ca5
commit 64dd7a16305441a7d6ed752c192c68b6c2a54ca5
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Dec 11 17:16:36 2018 -0200
s390: Use generic kernel_sigaction.h
S390 kernel sigaction is the same as the Linux generic one.
Checked with a s390-linux-gnu and s390x-linux-gnu build.
* sysdeps/unix/sysv/linux/s390/kernel_sigaction.h: Use Linux generic
kernel_sigction definition.
diff --git a/ChangeLog b/ChangeLog
index 4abe516..1e55537 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2018-12-18 Adhemerval Zanella <adhemerval.zanella@linaro.org>
+ * sysdeps/unix/sysv/linux/s390/kernel_sigaction.h: Use Linux generic
+ kernel_sigction definition.
+
* sysdeps/unix/sysv/linux/ia64/kernel_sigaction.h: Remove file.
* sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h: Remove file.
diff --git a/sysdeps/unix/sysv/linux/s390/kernel_sigaction.h b/sysdeps/unix/sysv/linux/s390/kernel_sigaction.h
index 7a6a2c4..041b763 100644
--- a/sysdeps/unix/sysv/linux/s390/kernel_sigaction.h
+++ b/sysdeps/unix/sysv/linux/s390/kernel_sigaction.h
@@ -1,32 +1,9 @@
-#include <bits/types/siginfo_t.h>
-
+/* S390 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
-{
- union
- {
- __sighandler_t _sa_handler;
- void (*_sa_sigaction)(int, siginfo_t *, void *);
- } _u;
-#define k_sa_handler _u._sa_handler
- /* 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;
-};
-
#define SET_SA_RESTORER(kact, act) \
(kact)->sa_restorer = (act)->sa_restorer
#define RESET_SA_RESTORER(act, kact) \
(act)->sa_restorer = (kact)->sa_restorer
+
+#include <sysdeps/unix/sysv/linux/kernel_sigaction.h>
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8b1d5da56601ba7e59340dda235a6f3dbaa98ec9
commit 8b1d5da56601ba7e59340dda235a6f3dbaa98ec9
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Dec 11 17:15:07 2018 -0200
ia64: Remove kernel_sigaction.h
IA64 kernel_sigaction.h definition is the sama as the Linux generic
one.
Checked on ia64-linux-gnu.
* sysdeps/unix/sysv/linux/ia64/kernel_sigaction.h: Remove file.
diff --git a/ChangeLog b/ChangeLog
index 3307fe6..4abe516 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2018-12-18 Adhemerval Zanella <adhemerval.zanella@linaro.org>
+ * sysdeps/unix/sysv/linux/ia64/kernel_sigaction.h: Remove file.
+
* sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h: Remove file.
* sysdeps/unix/sysv/linux/alpha/Makefile: Update comment about
diff --git a/sysdeps/unix/sysv/linux/ia64/kernel_sigaction.h b/sysdeps/unix/sysv/linux/ia64/kernel_sigaction.h
deleted file mode 100644
index fc9f296..0000000
--- a/sysdeps/unix/sysv/linux/ia64/kernel_sigaction.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/* This is the sigaction structure from the Linux 3.2 kernel. */
-struct kernel_sigaction
-{
- __sighandler_t k_sa_handler;
- unsigned long sa_flags;
- sigset_t sa_mask; /* mask last for extensibility */
-};
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f9eabb197fce8bab43376758fcb281bf2e4e88e0
commit f9eabb197fce8bab43376758fcb281bf2e4e88e0
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Dec 11 17:14:09 2018 -0200
hppa: Remove kernel_sigaction.h
HPPA kernel_sigaction.h definition is the sama as the Linux generic
one and old_kernel_sigaction is not used.
Checked on hppa-linux-gnu.
* sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h: Remove file.
diff --git a/ChangeLog b/ChangeLog
index f304e58..3307fe6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2018-12-18 Adhemerval Zanella <adhemerval.zanella@linaro.org>
+ * sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h: Remove file.
+
* sysdeps/unix/sysv/linux/alpha/Makefile: Update comment about
__syscall_rt_sigaction.
* sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h
diff --git a/sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h b/sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h
deleted file mode 100644
index af048cb..0000000
--- a/sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* We have a separate header file here because we do not support
- SA_RESTORER on hppa. */
-
-/* This is the sigaction struction from the Linux 2.1.20 kernel. */
-/* Blah. This is bogus. We don't ever use it. */
-struct old_kernel_sigaction {
- __sighandler_t k_sa_handler;
- unsigned long sa_mask;
- unsigned long sa_flags;
-};
-
-/* This is the sigaction structure from the Linux 2.1.68 kernel. */
-
-struct kernel_sigaction {
- __sighandler_t k_sa_handler;
- unsigned long sa_flags;
- sigset_t sa_mask;
-};
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=56b98bf1fb819b357318f39fccf2901d3c6b41ec
commit 56b98bf1fb819b357318f39fccf2901d3c6b41ec
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Dec 11 16:57:49 2018 -0200
alpha: Use Linux generic sigaction implementation
Alpha rt_sigaction syscall uses a slight different kernel ABI than
generic one:
arch/alpha/kernel/signal.c
90 SYSCALL_DEFINE5(rt_sigaction, int, sig, const struct sigaction __user *, act,
91 struct sigaction __user *, oact,
92 size_t, sigsetsize, void __user *, restorer)
Similar as sparc, the syscall expects a restorer function. However
different than sparc, alpha defines the restorer as the 5th argument
(sparc defines as the 4th).
This patch removes the arch-specific alpha sigaction implementation,
adapt the Linux generic one to different restore placements (through
STUB macro), and make alpha use the Linux generic kernel_sigaction
definition.
Checked on alpha-linux-gnu and x86_64-linux-gnu (for sanity).
* sysdeps/unix/sysv/linux/alpha/Makefile: Update comment about
__syscall_rt_sigaction.
* sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h
(kernel_sigaction): Use Linux generic defintion.
(STUB): Define.
(__syscall_rt_sigreturn, __syscall_sigreturn): Add prototype.
* sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
(__syscall_rt_sigaction): Remove implementation.
(__syscall_sigreturn, __syscall_rt_sigreturn): Define as global and
hidden.
* sysdeps/unix/sysv/linux/alpha/sigaction.c: Remove file.
* sysdeps/unix/sysv/linux/alpha/sysdep.h (INLINE_SYSCALL,
INTERNAL_SYSCALL): Remove definitions.
* sysdeps/unix/sysv/linux/sigaction.c: Define STUB to accept both the
action and signal set size.
* sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c (STUB): Redefine.
* sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c (STUB): Likewise.
diff --git a/ChangeLog b/ChangeLog
index 7891b7a..f304e58 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,24 @@
2018-12-18 Adhemerval Zanella <adhemerval.zanella@linaro.org>
+
+ * sysdeps/unix/sysv/linux/alpha/Makefile: Update comment about
+ __syscall_rt_sigaction.
+ * sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h
+ (kernel_sigaction): Use Linux generic defintion.
+ (STUB): Define.
+ (__syscall_rt_sigreturn, __syscall_sigreturn): Add prototype.
+ * sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
+ (__syscall_rt_sigaction): Remove implementation.
+ (__syscall_sigreturn, __syscall_rt_sigreturn): Define as global and
+ hidden.
+ * sysdeps/unix/sysv/linux/alpha/sigaction.c: Remove file.
+ * sysdeps/unix/sysv/linux/alpha/sysdep.h (INLINE_SYSCALL,
+ INTERNAL_SYSCALL): Remove definitions.
+ * sysdeps/unix/sysv/linux/sigaction.c: Define STUB to accept both the
+ action and signal set size.
+ * sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c (STUB): Redefine.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c (STUB): Likewise.
+
+2018-12-18 Adhemerval Zanella <adhemerval.zanella@linaro.org>
James Clarke <jrtc27@jrtc27.com>
[BZ #23960]
diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile
index 50f4fb1..fdd089a 100644
--- a/sysdeps/unix/sysv/linux/alpha/Makefile
+++ b/sysdeps/unix/sysv/linux/alpha/Makefile
@@ -31,7 +31,7 @@ libm-routines += multc3 divtc3
endif # math
ifeq ($(subdir),nptl)
-# pull in __syscall_error routine, __sigprocmask, __syscall_rt_sigaction
+# pull in __syscall_error routine, __sigprocmask, sigaction stubs.
libpthread-routines += sysdep sigprocmask rt_sigaction
libpthread-shared-only-routines += sysdep sigprocmask rt_sigaction
endif
diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h b/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h
index 25180ff..679179b 100644
--- a/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h
+++ b/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h
@@ -1,12 +1,11 @@
-#ifndef _KERNEL_SIGACTION_H
-# define _KERNEL_SIGACTION_H
+#include <sysdeps/unix/sysv/linux/kernel_sigaction.h>
-/* This is the sigaction structure from the Linux 3.2 kernel. */
-struct kernel_sigaction
-{
- __sighandler_t k_sa_handler;
- unsigned int sa_flags;
- sigset_t sa_mask;
-};
+void __syscall_rt_sigreturn (void) attribute_hidden;
+void __syscall_sigreturn (void) attribute_hidden;
-#endif
+#define STUB(act, sigsetsize) \
+ (sigsetsize), \
+ (act) ? ((unsigned long)((act->sa_flags & SA_SIGINFO) \
+ ? &__syscall_rt_sigreturn \
+ : &__syscall_sigreturn)) \
+ : 0
diff --git a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
index ca25eee..17e5523 100644
--- a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
+++ b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
@@ -18,43 +18,6 @@
#include <sysdep.h>
-/* On Alpha we desparately want to avoid having to issue an imb. Ordinarily
- the kernel would have to issue one after setting up the signal return
- stack, but the Linux rt_sigaction syscall is prepared to accept a pointer
- to the sigreturn syscall, instead of inlining it on the stack.
-
- This just about halves signal delivery time. */
-
- .text
-
-ENTRY(__syscall_rt_sigaction)
- cfi_startproc
- ldgp gp,0(pv)
-#ifdef PROF
- .set noat
- lda AT, _mcount
- jsr AT, (AT), _mcount
- .set at
-#endif
- .prologue 1
-
- beq a1, 0f
- ldl t0, 8(a1) # sa_flags
-
- ldah a4, __syscall_sigreturn(gp) !gprelhigh
- ldah t1, __syscall_rt_sigreturn(gp) !gprelhigh
- lda a4, __syscall_sigreturn(a4) !gprellow
- lda t1, __syscall_rt_sigreturn(t1) !gprellow
- and t0, 0x40, t0 # SA_SIGINFO
- cmovne t0, t1, a4
-
-0: ldi v0, __NR_rt_sigaction
- callsys
- bne a3, SYSCALL_ERROR_LABEL
- ret
- cfi_endproc
-PSEUDO_END(__syscall_rt_sigaction)
-
/* To enable unwinding through the signal frame without special hackery
elsewhere, describe the entire struct sigcontext with unwind info.
@@ -104,6 +67,8 @@ __syscall_sigreturn:
callsys
.size __syscall_sigreturn, .-__syscall_sigreturn
.type __syscall_sigreturn, @function
+ .global __syscall_sigreturn;
+ .hidden __syscall_sigreturn;
/* See above wrt including the nop. */
cfi_def_cfa_offset (176 + 648)
@@ -116,5 +81,7 @@ __syscall_rt_sigreturn:
callsys
.size __syscall_rt_sigreturn, .-__syscall_rt_sigreturn
.type __syscall_rt_sigreturn, @function
+ .global __syscall_rt_sigreturn;
+ .hidden __syscall_rt_sigreturn;
cfi_endproc
diff --git a/sysdeps/unix/sysv/linux/alpha/sigaction.c b/sysdeps/unix/sysv/linux/alpha/sigaction.c
deleted file mode 100644
index 8051043..0000000
--- a/sysdeps/unix/sysv/linux/alpha/sigaction.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright (C) 2003-2018 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.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <sysdep.h>
-#include <sys/cdefs.h>
-#include <stddef.h>
-
-/*
- * In order to get the hidden arguments for rt_sigaction set up
- * properly, we need to call the assembly version. Detect this in the
- * INLINE_SYSCALL macro, and fail to expand inline in that case.
- */
-
-#undef INLINE_SYSCALL
-#define INLINE_SYSCALL(name, nr, args...) \
- (__NR_##name == __NR_rt_sigaction \
- ? __syscall_rt_sigaction(args) \
- : INLINE_SYSCALL1(name, nr, args))
-
-struct kernel_sigaction;
-extern int __syscall_rt_sigaction (int, const struct kernel_sigaction *,
- struct kernel_sigaction *, size_t);
-
-#include <sysdeps/unix/sysv/linux/sigaction.c>
diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h
index 0804050..9148b47 100644
--- a/sysdeps/unix/sysv/linux/alpha/sysdep.h
+++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h
@@ -72,27 +72,4 @@
#define SINGLE_THREAD_BY_GLOBAL 1
-/*
- * In order to get the hidden arguments for rt_sigaction set up
- * properly, we need to call the assembly version. This shouldn't
- * happen except for inside sigaction.c, where we handle this
- * specially. Catch other uses and error.
- */
-
-#undef INLINE_SYSCALL
-#define INLINE_SYSCALL(name, nr, args...) \
-({ \
- extern char ChEcK[__NR_##name == __NR_rt_sigaction ? -1 : 1] \
- __attribute__((unused)); \
- INLINE_SYSCALL1(name, nr, args); \
-})
-
-#undef INTERNAL_SYSCALL
-#define INTERNAL_SYSCALL(name, err_out, nr, args...) \
-({ \
- extern char ChEcK[__NR_##name == __NR_rt_sigaction ? -1 : 1] \
- __attribute__((unused)); \
- INTERNAL_SYSCALL1(name, err_out, nr, args); \
-})
-
#endif /* _LINUX_ALPHA_SYSDEP_H */
diff --git a/sysdeps/unix/sysv/linux/sigaction.c b/sysdeps/unix/sysv/linux/sigaction.c
index 0e6851a..233ab1f 100644
--- a/sysdeps/unix/sysv/linux/sigaction.c
+++ b/sysdeps/unix/sysv/linux/sigaction.c
@@ -33,7 +33,7 @@
/* SPARC passes the restore function as an argument to rt_sigaction. */
#ifndef STUB
-# define STUB(act)
+# define STUB(act, sigsetsize) (sigsetsize)
#endif
/* If ACT is not NULL, change the action for SIG to *ACT.
@@ -57,7 +57,7 @@ __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
real size of the user-level sigset_t. */
result = INLINE_SYSCALL_CALL (rt_sigaction, sig,
act ? &kact : NULL,
- oact ? &koact : NULL, STUB(act) _NSIG / 8);
+ oact ? &koact : NULL, STUB (act, _NSIG / 8));
if (oact && result >= 0)
{
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c b/sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c
index 191f587..9f1a31a 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c
@@ -27,11 +27,12 @@
static void __rt_sigreturn_stub (void);
static void __sigreturn_stub (void);
-#define STUB(act) \
+#define STUB(act, sigsetsize) \
(act) ? ((unsigned long)((act->sa_flags & SA_SIGINFO) \
? &__rt_sigreturn_stub \
: &__sigreturn_stub) - 8) \
- : 0,
+ : 0, \
+ (sigsetsize)
#include <sysdeps/unix/sysv/linux/sigaction.c>
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c b/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c
index cfbbc6e..acc76b1 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c
@@ -24,8 +24,9 @@
static void __rt_sigreturn_stub (void);
-#define STUB(act) \
- (((unsigned long) &__rt_sigreturn_stub) - 8),
+#define STUB(act, sigsetsize) \
+ (((unsigned long) &__rt_sigreturn_stub) - 8), \
+ (sigsetsize)
#include <sysdeps/unix/sysv/linux/sigaction.c>
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=43a45c2d829f164c1fb94d5f44afe326fae946e1
commit 43a45c2d829f164c1fb94d5f44afe326fae946e1
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Dec 11 16:52:47 2018 -0200
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.
Adhemerval Zanella <adhemerval.zanella@linaro.org>
James Clarke <jrtc27@jrtc27.com>
[BZ #23960]
* sysdeps/unix/sysv/linux/kernel_sigaction.h (HAS_SA_RESTORER):
Define if SA_RESTORER is defined.
(kernel_sigaction): Define sa_restorer if HAS_SA_RESTORER is defined.
(SET_SA_RESTORER, RESET_SA_RESTORER): Define iff the macro are not
already defined.
* sysdeps/unix/sysv/linux/m68k/kernel_sigaction.h (SA_RESTORER,
kernel_sigaction, SET_SA_RESTORER, RESET_SA_RESTORER): Remove
definitions.
(HAS_SA_RESTORER): Define.
* sysdeps/unix/sysv/linux/sparc/kernel_sigaction.h (SA_RESTORER,
SET_SA_RESTORER, RESET_SA_RESTORER): Remove definition.
(HAS_SA_RESTORER): Define.
* sysdeps/unix/sysv/linux/nios2/kernel_sigaction.h: Include generic
kernel_sigaction after define SET_SA_RESTORER and RESET_SA_RESTORER.
* sysdeps/unix/sysv/linux/powerpc/kernel_sigaction.h: Likewise.
* sysdeps/unix/sysv/linux/x86_64/sigaction.c: Likewise.
diff --git a/ChangeLog b/ChangeLog
index a276503..7891b7a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2018-12-18 Adhemerval Zanella <adhemerval.zanella@linaro.org>
+ James Clarke <jrtc27@jrtc27.com>
+
+ [BZ #23960]
+ * sysdeps/unix/sysv/linux/kernel_sigaction.h (HAS_SA_RESTORER):
+ Define if SA_RESTORER is defined.
+ (kernel_sigaction): Define sa_restorer if HAS_SA_RESTORER is defined.
+ (SET_SA_RESTORER, RESET_SA_RESTORER): Define iff the macro are not
+ already defined.
+ * sysdeps/unix/sysv/linux/m68k/kernel_sigaction.h (SA_RESTORER,
+ kernel_sigaction, SET_SA_RESTORER, RESET_SA_RESTORER): Remove
+ definitions.
+ (HAS_SA_RESTORER): Define.
+ * sysdeps/unix/sysv/linux/sparc/kernel_sigaction.h (SA_RESTORER,
+ SET_SA_RESTORER, RESET_SA_RESTORER): Remove definition.
+ (HAS_SA_RESTORER): Define.
+ * sysdeps/unix/sysv/linux/nios2/kernel_sigaction.h: Include generic
+ kernel_sigaction after define SET_SA_RESTORER and RESET_SA_RESTORER.
+ * sysdeps/unix/sysv/linux/powerpc/kernel_sigaction.h: Likewise.
+ * sysdeps/unix/sysv/linux/s390/kernel_sigaction.h: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/sigaction.c: Likewise.
+
2018-12-18 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/kernel-features.h
diff --git a/sysdeps/unix/sysv/linux/kernel_sigaction.h b/sysdeps/unix/sysv/linux/kernel_sigaction.h
index 2dbec08..1c36146 100644
--- a/sysdeps/unix/sysv/linux/kernel_sigaction.h
+++ b/sysdeps/unix/sysv/linux/kernel_sigaction.h
@@ -1,19 +1,27 @@
#ifndef _KERNEL_SIGACTION_H
# define _KERNEL_SIGACTION_H
+#ifdef SA_RESTORER
+# define HAS_SA_RESTORER 1
+#endif
+
/* This is the sigaction structure from the Linux 3.2 kernel. */
struct kernel_sigaction
{
__sighandler_t k_sa_handler;
unsigned long sa_flags;
-#ifdef SA_RESTORER
+#ifdef HAS_SA_RESTORER
void (*sa_restorer) (void);
#endif
+ /* glibc sigset is larger than kernel expected one, however sigaction
+ passes the kernel expected size on rt_sigaction syscall. */
sigset_t sa_mask;
};
-#ifndef SA_RESTORER
+#ifndef SET_SA_RESTORER
# define SET_SA_RESTORER(kact, act)
+#endif
+#ifndef RESET_SA_RESTORER
# define RESET_SA_RESTORER(act, kact)
#endif
diff --git a/sysdeps/unix/sysv/linux/m68k/kernel_sigaction.h b/sysdeps/unix/sysv/linux/m68k/kernel_sigaction.h
index 54972fe..464b351 100644
--- a/sysdeps/unix/sysv/linux/m68k/kernel_sigaction.h
+++ b/sysdeps/unix/sysv/linux/m68k/kernel_sigaction.h
@@ -1,22 +1,4 @@
-#ifndef _KERNEL_SIGACTION_H
-# define _KERNEL_SIGACTION_H
-
-#include <signal.h>
-
-#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);
-};
-
-#define SET_SA_RESTORER(kact, act) \
- (kact)->sa_restorer = (act)->sa_restorer
-#define RESET_SA_RESTORER(act, kact) \
- (act)->sa_restorer = (kact)->sa_restorer
-
-#endif
+/* m68k does not define SA_RESTORER, but does have sa_restorer member
+ on kernel sigaction struct. */
+#define HAS_SA_RESTORER 1
+#include <sysdeps/unix/sysv/linux/kernel_sigaction.h>
diff --git a/sysdeps/unix/sysv/linux/nios2/kernel_sigaction.h b/sysdeps/unix/sysv/linux/nios2/kernel_sigaction.h
index 4ada322..89f9bce 100644
--- a/sysdeps/unix/sysv/linux/nios2/kernel_sigaction.h
+++ b/sysdeps/unix/sysv/linux/nios2/kernel_sigaction.h
@@ -1,8 +1,9 @@
/* NIOS2 uses the generic Linux UAPI but defines SA_RESTORER. */
#define SA_RESTORER 0x04000000
-#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
+
+#include <sysdeps/unix/sysv/linux/kernel_sigaction.h>
diff --git a/sysdeps/unix/sysv/linux/powerpc/kernel_sigaction.h b/sysdeps/unix/sysv/linux/powerpc/kernel_sigaction.h
index aef3d5a..bac03ee 100644
--- a/sysdeps/unix/sysv/linux/powerpc/kernel_sigaction.h
+++ b/sysdeps/unix/sysv/linux/powerpc/kernel_sigaction.h
@@ -1,9 +1,10 @@
/* powerpc kernel sigaction is similar to generic Linux UAPI one,
but the architecture also defines SA_RESTORER. */
#define SA_RESTORER 0x04000000
-#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
+
+#include <sysdeps/unix/sysv/linux/kernel_sigaction.h>
diff --git a/sysdeps/unix/sysv/linux/sh/kernel_sigaction.h b/sysdeps/unix/sysv/linux/sh/kernel_sigaction.h
index 7ebcd08..c8dc77a 100644
--- a/sysdeps/unix/sysv/linux/sh/kernel_sigaction.h
+++ b/sysdeps/unix/sysv/linux/sh/kernel_sigaction.h
@@ -1,8 +1,9 @@
/* SH uses the generic Linux UAPI but defines SA_RESTORER. */
#define SA_RESTORER 0x04000000
-#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
+
+#include <sysdeps/unix/sysv/linux/kernel_sigaction.h>
diff --git a/sysdeps/unix/sysv/linux/sparc/kernel_sigaction.h b/sysdeps/unix/sysv/linux/sparc/kernel_sigaction.h
index bee7e9c..eb4a522 100644
--- a/sysdeps/unix/sysv/linux/sparc/kernel_sigaction.h
+++ b/sysdeps/unix/sysv/linux/sparc/kernel_sigaction.h
@@ -1,10 +1,5 @@
/* SPARC 'struct __new_sigaction' is similar to generic Linux UAPI with
a sa_restorer field, even though function is passed as an argument
to rt_sigaction syscall. */
-#define SA_RESTORER 0x04000000
+#define HAS_SA_RESTORER 1
#include <sysdeps/unix/sysv/linux/kernel_sigaction.h>
-
-#define SET_SA_RESTORER(kact, act) \
- (kact)->sa_restorer = NULL
-#define RESET_SA_RESTORER(act, kact) \
- (act)->sa_restorer = (kact)->sa_restorer
diff --git a/sysdeps/unix/sysv/linux/x86_64/sigaction.c b/sysdeps/unix/sysv/linux/x86_64/sigaction.c
index 4e6d9cc..9aa2c7f 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sigaction.c
+++ b/sysdeps/unix/sysv/linux/x86_64/sigaction.c
@@ -18,7 +18,6 @@
#include <signal.h>
#define SA_RESTORER 0x04000000
-#include <kernel_sigaction.h>
extern void restore_rt (void) asm ("__restore_rt") attribute_hidden;
@@ -29,6 +28,8 @@ extern void restore_rt (void) asm ("__restore_rt") attribute_hidden;
#define RESET_SA_RESTORER(act, kact) \
(act)->sa_restorer = (kact)->sa_restorer
+#include <kernel_sigaction.h>
+
#include <sysdeps/unix/sysv/linux/sigaction.c>
/* NOTE: Please think twice before making any changes to the bits of
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 49 ++++++++++++++++++++
sysdeps/unix/sysv/linux/alpha/Makefile | 2 +-
sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h | 19 ++++----
sysdeps/unix/sysv/linux/alpha/rt_sigaction.S | 41 ++---------------
sysdeps/unix/sysv/linux/alpha/sigaction.c | 38 ---------------
sysdeps/unix/sysv/linux/alpha/sysdep.h | 23 ---------
sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h | 18 -------
sysdeps/unix/sysv/linux/ia64/kernel_sigaction.h | 7 ---
sysdeps/unix/sysv/linux/kernel_sigaction.h | 12 ++++-
sysdeps/unix/sysv/linux/m68k/kernel_sigaction.h | 26 ++---------
sysdeps/unix/sysv/linux/nios2/kernel_sigaction.h | 3 +-
sysdeps/unix/sysv/linux/powerpc/kernel_sigaction.h | 3 +-
sysdeps/unix/sysv/linux/s390/kernel_sigaction.h | 29 +----------
sysdeps/unix/sysv/linux/sh/kernel_sigaction.h | 3 +-
sysdeps/unix/sysv/linux/sigaction.c | 4 +-
sysdeps/unix/sysv/linux/sparc/kernel_sigaction.h | 7 +--
sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c | 5 +-
sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c | 5 +-
sysdeps/unix/sysv/linux/x86_64/sigaction.c | 3 +-
19 files changed, 97 insertions(+), 200 deletions(-)
delete mode 100644 sysdeps/unix/sysv/linux/alpha/sigaction.c
delete mode 100644 sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h
delete mode 100644 sysdeps/unix/sysv/linux/ia64/kernel_sigaction.h
hooks/post-receive
--
GNU C Library master sources