makedumpfile: copy over the 'erase_ch' member while splitting filter info.
Subsystems (2)
PATCH 1/1 makedumpfile: copy over the 'erase_ch' member while splitting filter info.
From: Mahesh Salgaonkar <[email protected]>
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.
--- erase_info.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
erase_info.c +7 -4
@@ -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
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Hello Mahesh,
Quoted 30 lines · On Tue, 02 Apr 2013 10:43:59 +0530 Mahesh J Salgaonkar…
From: Mahesh Salgaonkar <[email protected]>
Recent eppic support in makedumpfile has introduced '
erase_ch' member infilter_infostructure. 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 insplit_filter_info()function.Signed-off-by Mahesh Salgaonkar <[email protected]>Signed-off-by Suzuki Poulose <[email protected]>--- erase_info.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)erase_info.c +2
-3@@ -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; + +/*
erase_info.c split_filter_info(struct filter_info *prev, unsigned long long next_paddr, · line 1934
Quoted 10 lines
erase_info.c +5
-1+* 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; }
Sounds good!
I'll merge this patch into v1.5.4.
Thanks
Atsushi Kumagai
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec