qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 06/30] meson: tweak hardening options for Windows


From: Paolo Bonzini
Subject: Re: [PATCH 06/30] meson: tweak hardening options for Windows
Date: Mon, 12 Dec 2022 09:52:10 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0

On 12/12/22 09:18, Marc-André Lureau wrote:
-  # Disable ASLR for debug builds to allow debugging with gdb
-  if get_option('optimization') == '0'
-    qemu_ldflags += cc.get_supported_link_arguments('-Wl,--dynamicbase')
-  endif
+  qemu_ldflags += cc.get_supported_link_arguments('-Wl,--dynamicbase', 
'-Wl,--high-entropy-va')

What about the comment for disabling ASLR on debug builds?

The problem with that line is that it _enables_ ASLR for debug builds, and nobody has complained about gdb since last April... And nobody has complained to Debian or other distros that have enabled the flag for years now.

I'll clarify the commit message.

I wonder if we really have to add those flags ourself. Imho, we can
leave them to the compiler default or distrib.. I bet most of the deps
don't use those flags explicitly either.

I think so, at least Firefox does. In general QEMU tries to do more build-time hardening than the average pacakge.

Paolo




reply via email to

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