linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	linux-next@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Simo Sorce <simo@redhat.com>
Subject: Re: linux-next: build failure after merge of the nfsd tree
Date: Mon, 29 Apr 2013 15:14:34 -0400	[thread overview]
Message-ID: <05D6BB77-3957-46D1-A7C2-B8813185ADCB@oracle.com> (raw)
In-Reply-To: <20130429185712.GP17268@fieldses.org>


On Apr 29, 2013, at 2:57 PM, J. Bruce Fields <bfields@fieldses.org> wrote:

> On Mon, Apr 29, 2013 at 02:30:33PM -0400, Chuck Lever wrote:
>> 
>> On Apr 29, 2013, at 1:59 PM, "J. Bruce Fields" <bfields@fieldses.org>
>> wrote:
>> 
>>> On Mon, Apr 29, 2013 at 01:47:16PM -0400, Chuck Lever wrote:
>>>> 
>>>> On Apr 29, 2013, at 1:38 PM, "J. Bruce Fields"
>>>> <bfields@fieldses.org> wrote:
>>>> 
>>>>> On Mon, Apr 29, 2013 at 01:04:01PM -0400, Chuck Lever wrote:
>>>>>> Trond's nfs-for-next now has the new rpcauth_get_gssinfo() and
>>>>>> rpcauth_get_pseudoflavor() APIs, which are replacements for
>>>>>> direct calls into the GSS mech switch.  These APIs are a little
>>>>>> more generic, and more robust in the face of unloaded GSS kernel
>>>>>> modules.
>>>>>> 
>>>>>> Instead of gss_mech_get_by_OID(), I suspect you want
>>>>>> rpcauth_get_pseudoflavor(), but I haven't looked at the gssproxy
>>>>>> code.
>>>>> 
>>>>> It's doing
>>>>> 
>>>>> 		status = -EOPNOTSUPP; gm =
>>>>> 		gss_mech_get_by_OID(&ud->mech_oid); if (!gm) goto out;
>>>>> 		status = -EINVAL; status =
>>>>> 		gss_import_sec_context(ud->out_handle.data,
>>>>> 		ud->out_handle.len, gm, &rsci.mechctx, &expiry,
>>>>> 		GFP_KERNEL); if (status) goto out;
>>>>> 
>>>>> So we need a way to get from an OID and some mechanism-specific
>>>>> data to a context.
>>>>> 
>>>>> Looks to me like we just want to re-export gss_mech_get_by_OID().
>>>> 
>>>> The reason for the new wrappers is to load the kernel modules
>>>> properly before trying to discover the OID -> mechanism mapping.
>>>> 
>>>> Where are you calling it from?  If it's from outside of the GSS
>>>> module, how do you guarantee the rpc_gss_auth module is loaded?
>>>> What if the GSS mechanism for that OID isn't loaded?
>>> 
>>> Sorry, I should have said just "remove static from", not
>>> "re-export"--it's in the same module.  So there should be no problem
>>> here, right?
>> 
>> OK, gotcha.  Architecturally outside of the mech switch I'd like to
>> see OIDs passed around embedded in GSS tuples rather than by
>> themselves.
> 
> I'm not sure what you mean.  When I accept a gss context I don't yet
> know what service or qop it's going to be used with, I only know the
> mechanism OID.

RPC server GSS support didn't need the gss_mech_get_by_OID() interface before gssproxy, so I'm trying to understand why it is needed now.

But it sounds like you do need it now, so go ahead and make gss_mech_get_by_OID() global within the AUTH_GSS module. 

> 
>> An alternative would be to use gss_mech_get_by_name(), which is
>> already visible, loads GSS mechanism modules automatically, and
>> returns struct gss_api_mech *.  For NFS, we should already have a
>> clean mapping of mechanism name to pseudoflavor to GSS tuple.  Looks
>> like rsc_parse() already uses this API.
> 
> We don't have a name here, only an OID.
> 
>> Do you have gssproxy patches published in a git tree somewhere I could
>> review?
> 
> It's in my for-3.10 branch.
> 
> Which is more or less what I plan to submit for 3.10, so I'd prefer not
> to rebase it at this point.
> 
> It looks like just removing "static" would resolve the immediate
> conflict, is that right?  And then I'd happily help deal with cleaning
> up the API as followup work.



-- 
Chuck Lever
chuck[dot]lever[at]oracle[dot]com

  reply	other threads:[~2013-04-29 19:15 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-29  1:24 linux-next: build failure after merge of the nfsd tree Stephen Rothwell
2013-04-29 14:53 ` Chuck Lever
2013-04-29 15:45   ` J. Bruce Fields
2013-04-29 16:05     ` Chuck Lever
2013-04-29 16:21       ` Trond Myklebust
2013-04-29 17:04         ` Chuck Lever
2013-04-29 17:37           ` Simo Sorce
2013-04-29 17:38           ` J. Bruce Fields
2013-04-29 17:47             ` Chuck Lever
2013-04-29 17:57               ` Simo Sorce
2013-04-29 17:59               ` J. Bruce Fields
2013-04-29 18:30                 ` Chuck Lever
2013-04-29 18:57                   ` J. Bruce Fields
2013-04-29 19:14                     ` Chuck Lever [this message]
2013-04-29 16:29       ` Simo Sorce
2013-04-29 16:37         ` Chuck Lever
2013-04-29 16:46           ` Simo Sorce
  -- strict thread matches above, loose matches on Subject: below --
2020-05-08  0:47 Stephen Rothwell
2020-05-12  0:22 ` J. Bruce Fields
2018-10-05  0:01 Stephen Rothwell
2018-10-04 23:54 Stephen Rothwell
2017-08-25  0:24 Stephen Rothwell
2017-08-30 23:48 ` Stephen Rothwell
2017-08-31 15:55   ` J. Bruce Fields
2015-07-20 23:57 Stephen Rothwell
2015-07-21  5:10 ` Kinglong Mee
2014-08-19 16:38 Stephen Rothwell
2014-05-28  2:07 Stephen Rothwell
2014-05-28 18:57 ` J. Bruce Fields
2014-05-26  1:18 Stephen Rothwell
2014-05-27 21:22 ` J. Bruce Fields
2013-03-01  1:04 Stephen Rothwell
2013-03-01  1:19 ` Myklebust, Trond
2013-03-02  3:42   ` J. Bruce Fields
2013-02-02  2:04 Stephen Rothwell
2013-02-02 12:57 ` J. Bruce Fields
2013-02-03 14:41   ` J. Bruce Fields
2013-02-08  5:41     ` Stanislav Kinsbursky
2013-02-08 21:19       ` J. Bruce Fields
2011-11-15 23:29 Stephen Rothwell
2011-11-16  0:14 ` J. Bruce Fields
2011-11-16  1:26   ` J. Bruce Fields
2010-09-23  1:34 Stephen Rothwell
2010-09-23  2:33 ` J. Bruce Fields
2010-09-23  2:51   ` Neil Brown
2010-09-23  4:03     ` J. Bruce Fields

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=05D6BB77-3957-46D1-A7C2-B8813185ADCB@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=bfields@fieldses.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=simo@redhat.com \
    --cc=trond.myklebust@fys.uio.no \
    /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).