qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] Build *-user targets as PIE


From: Kirill A. Shutemov
Subject: Re: [Qemu-devel] [PATCH v2] Build *-user targets as PIE
Date: Thu, 3 Sep 2009 17:21:13 +0300

On Thu, Sep 3, 2009 at 3:00 PM, Reimar
Döffinger<address@hidden> wrote:
> On Thu, Sep 03, 2009 at 03:15:17PM +0300, Kirill A. Shutemov wrote:
>> Now we can drop link hack for i386 and fix text relocations on i386 host.
>>
>> v2:
>>   - Add configure options do enable/disable PIE for usermode targets.
>>     Disabling can be useful if you build uswing toolchain which has
>>     broken PIE support. PIE for usermode targets enabled by default.
>
> Hm. Would be nice if the commit message said more about the "why". What
> is the advantage of PIE (I mean, is there something special about qemu
> that makes it particularly useful)?

The main advantage is that we can drop linking hack for i386 (and keep keep
qemu self-virtualizable) and solve  text relocations.

The other advantage is security. Since qemu is PIE kernel can load at random
position in memory. It makes qemu harder for many types of attacks.

> Is there any measurable speed
> difference between PIE and no PIE?

Actually, I have no numbers for qemu.

PIE code usually is a bit slower. Approximately, 1% for i386 according to
some tests. RISC architectures should be affected less, since they have
more registers. On other hand we are getting rid from text relocations on
i386 which make executable loading slower. So...




reply via email to

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