linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] arm64: Make kexec_file_load honor iomem reservations
@ 2021-05-26 19:05 Marc Zyngier
  2021-05-26 19:05 ` [PATCH 1/4] kexec_file: Make locate_mem_hole_callback global Marc Zyngier
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Marc Zyngier @ 2021-05-26 19:05 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,
	Moritz Fischer, kernel-team

This series is a complete departure from the approach I initially sent
almost a month ago[1]. 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.

Obviously, this is now at least 5.14 material. Given how broken
kexec_file_load is for non-crash kernels on arm64 at the moment,
should we at least disable it in 5.13 and all previous stable kernels?

Thanks,

	M.

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

Marc Zyngier (4):
  kexec_file: Make locate_mem_hole_callback global
  kernel/resource: Populate child pointer in find_next_iomem_res()
  kernel/resource: Add walk_excluding_child_res() helper
  arm64: kexec_image: Implement arch_kexec_locate_mem_hole()

 arch/arm64/kernel/kexec_image.c | 45 ++++++++++++++++++
 include/linux/ioport.h          |  4 ++
 include/linux/kexec.h           |  1 +
 kernel/kexec_file.c             |  6 +--
 kernel/resource.c               | 81 +++++++++++++++++++++++++++++++++
 5 files changed, 134 insertions(+), 3 deletions(-)

-- 
2.30.2


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

end of thread, other threads:[~2021-05-31  6:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-26 19:05 [PATCH 0/4] arm64: Make kexec_file_load honor iomem reservations Marc Zyngier
2021-05-26 19:05 ` [PATCH 1/4] kexec_file: Make locate_mem_hole_callback global Marc Zyngier
2021-05-26 19:05 ` [PATCH 2/4] kernel/resource: Populate child pointer in find_next_iomem_res() Marc Zyngier
2021-05-27 16:53   ` Catalin Marinas
2021-05-28  8:06     ` Marc Zyngier
2021-05-26 19:05 ` [PATCH 3/4] kernel/resource: Add walk_excluding_child_res() helper Marc Zyngier
2021-05-26 19:05 ` [PATCH 4/4] arm64: kexec_image: Implement arch_kexec_locate_mem_hole() Marc Zyngier
2021-05-27 17:37   ` Catalin Marinas
2021-05-28  9:05     ` Marc Zyngier
2021-05-27 17:39 ` [PATCH 0/4] arm64: Make kexec_file_load honor iomem reservations Catalin Marinas
2021-05-31  6:02   ` Ard Biesheuvel

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).