Thread (10 messages) flat view 10 messages, 2 authors, 5d ago
COOLING5d

[PATCH] ppc/fadump: collect dump if the collected size is lesser than reserved

From: Shivang Upadhyay <hidden>
Date: 2026-07-14 17:30:43
Also in: lkml
Subsystem: linux for powerpc (32-bit and 64-bit), the rest · Maintainers: Madhavan Srinivasan, Linus Torvalds

When a machine is subjected to CPUs add/remove, using dlpar
operations, the number of collected CPU_NOTES can change.
As per PAPR, collected dump size should not be more than
allocated size. Reflecting the same in source.

Signed-off-by: Shivang Upadhyay <redacted>
---
 arch/powerpc/platforms/pseries/rtas-fadump.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/pseries/rtas-fadump.c b/arch/powerpc/platforms/pseries/rtas-fadump.c
index 3bb4ac2ab6cc..19a5adaf326b 100644
--- a/arch/powerpc/platforms/pseries/rtas-fadump.c
+++ b/arch/powerpc/platforms/pseries/rtas-fadump.c
@@ -469,7 +469,8 @@ static int __init rtas_fadump_process(struct fw_dump *fadump_conf)
 				pr_err("Dump taken by platform is not valid (%d)\n", i);
 				rc = -EINVAL;
 			}
-			if (fdm_active->rgn[i].bytes_dumped != fdm_active->rgn[i].source_len) {
+			if (be64_to_cpu(fdm_active->rgn[i].bytes_dumped)
+			    > be64_to_cpu(fdm_active->rgn[i].source_len)) {
 				pr_err("Dump taken by platform is incomplete (%d)\n", i);
 				rc = -EINVAL;
 			}
-- 
2.54.0

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help