linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] arm64: Make kexec_file_load honor iomem reservations
@ 2021-05-31  9:57 Marc Zyngier
  2021-05-31  9:57 ` [PATCH v2 1/5] arm64: kexec_file: Forbid non-crash kernels Marc Zyngier
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Marc Zyngier @ 2021-05-31  9:57 UTC (permalink / raw)
  To: kexec, linux-arm-kernel, linux-kernel
  Cc: Catalin Marinas, Will Deacon, Ard Biesheuvel, Mark Rutland,
	James Morse, Lorenzo Pieralisi, Hanjun Guo, Sudeep Holla,
	Eric Biederman, Bhupesh SHARMA, AKASHI Takahiro, Dave Young,
	Andrew Morton, Moritz Fischer, kernel-team

This series is a complete departure from the approach I initially sent
almost a month ago[0]. Instead of trying to teach EFI, ACPI and other
subsystem to use memblock, I've decided to stick with the iomem
resource tree and use that exclusively for arm64.

This means that my current approach is (despite what I initially
replied to both Dave and Catalin) to provide an arm64-specific
implementation of arch_kexec_locate_mem_hole() which walks the
resource tree and excludes ranges of RAM that have been registered for
any odd purpose. This is exactly what the userspace implementation
does, and I don't really see a good reason to diverge from it.

Again, this allows my Synquacer board to reliably use kexec_file_load
with as little as 256M, something that would always fail before as it
would overwrite most of the reserved tables.

Although this series still targets 5.14, the initial patch is a
-stable candidate, and disables non-kdump uses of kexec_file_load. I
have limited it to 5.10, as earlier kernels will require a different,
probably more invasive approach.

Catalin, Ard: although this series has changed a bit compared to v1,
I've kept your AB/RB tags. Should anything seem odd, please let me
know and I'll drop them.

Thanks,

	M.

* From v1 [1]:
  - Move the overlap exclusion into find_next_iomem_res()
  - Handle child resource not overlapping with parent
  - Provide walk_system_ram_excluding_child_res() as a top level
    walker
  - Simplify arch-specific code
  - Add initial patch disabling non-crash kernels

[0] https://lore.kernel.org/r/20210429133533.1750721-1-maz@kernel.org
[1] https://lore.kernel.org/r/20210526190531.62751-1-maz@kernel.org

Marc Zyngier (5):
  arm64: kexec_file: Forbid non-crash kernels
  kexec_file: Make locate_mem_hole_callback global
  kernel/resource: Allow find_next_iomem_res() to exclude overlapping
    child resources
  kernel/resource: Introduce walk_system_ram_excluding_child_res()
  arm64: kexec_image: Restore full kexec functionnality

 arch/arm64/kernel/kexec_image.c | 39 ++++++++++++++++
 include/linux/ioport.h          |  3 ++
 include/linux/kexec.h           |  1 +
 kernel/kexec_file.c             |  6 +--
 kernel/resource.c               | 82 +++++++++++++++++++++++++++++----
 5 files changed, 119 insertions(+), 12 deletions(-)

-- 
2.30.2


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

end of thread, other threads:[~2021-06-09 22:40 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-31  9:57 [PATCH v2 0/5] arm64: Make kexec_file_load honor iomem reservations Marc Zyngier
2021-05-31  9:57 ` [PATCH v2 1/5] arm64: kexec_file: Forbid non-crash kernels Marc Zyngier
2021-05-31 19:37   ` Ard Biesheuvel
2021-06-01  8:36     ` Marc Zyngier
2021-06-04 16:20   ` James Morse
2021-05-31  9:57 ` [PATCH v2 2/5] kexec_file: Make locate_mem_hole_callback global Marc Zyngier
2021-05-31  9:57 ` [PATCH v2 3/5] kernel/resource: Allow find_next_iomem_res() to exclude overlapping child resources Marc Zyngier
2021-05-31  9:57 ` [PATCH v2 4/5] kernel/resource: Introduce walk_system_ram_excluding_child_res() Marc Zyngier
2021-05-31  9:57 ` [PATCH v2 5/5] arm64: kexec_image: Restore full kexec functionnality Marc Zyngier
2021-05-31 19:36 ` [PATCH v2 0/5] arm64: Make kexec_file_load honor iomem reservations Ard Biesheuvel
2021-06-04 16:20 ` James Morse
2021-06-09 22:39   ` Moritz Fischer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).