From: James Pearson <james-p@moving-picture.com>
To: Arvin Moezzi <moezzia@gmail.com>
Cc: linux-kernel@vger.kernel.org, aarapov@redhat.com,
akpm@linux-foundation.org, hpa@zytor.com
Subject: Re: [PATCH -mm] Don't truncate /proc/PID/environ at 4096 characters
Date: Fri, 21 Sep 2007 14:47:34 +0100 [thread overview]
Message-ID: <46F3CB76.3080304@moving-picture.com> (raw)
In-Reply-To: <3402120c0709210547mb66162fv759a8f088beb0437@mail.gmail.com>
Arvin Moezzi wrote:
> I think that's not true. 'count' is changing through the iteration.
> The difference in the mem_read():
>
> * while (count > 0) {
> * int this_len, retval;
> *
> * this_len = (count > PAGE_SIZE) ? PAGE_SIZE : count;
> * retval = access_process_vm(task, src, page, this_len, 0);
> *
> * ...
> * }
>
> is the fact, that this_len = min(PAGE_SIZE, count) is in the
> iteration block, hence retval <= this_len <= count in each iteration
> step. So this is ok. But IMHO in your code 'retval' may be bigger than
> 'count' in the last iteration of the block, because 'max_len' is fix
> through your iteration but 'count' is changing. Or am i missing
> something?
Yes, you are correct ...
Thanks
James Pearson
next prev parent reply other threads:[~2007-09-21 13:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-19 13:35 [PATCH -mm] Don't truncate /proc/PID/environ at 4096 characters James Pearson
2007-09-20 23:46 ` Andrew Morton
2007-09-21 9:41 ` James Pearson
2007-09-21 10:00 ` Mel Gorman
2007-09-21 1:56 ` Arvin Moezzi
2007-09-21 9:47 ` James Pearson
2007-09-21 12:47 ` Arvin Moezzi
2007-09-21 13:47 ` James Pearson [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-09-19 14:54 Mikael Pettersson
2007-09-19 15:59 ` H. Peter Anvin
2007-09-19 18:35 ` Mikael Pettersson
2007-09-19 19:29 ` Hugh Dickins
2007-09-25 16:44 James Pearson
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=46F3CB76.3080304@moving-picture.com \
--to=james-p@moving-picture.com \
--cc=aarapov@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=moezzia@gmail.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.