Hi Konrad,

On 08/06/16 19:17, Konrad Rzeszutek Wilk wrote:
diff --git a/xen/arch/arm/xen.lds.S b/xen/arch/arm/xen.lds.S
index 1f010bd..495f9d8 100644
--- a/xen/arch/arm/xen.lds.S
+++ b/xen/arch/arm/xen.lds.S
@@ -129,6 +129,9 @@ SECTIONS
        _sinittext = .;
        *(.init.text)
        _einittext = .;
+#ifdef CONFIG_ALTERNATIVE
+       *(.altinstr_replacement)
+#endif

This is outside the _einittext? x86 looks to have .altinstr_replacement
inside the _einittext.

Yes, I looked at the x86 code when I did the implement and I did not find
any good reason to keep .altinstr_replace inside the inittext.

altinstr_replacement contains replacement instructions. Anything inside the
inittext region will be mark executable, which is not what we want here.

Right, but we don't this code after the bootup (as in we patch the
.text and we can eject the .altinstr_replacement).

I don't see any problem, .altinstr_replacement is within __init_begin and __init_end. So it will be free when free_init_memory will be called.

_sinittex and _einittext are used to know which page will be executable.

Regards,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to