All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Staubach <staubach@redhat.com>
To: Assar <assar@permabit.com>
Cc: Marcelo Tosatti <marcelo.tosatti@cyclades.com>,
	Trond Myklebust <trond.myklebust@fys.uio.no>,
	Valdis.Kletnieks@vt.edu, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] nfs client, kernel 2.4.31: readlink result overflow
Date: Wed, 14 Sep 2005 18:26:42 -0400	[thread overview]
Message-ID: <4328A3A2.7010605@redhat.com> (raw)
In-Reply-To: <78ek7rfg0o.fsf@sober-counsel.permabit.com>

Assar wrote:

>Peter Staubach <staubach@redhat.com> writes:
>  
>
>>This code appears to assume that rcvbuf->page_base is zero here, but then
>>uses rcvbuf->page_base when calculating where to place the null byte.  It
>>seems to me that it should either use rcvbuf->page_base in both
>>calculations or neither.
>>    
>>
>
>The meaning of page_len and page_base are not totally clear to me.  Is
>it the case that the data starts at offset page_base and there is
>page_len bytes of it.  If that's the case, I think the code is doing
>the right thing.
>

I am not clear either, but I would think that kmap_atomic() would return
a pointer to the beginning of the page.  There is also an assumption that
there is only one page.  If page_base needs to be used to offset from
the address returned by kmap_atomic(), then I wouldn't think that the
current test is correct.  I think that it needs to take page_base into
account when checking for the boundary.

    Thanx...

       ps

  reply	other threads:[~2005-09-14 22:33 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-12 13:26 [PATCH] nfs client, kernel 2.4.31: readlink result overflow Assar
2005-09-12 18:46 ` Valdis.Kletnieks
2005-09-12 19:37   ` Assar
2005-09-12 20:01     ` Valdis.Kletnieks
2005-09-12 20:41       ` Assar
2005-09-12 20:53         ` Valdis.Kletnieks
2005-09-13 18:39         ` Marcelo Tosatti
2005-09-13 18:52           ` Assar
2005-09-13 19:35             ` Marcelo Tosatti
2005-09-13 20:01               ` Assar
2005-09-14 18:55                 ` Peter Staubach
2005-09-14 19:41                   ` Assar
2005-09-14 20:11                     ` Peter Staubach
2005-09-14 22:20                       ` Assar
2005-09-14 22:26                         ` Peter Staubach [this message]
2005-09-14 20:15                     ` Peter Staubach
2005-09-14 20:26                       ` Assar
2005-09-14 20:27                         ` Peter Staubach
2005-09-14 20:59                           ` Assar
2005-09-13 20:36             ` Peter Staubach
2005-09-13 20:55               ` Assar

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=4328A3A2.7010605@redhat.com \
    --to=staubach@redhat.com \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=assar@permabit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.tosatti@cyclades.com \
    --cc=trond.myklebust@fys.uio.no \
    /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.