Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 0/3] kdump: Check mem_map of CMA area in kdump
@ 2023-12-18  5:23 Pingfan Liu
  2023-12-18  5:23 ` [RFC 1/3] crash_dump: Parse the CMA's mem_map " Pingfan Liu
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Pingfan Liu @ 2023-12-18  5:23 UTC (permalink / raw)
  To: kexec
  Cc: Pingfan Liu, Jiri Bohac, Michal Hocko, Philipp Rudo, Baoquan He,
	Dave Young

From: Pingfan Liu <piliu@redhat.com>


First of all, this series is only for proof of concept. It only passes compilation.

For years, CMA is proposed to be used as crashkernel reserved memory.
But DIO prevent us to follow it since DMA may be in-flight and ruin the
kdump kernel.

This series exports the crash kernel's CMA area information through
device-tree, and kdump kernel skips any page, which refcnt!=mapcount and
has a potential DMA activity.

The exported information include:
	u64 kdump_cma_pfn;
	u64 kdump_cma_pg_cnt;
	u64 kdump_cma_pg_paddr;

And they should be filled with Jiri's series "[PATCH 0/4] kdump:
crashkernel reservation from CMA"

After the conjunction of two series, the CMA used for kdump has only the
following risk, where the following conditions:
	-1.a wrong code forges _refcnt and mapcount to the same value
	-2.the page is also used by DIO


Is it acceptable, or any rescue e.g. CRC on page?

Please share your thoughts.

Thanks,

Pingfan


Cc: Jiri Bohac <jbohac@suse.cz>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Philipp Rudo <prudo@redhat.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
To: kexec@lists.infradead.org
---
Pingfan Liu (3):
  crash_dump: Parse the CMA's mem_map in kdump
  of: kexec: Set up properties for reusing CMA in kdump
  of: fdt: Parse properties of reusing CMA in kdump

 drivers/of/fdt.c      | 43 +++++++++++++++++++++++
 drivers/of/kexec.c    | 14 ++++++++
 include/linux/kexec.h |  5 +++
 init/main.c           |  4 +++
 kernel/crash_dump.c   | 80 +++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 146 insertions(+)

-- 
2.31.1


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

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

end of thread, other threads:[~2023-12-19 15:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-18  5:23 [RFC 0/3] kdump: Check mem_map of CMA area in kdump Pingfan Liu
2023-12-18  5:23 ` [RFC 1/3] crash_dump: Parse the CMA's mem_map " Pingfan Liu
2023-12-18  5:23 ` [RFC 2/3] of: kexec: Set up properties for reusing CMA " Pingfan Liu
2023-12-18  5:23 ` [RFC 3/3] of: fdt: Parse properties of " Pingfan Liu
2023-12-18 15:19 ` [RFC 0/3] kdump: Check mem_map of CMA area " Michal Hocko
2023-12-19 15:20 ` Philipp Rudo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox