linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "NeilBrown" <neilb@suse.de>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: "David Howells" <dhowells@redhat.com>,
	"Christoph Hellwig" <hch@infradead.org>,
	linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org
Subject: Re: Curiosities of Linux NFSD file handles
Date: Fri, 5 Dec 2008 09:28:50 +1100 (EST)	[thread overview]
Message-ID: <76726f87d17b81a0c8f1f773c1566b22.squirrel@neil.brown.name> (raw)
In-Reply-To: <20081204193511.GE7575@fieldses.org>

On Fri, December 5, 2008 6:35 am, J. Bruce Fields wrote:
> On Thu, Dec 04, 2008 at 04:46:57PM +0000, David Howells wrote:
>>
>> I've been poking around in the exportfs code, and I see that the handle
>> decode
>> routines seem to expect that they may be given more data for a handle
>> than the
>> encode_fh() routine produced.
>
> Somebody else who understands what you're asking about off the top of
> their heads may be able to pop up and answer this.  But I'm a little
> confused.  Which encode/decode routines exactly, and where do you see
> them making assumptions about the size of the data?
>

I'm with Bruce here - what exactly do you mean?

The decode routine cannot assume anything about the filehandle
as it was received from the network and so is inherently untrustworthy.
However if it finds anything that it did not expect (i.e. that
encode could not have generated) then it is free to return an error.

NeilBrown


  reply	other threads:[~2008-12-04 22:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-04 16:46 Curiosities of Linux NFSD file handles David Howells
2008-12-04 19:35 ` J. Bruce Fields
2008-12-04 22:28   ` NeilBrown [this message]
     [not found] ` <20081204193511.GE7575-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
2008-12-05  9:07   ` David Howells

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=76726f87d17b81a0c8f1f773c1566b22.squirrel@neil.brown.name \
    --to=neilb@suse.de \
    --cc=bfields@fieldses.org \
    --cc=dhowells@redhat.com \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).