public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Nix <nix@esperi.org.uk>
To: libc-alpha@sourceware.org
Subject: [PATCH 12/17 v3] Link various tests with -fno-stack-protector.
Date: Sun, 13 Mar 2016 15:19:00 -0000	[thread overview]
Message-ID: <1457882222-22599-13-git-send-email-nix@esperi.org.uk> (raw)
In-Reply-To: <1457882222-22599-1-git-send-email-nix@esperi.org.uk>

From: Nick Alcock <nick.alcock@oracle.com>

These tests do not link with libc, so cannot see __stack_chk_fail().

v3: Use $(no-stack-protector).

	* elf/Makefile (CFLAGS-filtmod1.c): Use $(no-stack-protector) for
	non-libc-linking testcase.
	(CFLAGS-filtmod2.c): Likewise.
	* stdlib/Makefile (CFLAGS-tst-putenvmod.c): Likewise.
	* sysdeps/x86_64/Makefile (CFLAGS-tst-quad1pie.c): Likewise.
	(CFLAGS-tst-quad2pie.c): Likewise.
---
 elf/Makefile            | 4 ++++
 stdlib/Makefile         | 3 +++
 sysdeps/x86_64/Makefile | 3 +++
 3 files changed, 10 insertions(+)

diff --git a/elf/Makefile b/elf/Makefile
index d1e29a58..185731e 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -752,6 +752,10 @@ $(objpfx)filtmod1.so: $(objpfx)filtmod1.os $(objpfx)filtmod2.so
 		  $< -Wl,-F,$(objpfx)filtmod2.so
 $(objpfx)filter: $(objpfx)filtmod1.so
 
+# These do not link against libc.
+CFLAGS-filtmod1.c = $(no-stack-protector)
+CFLAGS-filtmod2.c = $(no-stack-protector)
+
 $(objpfx)unload: $(libdl)
 $(objpfx)unload.out: $(objpfx)unloadmod.so
 
diff --git a/stdlib/Makefile b/stdlib/Makefile
index 26fe67a..d601b87 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -164,6 +164,9 @@ LDFLAGS-tst-putenv = $(no-as-needed)
 
 $(objpfx)tst-putenvmod.so: $(objpfx)tst-putenvmod.os $(link-libc-deps)
 	$(build-module)
+# This is not only not in libc, it's not even linked with it.
+CFLAGS-tst-putenvmod.c += $(no-stack-protector)
+
 libof-tst-putenvmod = extramodules
 
 $(objpfx)bug-getcontext: $(libm)
diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile
index 67ed5ba..6caa74a 100644
--- a/sysdeps/x86_64/Makefile
+++ b/sysdeps/x86_64/Makefile
@@ -40,6 +40,9 @@ quad-pie-test += tst-quad1pie tst-quad2pie
 tests += $(quad-pie-test)
 tests-pie += $(quad-pie-test)
 
+CFLAGS-tst-quad1pie.c = $(no-stack-protector)
+CFLAGS-tst-quad2pie.c = $(no-stack-protector)
+
 $(objpfx)tst-quad1pie: $(objpfx)tst-quadmod1pie.o
 $(objpfx)tst-quad2pie: $(objpfx)tst-quadmod2pie.o
 
-- 
2.7.0.198.g6dd47b6

  parent reply	other threads:[~2016-03-13 15:19 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-13 15:17 --enable-stack-protector for glibc, v6 Nix
2016-03-13 15:17 ` [PATCH 03/17 v6] Do not stack-protect ifunc resolvers Nix
2016-04-10  3:59   ` Mike Frysinger
2016-03-13 15:17 ` [PATCH 02/17 v6] Initialize the stack guard earlier when linking statically Nix
2016-03-13 15:17 ` [PATCH 11/17 v6] De-PLTize __stack_chk_fail internal calls within libc.so Nix
2016-03-13 15:17 ` [PATCH 17/17 v5] Enable -fstack-protector=* when requested by configure Nix
2016-03-13 15:17 ` [PATCH 01/17 v6] Configury support for --enable-stack-protector Nix
2016-04-10  3:58   ` Mike Frysinger
2016-04-10 11:26     ` Nix
2016-04-10 14:33       ` Mike Frysinger
2016-03-13 15:18 ` [PATCH 06/17] Allow overriding of CFLAGS as well as CPPFLAGS for rtld Nix
2016-04-04 22:44   ` Roland McGrath
2016-04-10  3:53   ` Mike Frysinger
2016-03-13 15:18 ` [PATCH 15/17 v4] sparc: do not stack-protect the sigreturn handler Nix
2016-05-13  9:55   ` Florian Weimer
2016-03-13 15:18 ` [PATCH 13/17] Drop explicit stack-protection of pieces of the system Nix
2016-04-04 22:47   ` Roland McGrath
2016-05-13  9:49     ` Florian Weimer
2016-03-13 15:18 ` [PATCH 14/17 v5] Avoid stack-protecting signal-handling functions sibcalled from assembly Nix
2016-05-13  9:54   ` Florian Weimer
2016-05-13 14:38     ` Nix
2016-05-15  9:50     ` Nix
2016-05-15 10:35       ` Andreas Schwab
2016-05-15 15:18         ` Nix
2016-05-15 15:49           ` Andreas Schwab
2016-05-16  9:00             ` Florian Weimer
2016-05-16  9:16               ` Andreas Schwab
2016-05-15 10:39       ` Nix
2016-03-13 15:18 ` [PATCH 07/17 v3] Compile the entire dynamic linker with -fno-stack-protector Nix
2016-03-13 15:19 ` [PATCH 16/17 v5] x86, pthread_cond_*wait: Do not depend on %eax not being clobbered Nix
2016-03-14 20:01   ` Florian Weimer
2016-03-14 23:36     ` Nix
2016-03-23 15:02       ` Florian Weimer
2016-04-04 22:09         ` Nix
2016-03-13 15:19 ` [PATCH 08/17 v6] Prevent the rtld mapfile computation from dragging in __stack_chk_fail* Nix
2016-03-13 15:19 ` Nix [this message]
2016-03-13 15:19 ` [PATCH 10/17 v6] Add stack_chk_fail_local to libc.so Nix
2016-03-13 15:19 ` [PATCH 05/17 v6] Open-code the memcpy() at static TLS initialization time Nix
2016-03-13 15:20 ` [PATCH 09/17 v6] Work even with compilers hacked to enable -fstack-protector by default Nix
2016-04-10  4:04   ` Mike Frysinger
2016-03-13 15:20 ` [PATCH 04/17 v5] Mark all machinery needed in early static-link init as -fno-stack-protector Nix
2016-04-10  4:02   ` Mike Frysinger
2016-04-10 11:27     ` Nix
2016-05-15 10:01       ` Nix
2016-03-18 11:48 ` --enable-stack-protector for glibc, v6 Nix
2016-05-13 12:10   ` Florian Weimer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1457882222-22599-13-git-send-email-nix@esperi.org.uk \
    --to=nix@esperi.org.uk \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).