From: Jan Kiszka <jan.kiszka@siemens.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: Blue Swirl <blauwirbel@gmail.com>,
Peter Maydell <peter.maydell@linaro.org>,
Laurent Desnogues <laurent.desnogues@gmail.com>,
Mulyadi Santosa <mulyadi.santosa@gmail.com>,
qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH v2] tcg: Remove stack protection from helper functions
Date: Mon, 26 Sep 2011 12:51:15 +0200 [thread overview]
Message-ID: <4E805923.50806@siemens.com> (raw)
In-Reply-To: <4E802DDD.8090100@siemens.com>
This increases the overhead of frequently executed helpers. We need to
move rule past QEMU_CFLAGS assignment to ensure that the required simple
assignment picks up all bits. The signal workaround is moved just for
the sake of consistency.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
Changes in v2:
- unbreak qemu-user build
Maybe some real make guru has a nicer solution for removing the switch.
Makefile.target | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/Makefile.target b/Makefile.target
index 88d2f1f..b545161 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -89,14 +89,6 @@ translate-all.o: translate-all.c cpu.h
tcg/tcg.o: cpu.h
-# HELPER_CFLAGS is used for all the code compiled with static register
-# variables
-op_helper.o user-exec.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
-
-# Note: this is a workaround. The real fix is to avoid compiling
-# cpu_signal_handler() in user-exec.c.
-signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
-
#########################################################
# Linux user emulator target
@@ -387,6 +379,15 @@ obj-y += $(addprefix ../, $(trace-obj-y))
endif # CONFIG_SOFTMMU
+# HELPER_CFLAGS is used for all the code compiled with static register
+# variables
+# NOTE: Must be after the last QEMU_CFLAGS assignment
+op_helper.o user-exec.o: QEMU_CFLAGS := $(subst -fstack-protector-all,,$(QEMU_CFLAGS)) $(HELPER_CFLAGS)
+
+# Note: this is a workaround. The real fix is to avoid compiling
+# cpu_signal_handler() in user-exec.c.
+signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
+
ifndef CONFIG_LINUX_USER
ifndef CONFIG_BSD_USER
# libcacard needs qemu-thread support, and besides is only needed by devices
--
1.7.3.4
next prev parent reply other threads:[~2011-09-26 10:51 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-26 7:46 [Qemu-devel] [PATCH] tcg: Remove stack protection from helper functions Jan Kiszka
2011-09-26 8:01 ` Mulyadi Santosa
2011-09-26 8:15 ` Laurent Desnogues
2011-09-26 17:41 ` Avi Kivity
2011-09-26 19:43 ` Richard Henderson
2011-09-26 19:52 ` Avi Kivity
2011-09-26 19:53 ` Richard Henderson
2011-09-26 20:20 ` Avi Kivity
2011-09-26 20:19 ` Peter Maydell
2011-09-26 20:26 ` Avi Kivity
2011-09-27 4:29 ` Andi Kleen
2011-09-27 7:58 ` Peter Maydell
2011-09-26 10:51 ` Jan Kiszka [this message]
2011-09-26 11:33 ` [Qemu-devel] [PATCH v2] " Peter Maydell
2011-09-26 11:43 ` Jan Kiszka
2011-09-26 11:56 ` Peter Maydell
2011-09-26 17:22 ` Blue Swirl
2011-09-26 17:33 ` Jan Kiszka
2011-09-26 18:20 ` Blue Swirl
2011-09-26 18:25 ` Jan Kiszka
2011-09-26 18:40 ` Blue Swirl
2011-09-26 19:08 ` Peter Maydell
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=4E805923.50806@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=aliguori@us.ibm.com \
--cc=blauwirbel@gmail.com \
--cc=laurent.desnogues@gmail.com \
--cc=mulyadi.santosa@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.