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

Re: [PATCH] Arm: avoid .init.data to be marked as executable



Hi Jan,

On 11/06/2021 11:39, Jan Beulich wrote:
This confuses disassemblers, at the very least. Move
.altinstr_replacement to .init.text,

The alternative code was borrowed from Linux. The code has now changed to cater very large kernel. They used to keep the .altinstr_replacement and altinstructions close to each other (albeit they were both in .init.text).

I am not entirely why, but I am a bit worry to separate them. What sort of test did you do?

dropping the redundant ALIGN().

Also, to have .altinstr_replacement have consistent attributes in the
object files, add "x" to the one instance where it was missing. >
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
I'm uncertain whether having .altinstr_replacement inside or outside the
[_sinittext,_einittext) region is better; I simply followed what we have
on the x86 side right now.

This means the altinstructions will be marked executable in the page-table. They technically should not be executable, so I would move them outside _einittext and make sure the section is aligned to a PAGE_SIZE.

Cheers,

--
Julien Grall



 


Rackspace

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