From: Mahesh J Salgaonkar <mahesh@linux.vnet.ibm.com>
To: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>,
Tachibana-san <tachibana@mxm.nes.nec.co.jp>,
Kexec-ml <kexec@lists.infradead.org>
Cc: Hemanth Siddarajaiah <hsiddara@in.ibm.com>,
Suzuki Poulose <suzuki@in.ibm.com>,
Aravinda Prasad <aravinda@linux.vnet.ibm.com>
Subject: [PATCH] makedumpfile: copy over the 'erase_ch' member while splitting filter info.
Date: Tue, 02 Apr 2013 10:43:59 +0530 [thread overview]
Message-ID: <20130402051243.24410.23935.stgit@mars.in.ibm.com> (raw)
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
next reply other threads:[~2013-04-02 5:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-02 5:13 Mahesh J Salgaonkar [this message]
2013-04-05 2:38 ` [PATCH] makedumpfile: copy over the 'erase_ch' member while splitting filter info Atsushi Kumagai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130402051243.24410.23935.stgit@mars.in.ibm.com \
--to=mahesh@linux.vnet.ibm.com \
--cc=aravinda@linux.vnet.ibm.com \
--cc=hsiddara@in.ibm.com \
--cc=kexec@lists.infradead.org \
--cc=kumagai-atsushi@mxc.nes.nec.co.jp \
--cc=suzuki@in.ibm.com \
--cc=tachibana@mxm.nes.nec.co.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox