<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/sunrpc/auth_null.c, branch v4.9</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.9</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.9'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-07-19T20:23:24Z</updated>
<entry>
<title>sunrpc: move NO_CRKEY_TIMEOUT to the auth-&gt;au_flags</title>
<updated>2016-07-19T20:23:24Z</updated>
<author>
<name>Scott Mayhew</name>
<email>smayhew@redhat.com</email>
</author>
<published>2016-06-07T19:14:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ce52914eb76efd62aa48d738cf845b37852bf920'/>
<id>urn:sha1:ce52914eb76efd62aa48d738cf845b37852bf920</id>
<content type='text'>
A generic_cred can be used to look up a unx_cred or a gss_cred, so it's
not really safe to use the the generic_cred-&gt;acred-&gt;ac_flags to store
the NO_CRKEY_TIMEOUT flag.  A lookup for a unx_cred triggered while the
KEY_EXPIRE_SOON flag is already set will cause both NO_CRKEY_TIMEOUT and
KEY_EXPIRE_SOON to be set in the ac_flags, leaving the user associated
with the auth_cred to be in a state where they're perpetually doing 4K
NFS_FILE_SYNC writes.

This can be reproduced as follows:

1. Mount two NFS filesystems, one with sec=krb5 and one with sec=sys.
They do not need to be the same export, nor do they even need to be from
the same NFS server.  Also, v3 is fine.
$ sudo mount -o v3,sec=krb5 server1:/export /mnt/krb5
$ sudo mount -o v3,sec=sys server2:/export /mnt/sys

2. As the normal user, before accessing the kerberized mount, kinit with
a short lifetime (but not so short that renewing the ticket would leave
you within the 4-minute window again by the time the original ticket
expires), e.g.
$ kinit -l 10m -r 60m

3. Do some I/O to the kerberized mount and verify that the writes are
wsize, UNSTABLE:
$ dd if=/dev/zero of=/mnt/krb5/file bs=1M count=1

4. Wait until you're within 4 minutes of key expiry, then do some more
I/O to the kerberized mount to ensure that RPC_CRED_KEY_EXPIRE_SOON gets
set.  Verify that the writes are 4K, FILE_SYNC:
$ dd if=/dev/zero of=/mnt/krb5/file bs=1M count=1

5. Now do some I/O to the sec=sys mount.  This will cause
RPC_CRED_NO_CRKEY_TIMEOUT to be set:
$ dd if=/dev/zero of=/mnt/sys/file bs=1M count=1

6. Writes for that user will now be permanently 4K, FILE_SYNC for that
user, regardless of which mount is being written to, until you reboot
the client.  Renewing the kerberos ticket (assuming it hasn't already
expired) will have no effect.  Grabbing a new kerberos ticket at this
point will have no effect either.

Move the flag to the auth-&gt;au_flags field (which is currently unused)
and rename it slightly to reflect that it's no longer associated with
the auth_cred-&gt;ac_flags.  Add the rpc_auth to the arg list of
rpcauth_cred_key_to_expire and check the au_flags there too.  Finally,
add the inode to the arg list of nfs_ctx_key_to_expire so we can
determine the rpc_auth to pass to rpcauth_cred_key_to_expire.

Signed-off-by: Scott Mayhew &lt;smayhew@redhat.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>nfsd: Lower NFSv4.1 callback message size limit</title>
<updated>2016-03-01T21:06:35Z</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2016-03-01T18:06:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4500632f60fa0d85e4101c374898cdf9b7b0cfac'/>
<id>urn:sha1:4500632f60fa0d85e4101c374898cdf9b7b0cfac</id>
<content type='text'>
The maximum size of a backchannel message on RPC-over-RDMA depends
on the connection's inline threshold. Today that threshold is
typically 1024 bytes, making the maximum message size 996 bytes.

The Linux server's CREATE_SESSION operation checks that the size
of callback Calls can be as large as 1044 bytes, to accommodate
RPCSEC_GSS. Thus CREATE_SESSION fails if a client advertises the
true message size maximum of 996 bytes.

But the server's backchannel currently does not support RPCSEC_GSS.
The actual maximum size it needs is much smaller. It is safe to
reduce the limit to enable NFSv4.1 on RDMA backchannel operation.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
</entry>
<entry>
<title>sunrpc: eliminate RPC_DEBUG</title>
<updated>2014-11-24T22:31:46Z</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@primarydata.com</email>
</author>
<published>2014-11-17T21:58:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f895b252d4edf66b2895fb5a7b17a638665f3e1f'/>
<id>urn:sha1:f895b252d4edf66b2895fb5a7b17a638665f3e1f</id>
<content type='text'>
It's always set to whatever CONFIG_SUNRPC_DEBUG is, so just use that.

