Patchwork [14/14] sparc: do not stack-protect the sigreturn handler.

login
register
mail settings
Submitter Nix
Date Feb. 24, 2016, 11:28 p.m.
Message ID <1456356500-25601-15-git-send-email-nix@esperi.org.uk>
Download mbox | patch
Permalink /patch/11060/
State New
Headers show

Comments

Nix - Feb. 24, 2016, 11:28 p.m.
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).
---
 sysdeps/unix/sysv/linux/sparc/sparc32/Makefile | 5 +++++
 sysdeps/unix/sysv/linux/sparc/sparc64/Makefile | 5 +++++
 2 files changed, 10 insertions(+)

Patch

diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile b/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile
index 21c7dc1..4ca7052 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile
@@ -26,3 +26,8 @@  ifeq ($(subdir),math)
 # Provide these routines here as well.
 libm-routines += multc3 divtc3
 endif   # math
+
+ifneq (,$(filter signal nptl,$(subdir)))
+# We must not stack-protect the sigreturn handler.
+CFLAGS-sigaction.c += $(no-stack-protector)
+endif  # signal
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile b/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile
index 7ea433f..03a86ce 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile
@@ -12,3 +12,8 @@  ifeq ($(subdir),nptl)
 CFLAGS-pause.c += -fexceptions
 CFLAGS-sigsuspend.c += -fexceptions
 endif
+
+ifneq (,$(filter signal nptl,$(subdir)))
+# We must not stack-protect the sigreturn handler.
+CFLAGS-sigaction.c += $(no-stack-protector)
+endif  # signal