* [Qemu-devel] [PATCH, RFT] mingw32: use ASLR, no-SEH and DEP if available
@ 2010-09-14 20:15 Blue Swirl
2010-09-29 2:38 ` TeLeMan
0 siblings, 1 reply; 4+ messages in thread
From: Blue Swirl @ 2010-09-14 20:15 UTC (permalink / raw)
To: qemu-devel
If the linker supports the flags --dynamicbase, --no-seh,
or --nxcompat, use them.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
--
This may create compatibility problems with XP. Testers wanted.
No change seen with Wine.
---
configure | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/configure b/configure
index 4061cb7..26f5465 100755
--- a/configure
+++ b/configure
@@ -2138,6 +2138,15 @@ if test "$solaris" = "no" ; then
fi
fi
+# Use ASLR, no-SEH and DEP if available
+if test "$mingw32" = "yes" ; then
+ for flag in --dynamicbase --no-seh --nxcompat; do
+ if $ld --help 2>/dev/null | grep ".$flag" >/dev/null 2>/dev/null ; then
+ LDFLAGS="-Wl,$flag $LDFLAGS"
+ fi
+ done
+fi
+
confdir=$sysconfdir$confsuffix
tools=
--
1.6.2.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH, RFT] mingw32: use ASLR, no-SEH and DEP if available
2010-09-14 20:15 [Qemu-devel] [PATCH, RFT] mingw32: use ASLR, no-SEH and DEP if available Blue Swirl
@ 2010-09-29 2:38 ` TeLeMan
2010-09-29 17:04 ` Blue Swirl
0 siblings, 1 reply; 4+ messages in thread
From: TeLeMan @ 2010-09-29 2:38 UTC (permalink / raw)
To: Blue Swirl; +Cc: qemu-devel
GDB can not insert breakpoints on Windows Vista/7 because of the flag
-dynamicbase.
--
SUN OF A BEACH
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH, RFT] mingw32: use ASLR, no-SEH and DEP if available
2010-09-29 2:38 ` TeLeMan
@ 2010-09-29 17:04 ` Blue Swirl
2010-09-30 8:09 ` [Qemu-devel] " Paolo Bonzini
0 siblings, 1 reply; 4+ messages in thread
From: Blue Swirl @ 2010-09-29 17:04 UTC (permalink / raw)
To: TeLeMan; +Cc: qemu-devel
On Wed, Sep 29, 2010 at 2:38 AM, TeLeMan <geleman@gmail.com> wrote:
> GDB can not insert breakpoints on Windows Vista/7 because of the flag
> -dynamicbase.
I'd suppose that is a bug in GDB, or rather a missing feature. ASLR is
automatically disabled by GDB 7, but that and "set
disable-randomization on" seems to work only on Linux.
For QEMU, it could be possible to make a workaround (for example a new
flag for configure which disables ASLR). I think ASLR enabled should
be the default.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] Re: [PATCH, RFT] mingw32: use ASLR, no-SEH and DEP if available
2010-09-29 17:04 ` Blue Swirl
@ 2010-09-30 8:09 ` Paolo Bonzini
0 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2010-09-30 8:09 UTC (permalink / raw)
To: Blue Swirl; +Cc: TeLeMan, qemu-devel
On 09/29/2010 07:04 PM, Blue Swirl wrote:
> On Wed, Sep 29, 2010 at 2:38 AM, TeLeMan<geleman@gmail.com> wrote:
>> GDB can not insert breakpoints on Windows Vista/7 because of the flag
>> -dynamicbase.
>
> I'd suppose that is a bug in GDB, or rather a missing feature. ASLR is
> automatically disabled by GDB 7, but that and "set
> disable-randomization on" seems to work only on Linux.
>
> For QEMU, it could be possible to make a workaround (for example a new
> flag for configure which disables ASLR). I think ASLR enabled should
> be the default.
You can piggyback that onto --enable-pie/--disable-pie.
Enabling PIE by default would be a good thing in general for security,
BTW, even for softmmu targets.
Paolo
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-09-30 8:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-14 20:15 [Qemu-devel] [PATCH, RFT] mingw32: use ASLR, no-SEH and DEP if available Blue Swirl
2010-09-29 2:38 ` TeLeMan
2010-09-29 17:04 ` Blue Swirl
2010-09-30 8:09 ` [Qemu-devel] " Paolo Bonzini
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 NNTP newsgroup(s).