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

Re: [PATCH 4/7] x86/boot: apply trampoline relocations at destination position



On Tue, Mar 18, 2025 at 7:05 PM Frediano Ziglio
<frediano.ziglio@xxxxxxxxx> wrote:
>
> On Tue, Mar 18, 2025 at 5:36 PM Roger Pau Monne <roger.pau@xxxxxxxxxx> wrote:
> >
> > Change the order relocations are applied.  Currently the trampoline is
> > patched for relocations before being copied to the low 1MB region.  Change
> > the order and instead copy the trampoline first to the low 1MB region and
> > then apply the relocations.
> >
> > This will allow making .init.text section read-only (so read and execute
> > permissions only), which is relevant when Xen is built as a PE image.
> >
>
> This change is not enough to make the section read-only, some other
> code writes directly into the trampoline at the not-relocated
> position.
> But this improves the situation.
> The code looks fine, I'll try the code if it passes some tests I did.
>

Works!

Reviewed-by: Frediano Ziglio <frediano.ziglio@xxxxxxxxx>

Frediano



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.