Signed-off-by: Jeff Layton &lt;jlayton@primarydata.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>sunrpc/auth: allow lockless (rcu) lookup of credential cache.</title>
<updated>2014-08-03T21:14:12Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2014-07-14T01:28:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bd95608053b7f7813351b0defc0e3e7ef8cf2803'/>
<id>urn:sha1:bd95608053b7f7813351b0defc0e3e7ef8cf2803</id>
<content type='text'>
The new flag RPCAUTH_LOOKUP_RCU to credential lookup avoids locking,
does not take a reference on the returned credential, and returns
-ECHILD if a simple lookup was not possible.

The returned value can only be used within an rcu_read_lock protected
region.

The main user of this is the new rpc_lookup_cred_nonblock() which
returns a pointer to the current credential which is only rcu-safe (no
ref-count held), and might return -ECHILD if allocation was required.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>SUNRPC refactor rpcauth_checkverf error returns</title>
<updated>2013-09-03T19:25:09Z</updated>
<author>
<name>Andy Adamson</name>
<email>andros@netapp.com</email>
</author>
<published>2013-08-14T15:59:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=35fa5f7b35ca2076d594b2670a32d66dd3ae9eec'/>
<id>urn:sha1:35fa5f7b35ca2076d594b2670a32d66dd3ae9eec</id>
<content type='text'>
Most of the time an error from the credops crvalidate function means the
server has sent us a garbage verifier. The gss_validate function is the
exception where there is an -EACCES case if the user GSS_context on the client
has expired.

Signed-off-by: Andy Adamson &lt;andros@netapp.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>SUNRPC: Replace clnt-&gt;cl_principal</title>
<updated>2013-08-30T13:19:36Z</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2013-08-26T23:23:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c2190661039b3817b4cc1cbfea620b3f7dbe5cd8'/>
<id>urn:sha1:c2190661039b3817b4cc1cbfea620b3f7dbe5cd8</id>
<content type='text'>
The clnt-&gt;cl_principal is being used exclusively to store the service
target name for RPCSEC_GSS/krb5 callbacks. Replace it with something that
is stored only in the RPCSEC_GSS-specific code.

Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>SUNRPC: Move the bound cred to struct rpc_rqst</title>
<updated>2010-08-04T12:54:09Z</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2010-07-31T18:29:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a17c2153d2e271b0cbacae9bed83b0eaa41db7e1'/>
<id>urn:sha1:a17c2153d2e271b0cbacae9bed83b0eaa41db7e1</id>
<content type='text'>
This will allow us to save the original generic cred in rpc_message, so
that if we migrate from one server to another, we can generate a new bound
cred without having to punt back to the NFS layer.

Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>headers: utsname.h redux</title>
<updated>2009-09-24T01:13:10Z</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2009-09-24T00:22:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2bcd57ab61e7cabed626226a3771617981c11ce1'/>
<id>urn:sha1:2bcd57ab61e7cabed626226a3771617981c11ce1</id>
<content type='text'>
* remove asm/atomic.h inclusion from linux/utsname.h --
   not needed after kref conversion
 * remove linux/utsname.h inclusion from files which do not need it

NOTE: it looks like fs/binfmt_elf.c do not need utsname.h, however
due to some personality stuff it _is_ needed -- cowardly leave ELF-related
headers and files alone.

Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>NFSv4: Don't use cred-&gt;cr_ops-&gt;cr_name in nfs4_proc_setclientid()</title>
<updated>2008-04-19T20:54:53Z</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2008-04-08T00:49:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=78ea323be6380a9313e87fe241809e912e8ae401'/>
<id>urn:sha1:78ea323be6380a9313e87fe241809e912e8ae401</id>
<content type='text'>
With the recent change to generic creds, we can no longer use
cred-&gt;cr_ops-&gt;cr_name to distinguish between RPCSEC_GSS principals and
AUTH_SYS/AUTH_NULL identities. Replace it with the rpc_authops-&gt;au_name
instead...

Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>SUNRPC: Add an rpc_credop callback for binding a credential to an rpc_task</title>
<updated>2008-03-14T17:42:41Z</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2008-03-12T20:21:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5c691044ecbca04dd558fca4c754121689fe1b34'/>
<id>urn:sha1:5c691044ecbca04dd558fca4c754121689fe1b34</id>
<content type='text'>
We need the ability to treat 'generic' creds specially, since they want to
bind instances of the auth cred instead of binding themselves.

Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
</feed>
