qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/4] configure: add flag to enable SafeStack


From: Daniele Buono
Subject: Re: [PATCH 3/4] configure: add flag to enable SafeStack
Date: Fri, 22 May 2020 11:24:46 -0400
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

Hi Stefan,

I would feel more confident by adding another check in configure to make
sure that the user didn't enable SafeStack manually through other means,
like manually setting the option through extra_cflags.
What do you think?

On 5/21/2020 5:52 AM, Stefan Hajnoczi wrote:
On Wed, Apr 29, 2020 at 03:44:19PM -0400, Daniele Buono wrote:
This patch adds a flag to enable the SafeStack instrumentation provided
by LLVM.
The checks make sure that the compiler supports the flags, and that we
are using the proper coroutine implementation (coroutine-ucontext).
While SafeStack is supported only on Linux, NetBSD, FreeBSD and macOS,
we are not checking for the O.S. since this is already done by LLVM.

Signed-off-by: Daniele Buono <address@hidden>
---
  configure | 29 +++++++++++++++++++++++++++++
  1 file changed, 29 insertions(+)

Great, this can become Patch 1 and it can set CONFIG_SAFESTACK as
mentioned in my earlier reply.

diff --git a/configure b/configure
index 23b5e93752..f37e4ae0bd 100755
--- a/configure
+++ b/configure
@@ -302,6 +302,7 @@ audio_win_int=""
  libs_qga=""
  debug_info="yes"
  stack_protector=""
+safe_stack="no"

The comment above this says:

   # Always add --enable-foo and --disable-foo command line args.

Please add --disable-safe-stack.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]