From: NeilBrown <neilb@suse.com>
To: Anna Schumaker <Anna.Schumaker@Netapp.com>,
Trond Myklebust <trond.myklebust@primarydata.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 02/20] SUNRPC: add 'struct cred *' to auth_cred and rpc_cred
Date: Mon, 29 Jan 2018 17:07:21 +1100 [thread overview]
Message-ID: <87zi4x5hba.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <ea9fad0d-a718-aba8-3dd1-042644577c81@Netapp.com>
[-- Attachment #1: Type: text/plain, Size: 1482 bytes --]
On Thu, Jan 18 2018, Anna Schumaker wrote:
> Hi Neil,
>
> On 01/08/2018 12:26 AM, NeilBrown wrote:
>> The SUNRPC credential framework was put together before
>> Linux has 'struct cred'. Now that we have it, it makes sense to
>> use it.
>> This first step just includes a suitable 'struct cred *' pointer
>> in every 'struct auth_cred' and almost every 'struct rpc_cred'.
>>
>> The rpc_cred used for auth_null has a NULL 'struct cred *' as nothing
>> else really makes sense.
>>
>> For rpc_cred, the pointer is reference counted.
>> For auth_cred it isn't. struct auth_cred are either allocated on
>> the stack, in which case the thread owns a reference to the auth,
>> or are part of 'struct generic_cred' in which case gc_base owns the
>> reference and acred shares it.
>>
>> Signed-off-by: NeilBrown <neilb@suse.com>
...
>> @@ -669,11 +671,15 @@ rpcauth_bind_root_cred(struct rpc_task *task, int lookupflags)
>> struct auth_cred acred = {
>> .uid = GLOBAL_ROOT_UID,
>> .gid = GLOBAL_ROOT_GID,
>> + .cred = get_task_cred(&init_task),
>
> Is there a patch somewhere to add "EXPORT_SYMBOL_GPL(get_task_cred)" to kernel/cred.c?
> I'm getting:
> ERROR: "get_task_cred" [net/sunrpc/sunrpc.ko] undefined!
> when I compile.
>
Thanks for finding that - I don't often compile things as modules :-)
I'll separate out the core cred.[ch] patches, add this, and send those
for an ACK to the relevant maintainer.
thanks,
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2018-01-29 10:24 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-08 5:26 [PATCH 00/20] Remove generic rpc credentials, and associated changed - V2 NeilBrown
2018-01-08 5:26 ` [PATCH 06/20] NFSv4: add cl_root_cred for use when machine cred is not available NeilBrown
2018-01-08 5:26 ` [PATCH 03/20] SUNRPC: remove groupinfo from struct auth_cred NeilBrown
2018-01-08 5:26 ` [PATCH 02/20] SUNRPC: add 'struct cred *' to auth_cred and rpc_cred NeilBrown
2018-01-18 18:39 ` Anna Schumaker
2018-01-18 19:11 ` Anna Schumaker
2018-01-29 6:11 ` NeilBrown
2018-02-01 1:43 ` NeilBrown
2018-01-29 6:07 ` NeilBrown [this message]
2018-01-08 5:26 ` [PATCH 07/20] NFSv4: don't require lock for get_renew_cred or get_machine_cred NeilBrown
2018-01-08 5:26 ` [PATCH 05/20] SUNRPC: remove machine_cred field from struct auth_cred NeilBrown
2018-01-08 5:26 ` [PATCH 01/20] cred: add cred_fscmp() for comparing creds NeilBrown
2018-01-08 5:26 ` [PATCH 04/20] SUNRPC: remove uid and gid from struct auth_cred NeilBrown
2018-01-08 5:26 ` [PATCH 17/20] SUNRPC: remove generic cred code NeilBrown
2018-01-08 5:26 ` [PATCH 19/20] SUNRPC: simplify auth_unix NeilBrown
2018-01-08 5:26 ` [PATCH 14/20] NFS: change access cache to use 'struct cred' NeilBrown
2018-01-08 5:26 ` [PATCH 20/20] SUNRPC discard cr_uid from struct rpc_cred NeilBrown
2018-01-08 5:26 ` [PATCH 10/20] SUNRPC: introduce RPC_TASK_NULLCREDS to request auth_none NeilBrown
2018-01-08 5:26 ` [PATCH 18/20] SUNRPC: remove crbind rpc_cred operation NeilBrown
2018-01-08 5:26 ` [PATCH 09/20] NFS/SUNRPC: don't lookup machine credential until rpcauth_bindcred() NeilBrown
2018-01-08 5:26 ` [PATCH 15/20] NFS: struct nfs_open_dir_context: convert rpc_cred pointer to cred NeilBrown
2018-01-08 5:26 ` [PATCH 12/20] NFS: move credential expiry tracking out of SUNRPC into NFS NeilBrown
2018-01-08 5:26 ` [PATCH 16/20] NFS/NFSD/SUNRPC: replace generic creds with 'struct cred' NeilBrown
2018-01-08 5:26 ` [PATCH 08/20] SUNRPC: discard RPC_DO_ROOTOVERRIDE() NeilBrown
2018-01-08 5:26 ` [PATCH 11/20] SUNRPC: add side channel to use non-generic cred for rpc call NeilBrown
2018-01-08 5:26 ` [PATCH 13/20] SUNRPC: remove RPCAUTH_AUTH_NO_CRKEY_TIMEOUT NeilBrown
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=87zi4x5hba.fsf@notabene.neil.brown.name \
--to=neilb@suse.com \
--cc=Anna.Schumaker@Netapp.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@primarydata.com \
/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.