Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] makedumpfile: copy over the 'erase_ch' member while splitting filter info.
@ 2013-04-02  5:13 Mahesh J Salgaonkar
  2013-04-05  2:38 ` Atsushi Kumagai
  0 siblings, 1 reply; 2+ messages in thread
From: Mahesh J Salgaonkar @ 2013-04-02  5:13 UTC (permalink / raw)
  To: Atsushi Kumagai, Tachibana-san, Kexec-ml
  Cc: Hemanth Siddarajaiah, Suzuki Poulose, Aravinda Prasad

From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>

Recent eppic support in makedumpfile has introduced 'erase_ch' member in
filter_info structure. This member holds the erase character specified by the
user to poison the memory location in the dump file that require to be scrubbed
out. But, when the memory range to be scrubbed out is spanned across multiple
pages, only the memory that belongs to first page is poisoned with the
character set in 'erase_ch' member. The rest of the memory gets poisoned with
'null' character. This is because, the 'erase_ch' member is not copied over
while splitting filter info in split_filter_info() function.

Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Suzuki Poulose <suzuki@in.ibm.com>
---
 erase_info.c |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/erase_info.c b/erase_info.c
index 61fe637..a1b08e0 100644
--- a/erase_info.c
+++ b/erase_info.c
@@ -1921,12 +1921,15 @@ split_filter_info(struct filter_info *prev, unsigned long long next_paddr,
 		ERRMSG("Can't allocate memory to split filter info\n");
 		return;
 	}
-	new->nullify        = prev->nullify;
-	new->erase_info_idx = prev->erase_info_idx;
-	new->size_idx       = prev->size_idx;
+	
+	/*
+	 * copy over existing data from prev node and only update fields
+	 * that differ. This approach will take care of copying over of any
+	 * future member addition to filter_info structure.
+	 */
+	*new = *prev;
 	new->paddr          = next_paddr;
 	new->size           = size;
-	new->next           = prev->next;
 	prev->next          = new;
 }
 


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

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

end of thread, other threads:[~2013-04-05  4:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-02  5:13 [PATCH] makedumpfile: copy over the 'erase_ch' member while splitting filter info Mahesh J Salgaonkar
2013-04-05  2:38 ` Atsushi Kumagai

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