summaryrefslogtreecommitdiff
path: root/net/sunrpc
AgeCommit message (Collapse)Author
2005-03-28[PATCH] swsusp: Add missing refrigerator callsPavel Machek
This adds few more places where it is possible freeze kernel threads. From: Nigel Cunningham <ncunningham@cyclades.com> Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-03-16[NET] Convert sk_zapped into SOCK_ZAPPED flagThomas Graf
Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-03-11[PATCH] RPC: remove bogus atomic_dec in auth_nullTrond Myklebust
The atomic_dec in nul_destroy() is harmless, but can trigger an underflow error if the atomic_dec_and_test() debugging is turned on. Problem diagnosed by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-03-10NFS,RPC: RPC client now advertises maximum payload sizeTrond Myklebust
The RPC client now reports the maximum payload size supported by the chosen transport method. This is something a little less than 64KB for RPC over UDP, and about 2GB - 1 for RPC over TCP. The effective rsize and wsize values are not allowed to exceed the reported maximum RPC payload size. Signed-off-by: Chuck Lever <cel@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-03-10RPC: remove broken_suid mount optionTrond Myklebust
Remove broken_suid mount option (retry RPC after dropping privileges upon EACCES): no longer used and questionable w.r.t. security. Signed-off-by: Frank van Maarseveen <frankvm@frankvm.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-03-10RPC: Clean up of rpcauth_lookupcred() and rpcauth_bindcred()Trond Myklebust
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-03-10RPC: make rpcauth_lookupcred() return error codes.Trond Myklebust
So we can distinguish between ENOMEM and EACCES errors. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-03-10RPC: Initialize the GSS context upon RPC credential creation.Trond Myklebust
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-03-10RPC: Remove dependency of RPCSEC_GSS upcalls on the credential cacheTrond Myklebust
Ensure that credentials that are referenced by an RPC task, but that have been booted out of the credcache may still be refreshed. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-03-10RPCSEC_GSS: Enable expiring of credentialsTrond Myklebust
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-03-10RPCSEC_GSS: Misc little cleanups.Trond Myklebust
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-03-10RPCSEC_GSS: cleanup gss_cred.Trond Myklebust
gc_flavor is used only for looking up the security service, which is an integer value that never changes. Store the latter instead of the former. Fix up a couple of dodgy casts between gss_cred and rpc_cred. Replace them with the appropriate container_of(). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-03-10RPC: Document the format of the gssd downcallsTrond Myklebust
- Document the format of the gssd downcalls - Separate out "uid" field from rest of GSS context data struct since it will not be needed for the keyring-based contexts. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-03-10RPC: clean up the RPCSEC_GSS kerberos and spkm3 context import functionsTrond Myklebust
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-03-10RPC: Shrink struct rpc_auth for those flavours that don't use the cacheTrond Myklebust
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-03-10RPC: Unify the AUTH_UNIX credential cache.Trond Myklebust
AUTH_UNIX credentials really only depend on the process uid/gid/groups information. In particular there is no dependency on any strict rpc_client specific information. Might as well share them all between all RPC clients. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-03-10RPC: Unify AUTH_NULL credentialsTrond Myklebust
There is only one AUTH_NULL "credential". Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-03-10RPC: Convert RPC credcache to use hlistsTrond Myklebust
This will make initialization of statically allocated caches simpler. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-03-10RPC: kill cr_authTrond Myklebust
The cr_auth field is currently used only in order to figure out the name of the credential's flavour in debugging printks. Replace with a dedicated pointer in the statically allocated rpc_credops instead. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-03-10RPC: Make rpc_auth credential cache optional.Trond Myklebust
Some RPC authentication flavours are not related to the uid (AUTH_NULL springs to mind). This patch moves control over the caching mechanism into the auth-specific code. Also ensure that expired creds are removed from the cache. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-03-10RPC: Move credcache-specific code out of put_rpccred()Trond Myklebust
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-03-10RPC: struct rpc_auth initialization and destruction code cleanupTrond Myklebust
Move the initialization of auth->au_count into the flavour-specific code. Move the kfree(auth) into the flavour-specific code. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-03-10RPC: Remove unnecessary reference counting in gss downcall code.Trond Myklebust
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-03-10RPC: Remove unnecessary module refcountingTrond Myklebust
The sunrpc module itself is referenced by other sources, so only the auth_gss credcaches need to increment their module refcount. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-03-10RPC: Some portmappers expect AUTH_UNIX authenticationTrond Myklebust
Sun's RPC library portmap client therefore defaults to AUTH_UNIX. Change our in-kernel client to follow that convention. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-03-10RPC: Fix return value of rpc_call_async()Trond Myklebust
RPC call async is supposed to return an error if and only if it failed to run the rpc_task. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-03-10RPC: Don't kill timers when calling rpc_restart_call() after rpc_delay()Trond Myklebust
Currently, if we restart an RPC call after having set an RPC delay (for instance in the case where an NFS EJUKEBOX error has occurred) the call to rpc_delete_timer() at the top of the rpc_execute() loop will kill off our timer. This patch causes rpc_delete_timer() to detect if the rpc_task is still queued on a wait queue, and refuse to delete the timer if this is the case. Problem diagnosed by Jan Sanislo and Olaf Kirch. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-03-04[PATCH] nfsd: discard CACHE_HASHED flag, keeping information in refcount ↵Neil Brown
instead. This patch should fix a problem that has been experienced on at-least one busy NFS server, but it has not had lots of testing yet. If -mm could provide that ..... The rpc auth cache currently differentiates between a reference due to being in a hash chain (signalled by CACHE_HASHED flag) and any other reference (counted in refcnt). This is an artificial difference due to an historical accident, and it makes cache_put unsafe. This patch removes the distinction so now existance in a hash chain is counted just like any other reference. Thus a race window in cache_put is closed. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-03-04[PATCH] nfsd: nfsd: remove pg_authenticate fieldNeil Brown
The pg_authenticate (now pg_authenticate_obsolete) callback was only being used by the nfs4 client callback code to circumvent the svcauth_unix code's insistence on checking all requests against the export table. With that problem solved, we no longer need it. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-03-04[PATCH] nfsd: svcrpc: move export table checks to a per-program ↵Neil Brown
pg_add_client method svcauth_null_accept() and svcauth_unix_accept() are currently hard-wired to check the source ip address on an incoming request against the export table, which make sense for nfsd but not necessarily for other rpc-based services. So instead we have the accept() method call a program-specific pg_authenticate() method. We also move the call to this method into svc_process instead of calling it from the flavor-specific accept() routines. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-03-04[PATCH] nfsd: svcrpc: rename pg_authenticateNeil Brown
Later patches remove pg_authenticate and use the name for a different purpose; so rename it to pg_authenticate_obsolete for now. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-03-04[PATCH] nfsd: svcrpc: add a per-flavor set_client methodNeil Brown
Add a set_client method to the server rpc auth_ops struct, used to set the client (for the purposes of nfsd export authorization) using flavor-specific information. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-01-16[PATCH] RPC: fix crrefresh() operations for AUTH_NULL and AUTH_SYSTrond Myklebust
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-01-16[PATCH] RPCSEC_GSS: Fix a refcount leakTrond Myklebust
RPC: Fix a module refcount leak in RPCSEC_GSS Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-01-14[PATCH] swsusp: refrigerator cleanupsPavel Machek
This patch is from Nigel's swsusp2, it kills ugly #include <suspend.h> from all over the tree, and makes code slightly nicer. I only left those parts that do not change any code. From: Nigel Cunningham <ncunningham@linuxmail.org> Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-01-13[NET]: Lock initializer cleanup.Thomas Gleixner
Use the new lock initializers DEFINE_SPIN_LOCk and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-01-05Merge bk://kernel.bkbits.net/acme/connection_sock-2.6David S. Miller
into nuts.davemloft.net:/disk1/BK/net-2.6
2005-01-04[PATCH] knfsd: rpcsec_gss: comparing pointer to 0 instead of NULLNeil Brown
Just noticed while fixing some other sparse-related stuff. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-01-04[PATCH] knfsd: svcrpc: share code duplicated between auth_unix and auth_nullNeil Brown
Call a helper function from svcauth_unix_accept() and svcauth_null_accept() instead of duplicating code. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-01-04[PATCH] knfsd: svcrpc: auth_null fixesNeil Brown
Fix some discrepencies between the server-side auth_null and auth_unix rpc code: in particular, make sure we return an auth error in the auth_null case instead of dropping when we fail to match an export entry, and make sure such responses are encoded correctly. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-01-04[PATCH] Sync in core time granuality with filesystemsAndi Kleen
This patch corrects a problem that was originally added with the nanosecond timestamps in stat patch. The problem is that some file systems don't have enough space in their on disk inode to save nanosecond timestamps, so they truncate the c/a/mtime to seconds when flushing an dirty node. In core the inode would have full jiffies granuality. This can be observed by programs as a timestamp that jumps backwards under specific loads when an inode is flushed and then reloaded from disk. The problem was already known when the original patch went in, but it wasn't deemed important enough at that time. So far there has been only one report of it causing problems. Now Tridge is worried that it will break running Excel over samba4 because Excel seems to do very anal timestamp checking and samba4 will supply 100ns timestamps over the network. This patch solves it by putting the time resolution into the superblock of a fs and always rounding the in core timestamps to that granuality. This also supercedes some previous ext2/3 hacks to flush the inode less often when only the subsecond timestamp changes. I tried to keep the overhead low, in particular it tries to keep divisions out of fast paths as far as possible. The patch is quite big but 99% of it is just relatively straight forward search'n'replace in a lot of fs. Unconverted filesystems will default to a 1ns granuality, but may still show the problem if they continue to use CURRENT_TIME. I converted all in tree fs. One possible future extension of this would be to have two time granualities per superblock - one that specifies the visible resolution, and the other to specify how often timestamps should be flushed to disk, which could be tuned with a mount option per fs (e.g. often m/atimes don't need to be flushed every second). Would be easy to do as an addon if someone is interested. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-01-04RPC: call_verifyTrond Myklebust
Don't label all retries as "server seeing garbage". Report correct error for buffer overflows. Fix incorrect buffer overflow test that was masking AUTH_REJECTEDCRED, AUTH_REJECTEDVERF,... errors. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-01-04 Subject: [PATCH] RPC: display XIDs in host orderTrond Myklebust
Description: Ethereal and other tools display RPC XIDs in host order. This patch changes the RPC trace messages that display XIDs to print them in host order so they can be easily matched to XIDs that appear in Ethereal. Signed-off-by: Chuck Lever <cel@netapp.com> Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
2005-01-04 RPC: Optimize away unnecessary del_timer_sync() operations, when weTrond Myklebust
know there are no pending timers. Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
2005-01-04RPCSEC_GSS: Miscellaneous cleanup of auth_gss.c: we're passing somethingTrond Myklebust
as a void * when we know perfectly well what it is. And we're passing some arguments that we don't actually use. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
2005-01-04RPC: The RPCAUTH_CRED_DEAD flag had been unused for some time before ITrond Myklebust
unwisely revived it for use with the gss code. Having removed that use from the gss code, it's time to remove all references to it. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
2005-01-04RPC: Instead of setting a flag (RPCAUTH_CRED_DEAD) in the cred toTrond Myklebust
indicate failure of an upcall to get a gss context for that cred, set the status of waiting tasks to indicate failure. This solves problems e.g. with creds with the CRED_DEAD flag set never being refreshed, which caused krb5 mounts to fail after the context used to do RENEWS expired. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
2005-01-04RPCSEC_GSS: When the gss code notices that a cred has expired, markTrond Myklebust
the cred containing the context non-uptodate, triggering creation of a new context. Note that on the send-side operations (get_mic, wrap), we mark the cred as not uptodate, but continue trying to use it; the server can complain if it wants to, and the next time through we'll refresh it. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
2005-01-04RPC: Add missing calls to flush_dcache_page() in net/sunrpc/xdr.cTrond Myklebust
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-01-04RPC: More aggressive RPC debugging code.Trond Myklebust
People are worrying about spinlock deadlocks in the debugging code, without actually worrying about the bugs that triggered the debugging code in the first place. Convert to BUG_ON() in order to ensure that bugs are reported. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>