From: Dave Hansen <haveblue@us.ibm.com>
To: "Hariprasad Nellitheertha [imap]" <hari@in.ibm.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
fastboot@osdl.org, Andrew Morton <akpm@osdl.org>,
"Suparna Bhattacharya [imap]" <suparna@in.ibm.com>,
"Martin J. Bligh" <mbligh@aracnet.com>,
litke@us.ibm.com, "Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re: [PATCH][3/6]Interface for copying the dump pages
Date: Tue, 17 Aug 2004 09:17:01 -0700 [thread overview]
Message-ID: <1092759421.5415.66.camel@nighthawk> (raw)
In-Reply-To: <20040817120809.GD3916@in.ibm.com>
On Tue, 2004-08-17 at 05:08, Hariprasad Nellitheertha wrote:
> Regards, Hari
> +/* This is the same as kmap_atomic but takes in a pfn instead of a
> + * struct page.
> + */
How about:
/*
* This is the same as kmap_atomic() but can map memory that doesn't
* necessarily have struct page associated with it.
*/
> +ssize_t copy_hmem_page(unsigned long pfn, char *buf, size_t csize,
> int userbuf)
...
> + if (pfn == -1) {
> + /* Give them a zeroed page */
> + if (userbuf) {
> + if (clear_user(buf, csize))
> + return -EFAULT;
> + } else
> + memset(buf, 0, csize);
> + } else {
This is really hackish. If you want to zero a userspace page, just zero
it in the caller's code, or call a different function. Zeroing a
userspace page has nothing to do with copying a highmem page, and it
really shouldn't be here. Just changing it from taking a 0 to a -1 from
the last time you posted it doesn't really make it any better.
Also, that function might belong in the same area as copy_highpage(),
not in some driver. In any case, it certainly needs a big fat comment
explaining why it is special, and different from copy_highpage().
If it shouldn't be moved and really is isolated to the mem.c driver, it
needs to be declared static.
-- Dave
next prev parent reply other threads:[~2004-08-17 16:17 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-17 12:04 [RFC]Kexec based crash dumping Hariprasad Nellitheertha
2004-08-17 12:05 ` [PATCH][1/6]Documentation Hariprasad Nellitheertha
2004-08-17 12:07 ` [PATCH][2/6]Memory preserving reboot using kexec Hariprasad Nellitheertha
2004-08-17 12:08 ` [PATCH][3/6]Interface for copying the dump pages Hariprasad Nellitheertha
2004-08-17 12:09 ` [PATCH][4/6]Register snapshotting before kexec-boot Hariprasad Nellitheertha
2004-08-17 12:10 ` [PATCH][5/6]ELF format interface for the dump Hariprasad Nellitheertha
2004-08-17 12:13 ` [PATCH][6/6]Device abstraction for linear/raw view of " Hariprasad Nellitheertha
2004-08-17 22:53 ` Martin J. Bligh
2004-08-18 12:29 ` Hariprasad Nellitheertha
2004-08-17 16:27 ` [PATCH][4/6]Register snapshotting before kexec-boot Dave Hansen
2004-08-18 13:43 ` Theodore Ts'o
2004-08-19 11:59 ` Hariprasad Nellitheertha
2004-08-17 16:17 ` Dave Hansen [this message]
2004-08-17 16:01 ` [PATCH][2/6]Memory preserving reboot using kexec Dave Hansen
2004-08-17 22:44 ` [RFC]Kexec based crash dumping Andrew Morton
2004-08-18 12:28 ` Hariprasad Nellitheertha
2004-08-20 8:17 ` [Fastboot] " Eric W. Biederman
2004-08-20 8:05 ` [Fastboot] " Eric W. Biederman
2004-08-20 8:27 ` Hariprasad Nellitheertha
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=1092759421.5415.66.camel@nighthawk \
--to=haveblue@us.ibm.com \
--cc=akpm@osdl.org \
--cc=ebiederm@xmission.com \
--cc=fastboot@osdl.org \
--cc=hari@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=litke@us.ibm.com \
--cc=mbligh@aracnet.com \
--cc=suparna@in.ibm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.