Skip to content

arm/efi: fix memblock reallocation crash due to persistent reservations

Marc Zyngier linux-arm-kernel linux-efi 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 of 4 patches 0 repliesNew

1 of 4 patches is in this archive. The cover letter announces 4.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
2/4efi/arm: defer persistent reservations until after paging_init()arch/arm64/Kconfig drivers/firmware/efi/Kconfig drivers/firmware/efi/efi.c+11 -03 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] arm/efi: fix memblock reallocation crash due to persistent reservations
Quoted 39 lines · Ard Biesheuvel
Quoted 37 lines · Marc Zyngier

Hi Ard,

Quoted 15 lines · Ard Biesheuvel

This series addresses the kexec/kdump crash on arm64 system with many CPUs that was reported by Bhupesh.

Patches #1 and #2 fix the actual crash. Patches #3 and #4 optimize the EFI persistent memreserve infrastructure so that fewer memblock reservations are required.

Ard Biesheuvel (4):
arm64: memblock: don't permit memblock resizing until linear mapping
is up
efi/arm: defer persistent reservations until after paging_init()
efi: permit multiple entries in persistent memreserve data structure
efi: reduce the amount of memblock reservations for persistent
allocations

Quoted 8 lines
 arch/arm/kernel/setup.c                 |  1 +
 arch/arm64/kernel/setup.c               |  1 +
 arch/arm64/mm/init.c                    |  2 -
 arch/arm64/mm/mmu.c                     |  2 +
 drivers/firmware/efi/efi.c              | 59 ++++++++++++++------
 drivers/firmware/efi/libstub/arm-stub.c |  2 +-
 include/linux/efi.h                     | 23 +++++++-
 7 files changed, 68 insertions(+), 22 deletions(-)

I've just given these patches a go a a TX2 box (one of the 224 CPU ones...), and kexec worked just fine (v4.20-rc1 vanilla didn't manage to kexec on this box).

There seem to be some additional userspace patches that are required for the ACPI tables not to be corrupted in the secondary kernel, but that's an orthogonal issue.

Feel free to add

Quoted 7 lines
Quoted 2 lines

Thanks Marc.

Any thoughts on whether patches #3 and #4 should be included as fixes? I'm leaning towards yes.

They certainly massively reduce the number of list entries, and probably help reducing the overhead. I'd be inclined to merge them as well.

Thanks,

	M.
Signature · 1 line
Jazz is not dead, it just smell funny.