mbox series

[0/4] xen/x86: import linkage.h and clean up x86/kexec.S and x86/entry.S

Message ID 20220804150424.17584-1-jane.malalane@citrix.com (mailing list archive)
Headers show
Series xen/x86: import linkage.h and clean up x86/kexec.S and x86/entry.S | expand

Message

Jane Malalane Aug. 4, 2022, 3:04 p.m. UTC
Jane Malalane (4):
  x86/kexec: Add the '.L_' prefix to is_* and call_* labels
  xen: Port linkage.h from kernel code
  x86/entry: move .init.text section higher up in the code for
    readability
  x86: Use linkage.h helpers to add tags to symbols

 xen/arch/x86/x86_64/entry.S       | 124 +++++++++++-------
 xen/arch/x86/x86_64/kexec_reloc.S |  85 ++++++-------
 xen/include/xen/linkage.h         | 260 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 376 insertions(+), 93 deletions(-)
 create mode 100644 xen/include/xen/linkage.h

Comments

Andrew Cooper Aug. 4, 2022, 8:02 p.m. UTC | #1
On 04/08/2022 16:04, Jane Malalane wrote:
> Jane Malalane (4):
>   x86/kexec: Add the '.L_' prefix to is_* and call_* labels
>   xen: Port linkage.h from kernel code
>   x86/entry: move .init.text section higher up in the code for
>     readability
>   x86: Use linkage.h helpers to add tags to symbols

This probably deserves a bit of explanation.

Patch 4 is the first of several bugfixes which have been outstanding
since XSA-297/MDS (I think - pretty sure it was this XSA, but if not
then it was one around that time) where an attempt to patch
restore_all_guest failed in several creative ways.

First, we need ELF metadata so the livepatch build tools can actually do
their jobs.

Second (and in a series to follow) is teaching Xen's livepatch logic
that .text.entry is special and requires mapping in the XPTI pagetables too.


The choice to go with Linux's linkage.h is because it's already a
standard that people working in our area are familiar with, and because
my previous attempts to sort the ELF metadata have been resounding
failures of nitpicking.

My expectation is that over time, we'll move all asm code over to using
these and retire the current ad-hoc macros we have.

This series is all suggested/requested by me, so implicitly acked, but
should have acks from someone else too.

~Andrew