Skip to content

RFC kdump: Check mem_map of CMA area in kdump

Pingfan Liu kexec 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3crash_dump: Parse the CMA's mem_map in kdumpinclude/linux/kexec.h init/main.c kernel/crash_dump.c+85 -00 replies
2/3of: kexec: Set up properties for reusing CMA in kdumpdrivers/of/kexec.c include/linux/kexec.h+18 -00 replies
3/3of: fdt: Parse properties of reusing CMA in kdumpdrivers/of/fdt.c+43 -00 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [RFC 0/3] kdump: Check mem_map of CMA area in kdump

From: Pingfan Liu <[email protected]>

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 <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Philipp Rudo <[email protected]>
Cc: Baoquan He <[email protected]>
Cc: Dave Young <[email protected]>
To: [email protected]
---
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(+)
Signature · 7 lines
2.31.1


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec