Message ID | 20240919080021.20155-3-frediano.ziglio@cloud.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | x86: Satisfy requirements for UEFI CA memory mitigation requirements | expand |
On 19.09.2024 10:00, Frediano Ziglio wrote: > Split code and data to satisfy W^X requirement. > > Signed-off-by: Frediano Ziglio <frediano.ziglio@cloud.com> Acked-by: Jan Beulich <jbeulich@suse.com> as long as it goes on top of the long section names enabling patch. Jan
diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S index 22fb7d8458..b0b952dd9c 100644 --- a/xen/arch/x86/xen.lds.S +++ b/xen/arch/x86/xen.lds.S @@ -194,11 +194,7 @@ SECTIONS __2M_init_start = .; /* Start of 2M superpages, mapped RWX (boot only). */ . = ALIGN(PAGE_SIZE); /* Init code and data */ __init_begin = .; -#ifdef EFI /* EFI wants to merge all of .init.* ELF doesn't. */ - DECL_SECTION(.init) { -#else DECL_SECTION(.init.text) { -#endif _sinittext = .; *(.init.text) *(.text.startup) @@ -210,12 +206,9 @@ SECTIONS */ *(.altinstr_replacement) -#ifdef EFI /* EFI wants to merge all of .init.* ELF doesn't. */ - . = ALIGN(SMP_CACHE_BYTES); -#else } PHDR(text) + DECL_SECTION(.init.data) { -#endif *(.init.bss.stack_aligned) . = ALIGN(POINTER_ALIGN);
Split code and data to satisfy W^X requirement. Signed-off-by: Frediano Ziglio <frediano.ziglio@cloud.com> --- xen/arch/x86/xen.lds.S | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-)