From: Andrew Morton <akpm@osdl.org>
To: hari@in.ibm.com
Cc: linux-kernel@vger.kernel.org, fastboot@osdl.org,
suparna@in.ibm.com, mbligh@aracnet.com, ebiederm@xmission.com,
litke@us.ibm.com
Subject: Re: [PATCH][5/6]ELF format dump file access
Date: Wed, 15 Sep 2004 14:31:11 -0700 [thread overview]
Message-ID: <20040915143111.23dac3d7.akpm@osdl.org> (raw)
In-Reply-To: <20040915125631.GF15450@in.ibm.com>
Hariprasad Nellitheertha <hari@in.ibm.com> wrote:
>
> +/*
> + * Reads from the oldmem device from given offset till
> + * given count
> + */
> +static ssize_t read_from_oldmem(char *buf, size_t count,
> + loff_t *ppos, int userbuf)
> +{
> + unsigned long pfn, p = *ppos;
> + size_t read = 0;
> +
> + pfn = p / PAGE_SIZE;
> + p = p % PAGE_SIZE;
> +
> + if (pfn > saved_max_pfn) {
> + read = -EINVAL;
> + goto done;
> + }
> +
> + if (count > PAGE_SIZE - p)
> + count = PAGE_SIZE - p;
> +
> + if (copy_oldmem_page(pfn, buf, count, userbuf)) {
> + read = -EFAULT;
> + goto done;
> + }
> +
> + *ppos += count;
hm, what's going on here? *ppos is a loff_t but you've copied it
into a 32-bit local prior to calculating the pfn.
next prev parent reply other threads:[~2004-09-15 21:36 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-15 12:50 kexec based crash dumping Hariprasad Nellitheertha
2004-09-15 12:51 ` [PATCH][1/6]Documentation Hariprasad Nellitheertha
2004-09-15 12:53 ` [PATCH][2/6]Memory preserving reboot using kexec Hariprasad Nellitheertha
2004-09-15 12:54 ` [PATCH][3/6]Routines for copying the dump pages Hariprasad Nellitheertha
2004-09-15 12:55 ` [PATCH][4/6]Register snapshotting before kexec boot Hariprasad Nellitheertha
2004-09-15 12:56 ` [PATCH][5/6]ELF format dump file access Hariprasad Nellitheertha
2004-09-15 12:57 ` [PATCH][6/6]Linear/raw " Hariprasad Nellitheertha
2004-09-15 21:28 ` [PATCH][5/6]ELF " Andrew Morton
2004-09-15 21:29 ` Andrew Morton
2004-09-15 21:31 ` Andrew Morton [this message]
2004-09-15 21:27 ` [PATCH][4/6]Register snapshotting before kexec boot Andrew Morton
2004-09-16 8:11 ` [Fastboot] " Dipankar Sarma
2004-09-17 14:53 ` Srivatsa Vaddagiri
2004-09-19 20:17 ` Eric W. Biederman
2004-09-15 21:23 ` [PATCH][3/6]Routines for copying the dump pages Andrew Morton
2004-09-15 21:22 ` [PATCH][2/6]Memory preserving reboot using kexec Andrew Morton
2004-09-19 20:37 ` [Fastboot] " Eric W. Biederman
2004-09-20 13:49 ` Hariprasad Nellitheertha
2004-09-20 19:53 ` Eric W. Biederman
2004-09-15 17:33 ` [Fastboot] kexec based crash dumping Eric W. Biederman
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=20040915143111.23dac3d7.akpm@osdl.org \
--to=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome