This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 15/17 v4] sparc: do not stack-protect the sigreturn handler.
- From: Nix <nix at esperi dot org dot uk>
- To: libc-alpha at sourceware dot org
- Date: Sun, 13 Mar 2016 15:17:00 +0000
- Subject: [PATCH 15/17 v4] sparc: do not stack-protect the sigreturn handler.
- Authentication-results: sourceware.org; auth=none
- References: <1457882222-22599-1-git-send-email-nix at esperi dot org dot uk>
From: Nick Alcock <nick.alcock@oracle.com>
This is called from the kernel and must not have a canary.
v2: New.
v3: Use $(no-stack-protector).
v4: Use inhibit_stack_protector.
* sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c:
(__rt_sigreturn_stub): Use inhibit_stack_protector.
* sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c
(__rt_sigreturn_stub): Likewise.
(__sigreturn_stub): Likewise.
---
sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c | 8 ++++++--
sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c | 4 +++-
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c b/sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c
index 5aa3c35..b75142f 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c
@@ -65,7 +65,9 @@ libc_hidden_def (__libc_sigaction)
#include <nptl/sigaction.c>
-static void
+static
+inhibit_stack_protector
+void
__rt_sigreturn_stub (void)
{
__asm__ ("mov %0, %%g1\n\t"
@@ -74,7 +76,9 @@ __rt_sigreturn_stub (void)
: "i" (__NR_rt_sigreturn));
}
-static void
+static
+inhibit_stack_protector
+void
__sigreturn_stub (void)
{
__asm__ ("mov %0, %%g1\n\t"
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c b/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c
index 50c444c..058c011 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c
@@ -66,7 +66,9 @@ libc_hidden_def (__libc_sigaction)
#include <nptl/sigaction.c>
-static void
+static
+inhibit_stack_protector
+void
__rt_sigreturn_stub (void)
{
__asm__ ("mov %0, %%g1\n\t"
--
2.7.0.198.g6dd47b6