All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: move .altinstr_replacement past _einittext
@ 2021-06-14 13:53 Jan Beulich
  2021-06-14 14:56 ` Andrew Cooper
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2021-06-14 13:53 UTC (permalink / raw)
  To: xen-devel; +Cc: Andrew Cooper, Wei Liu, Roger Pau Monné

This section's contents do not represent part of actual hypervisor text,
so shouldn't be included in what is_kernel_inittext() or (while still
booting) is_active_kernel_text() report "true" for. Keep them in
.init.text though, as there's no real reason to have a separate section
for this in the final binary.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/xen.lds.S
+++ b/xen/arch/x86/xen.lds.S
@@ -185,13 +185,13 @@ SECTIONS
 #endif
        _sinittext = .;
        *(.init.text)
+       _einittext = .;
        /*
         * Here are the replacement instructions. The linker sticks them
         * as binary blobs. The .altinstructions has enough data to get
         * the address and the length of them to patch the kernel safely.
         */
        *(.altinstr_replacement)
-       _einittext = .;
 
 #ifdef EFI /* EFI wants to merge all of .init.*  ELF doesn't. */
        . = ALIGN(SMP_CACHE_BYTES);



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] x86: move .altinstr_replacement past _einittext
  2021-06-14 13:53 [PATCH] x86: move .altinstr_replacement past _einittext Jan Beulich
@ 2021-06-14 14:56 ` Andrew Cooper
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Cooper @ 2021-06-14 14:56 UTC (permalink / raw)
  To: Jan Beulich, xen-devel; +Cc: Wei Liu, Roger Pau Monné

On 14/06/2021 14:53, Jan Beulich wrote:
> This section's contents do not represent part of actual hypervisor text,
> so shouldn't be included in what is_kernel_inittext() or (while still
> booting) is_active_kernel_text() report "true" for. Keep them in
> .init.text though, as there's no real reason to have a separate section
> for this in the final binary.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-14 14:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-14 13:53 [PATCH] x86: move .altinstr_replacement past _einittext Jan Beulich
2021-06-14 14:56 ` Andrew Cooper

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.