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

Jane Malalane posted 4 patches 1 year, 8 months ago
Test gitlab-ci failed
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20220804150424.17584-1-jane.malalane@citrix.com
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
[PATCH 0/4] xen/x86: import linkage.h and clean up x86/kexec.S and x86/entry.S
Posted by Jane Malalane 1 year, 8 months ago
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

-- 
2.11.0
Re: [PATCH 0/4] xen/x86: import linkage.h and clean up x86/kexec.S and x86/entry.S
Posted by Andrew Cooper 1 year, 8 months ago
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