lkml.org 
[lkml]   [1999]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: 2.3.30 linuxNFS import is broken (Screwed up NFS/RPC credentials)
From
>>>>> " " == Alexander Viro <viro@math.psu.edu> writes:


>> Arrgh. Somebody has messed about with the API for readpage and
>> writepage, so that they no longer pass the file pointer!

> Damn! Could you tell me _where_ did they use it?
> write_one_page() still gets the struct file*, if that's what
> you are thinking about. readpage() and writepage() are _full_
> _page_ accesses. Nothing to merge here, AFAICS.
Let me explain: The problem is that NFS relies on the user sending the
RPC authentication each and every time we access data on the
server. In order not to get a permissions error suddenly if the user
changes euid while s/he is reading/writing to the open file, we
therefore want to use the same RPC authentication info throughout the
file's lifetime. Ideally that means taking the RPC auth info that was
valid when opening the file (since this is more or less in line with a
POSIX filesystem's behaviour with permission checking at file open
only) and caching it somewhere.

The most practical way of implementing this policy is therefore to
hide the RPC auth in the file descriptor structure (I use the private
data field), and pass that info via the file pointer to
readpage/writepage/whatever else needs it.

This fix has not yet been merged in to the stock kernel, ('cos Linus
wanted the patch cleaned up before accepting it) so I can't really
blame other people for having messed up. Nevertheless in order to
avoid the clumsines of some unwieldy extra (void* opaque)-like
arguments to the readpage/writepage functions, I'd really appreciate
if we could revert to passing the filp instead of the dentry to
readpage/writepage.

Cheers,
Trond

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [from the cache]
©2003-2011 Jasper Spaans