Skip to content

KVM: arm64: Stub exports in nvhe code

Quentin Perret kvmarm linux-arch linux-arm-kernel lkml 1 version Applied

Status from this message: Applied to kvm-arm64/misc-5.12, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2asm-generic: export: Stub EXPORT_SYMBOL with __DISABLE_EXPORTSinclude/asm-generic/export.h+1 -11 reply
2/2KVM: arm64: Stub EXPORT_SYMBOL for nVHE EL2 codearch/arm64/kvm/hyp/nvhe/Makefile+2 -20 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchWill Deacon
1/2A-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] KVM: arm64: Stub exports in nvhe code

Hi all,

In the context of the currently ongoing work to remove the host kernel from the TCB under KVM/arm64, I have been trying to wrap the host kernel with a stage 2 page-table -- see [1].

Using this infrastructure, I attempted to unmap the .hyp. sections from the host stage 2 as it really shouldn't need to access them. But by doing so, I realized quickly the module loader was getting very confused by the usage of EXPORT_SYMBOL() macros in library functions that have been pulled into the EL2 object, and that we end up linking modules against the EL2 copy of e.g. memset. And so, this series essentially tries to fix this.

- Patch 01 changes asm-generic/export.h to ensure we respect __DISABLE_EXPORTS even for asm exports;

- and patch 02 makes use of it for all of the nVHE EL2 code.

This was tested on aml-s905x-cc, which now successfully loads kernel modules with .hyp.text unmapped from the host.

Thanks,
Quentin

[1] https://lore.kernel.org/kvmarm/[email protected]/

Quentin Perret (2):
asm-generic: export: Stub EXPORT_SYMBOL with __DISABLE_EXPORTS
KVM: arm64: Stub EXPORT_SYMBOL for nVHE EL2 code

 arch/arm64/kvm/hyp/nvhe/Makefile | 4 ++--
 include/asm-generic/export.h     | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
Signature · 6 lines
2.30.0.365.g02bc693789-goog

_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm