autoload rpcsec_gss_krb5
Subsystems (3)
There are three layers of modules required for rpcsec_gss to work:auth_gss, a mechanism (rpcsec_gss_krb5), and then any crypto algorithms.
We autoload all of those except rpcsec_gss_krb5.
Objections?
(I suppose another option would be to get rid of the gss mechanism layer entirely, now that we've only got one of them. But I'd rather keep it.)
--b.
commit 027c33f5a292b5a4bbfc1ad9ced19ad4626d056b
Author: J. Bruce Fields <[email protected]> Date: Wed Jun 22 10:50:08 2011 -0400
rpc: allow autoloading of gss mechanisms
Remove the need for an explicit modprobe of rpcsec_gss_krb5.
net/sunrpc/auth_gss/gss_krb5_mech.c +7 -0
@@ -743,6 +743,13 @@ static struct pf_desc gss_kerberos_pfs[] = { }, }; +MODULE_ALIAS ("rpc-auth-gss-krb5" ); +MODULE_ALIAS ("rpc-auth-gss-krb5i" ); +MODULE_ALIAS ("rpc-auth-gss-krb5p" ); +MODULE_ALIAS ("rpc-auth-gss-390003" ); +MODULE_ALIAS ("rpc-auth-gss-390004" ); +MODULE_ALIAS ("rpc-auth-gss-390005" ); +static struct gss_api_mech gss_kerberos_mech = { .gm_name ="krb5" , .gm_owner =THIS_MODULE ,
net/sunrpc/auth_gss/gss_mech_switch.c +28 -4
@@ -141,7 +141,7 @@ gss_mech_get(struct gss_api_mech *gm)EXPORT_SYMBOL_GPL (gss_mech_get);struct gss_api_mech * -gss_mech_get_by_name (const char *name) +_gss_mech_get_by_name (const char *name) {struct gss_api_mech *pos, *gm =NULL ;
@@ -158,6 +158,17 @@ gss_mech_get_by_name(const char *name) } +struct gss_api_mech *gss_mech_get_by_name (const char *name) +{ +struct gss_api_mech *gm =NULL ; + + gm =_gss_mech_get_by_name (name); +if (!gm) { +request_module ("rpc-auth-gss-%s" , name); + gm =_gss_mech_get_by_name (name); + } +return gm; +}EXPORT_SYMBOL_GPL (gss_mech_get_by_name); struct gss_api_mech *
@@ -194,10 +205,9 @@ mech_supports_pseudoflavor(struct gss_api_mech *gm, u32 pseudoflavor)return 0 ; } -struct gss_api_mech * -gss_mech_get_by_pseudoflavor (u32 pseudoflavor) +struct gss_api_mech *_gss_mech_get_by_pseudoflavor (u32 pseudoflavor) { -struct gss_api_mech *pos, *gm =NULL ; +struct gss_api_mech *gm =NULL , *pos;spin_lock (®istered_mechs_lock);list_for_each_entry (pos, ®istered_mechs, gm_list) {
@@ -213,6 +223,20 @@ gss_mech_get_by_pseudoflavor(u32 pseudoflavor)return gm; } +struct gss_api_mech * +gss_mech_get_by_pseudoflavor (u32 pseudoflavor) +{ +struct gss_api_mech *gm; + + gm =_gss_mech_get_by_pseudoflavor (pseudoflavor); + +if (!gm) { +request_module ("rpc-auth-gss-%u" , pseudoflavor); + gm =_gss_mech_get_by_pseudoflavor (pseudoflavor); + } +return gm; +} +EXPORT_SYMBOL_GPL (gss_mech_get_by_pseudoflavor);int gss_mech_list_pseudoflavors (rpc_authflavor_t *array_ptr)
By the way:
Quoted 5 lines · J. Bruce Fields
net/sunrpc/auth_gss/gss_krb5_mech.c +0
-0
net/sunrpc/auth_gss/gss_krb5_mech.c static struct pf_desc gss_kerberos_pfs[] = { · line 751
Quoted 9 lines
net/sunrpc/auth_gss/gss_krb5_mech.c +6
-0@@ -743,6 +743,13 @@ static struct pf_desc gss_kerberos_pfs[] = { }, }; +MODULE_ALIAS ("rpc-auth-gss-krb5" ); +MODULE_ALIAS ("rpc-auth-gss-krb5i" ); +MODULE_ALIAS ("rpc-auth-gss-krb5p" ); +MODULE_ALIAS ("rpc-auth-gss-390003" ); +MODULE_ALIAS ("rpc-auth-gss-390004" ); +MODULE_ALIAS ("rpc-auth-gss-390005" );
Is there any reason we don't do this for the auth modules, and the pnfs layout modules? Seems silly to wait for distro's to add it to modprobe.conf if we don't need to.
--b.
Quoted 11 lines · J. Bruce Fields
By the way:
Quoted 8 lines · J. Bruce Fields
net/sunrpc/auth_gss/gss_krb5_mech.c +0
-0@@ -743,6 +743,13 @@ static struct pf_desc gss_kerberos_pfs[] = { }, };
Quoted 11 lines
net/sunrpc/auth_gss/gss_krb5_mech.c static struct pf_desc gss_kerberos_pfs[] = { · line 751
Quoted 6 lines
net/sunrpc/auth_gss/gss_krb5_mech.c +6
-0+MODULE_ALIAS ("rpc-auth-gss-krb5" ); +MODULE_ALIAS ("rpc-auth-gss-krb5i" ); +MODULE_ALIAS ("rpc-auth-gss-krb5p" ); +MODULE_ALIAS ("rpc-auth-gss-390003" ); +MODULE_ALIAS ("rpc-auth-gss-390004" ); +MODULE_ALIAS ("rpc-auth-gss-390005" );Is there any reason we don't do this for the auth modules, and the pnfs layout modules? Seems silly to wait for distro's to add it to modprobe.conf if we don't need to.
I recall a discussion at connectaton 2010, where Peter Staubach from RedHat ( at that time )
requested a way to disable pNFS without rebuilding the kernel.
Probably that's why autoload is not implemented.
Regards,
Tigran.
Quoted 6 lines
--b.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 24 lines · Tigran Mkrtchyan
Quoted 11 lines · J. Bruce Fields
By the way:
Quoted 8 lines · J. Bruce Fields
net/sunrpc/auth_gss/gss_krb5_mech.c +0
-0@@ -743,6 +743,13 @@ static struct pf_desc gss_kerberos_pfs[] = { }, };Quoted 11 lines
net/sunrpc/auth_gss/gss_krb5_mech.c static struct pf_desc gss_kerberos_pfs[] = { · line 751
Quoted 6 lines
net/sunrpc/auth_gss/gss_krb5_mech.c +6
-0+MODULE_ALIAS ("rpc-auth-gss-krb5" ); +MODULE_ALIAS ("rpc-auth-gss-krb5i" ); +MODULE_ALIAS ("rpc-auth-gss-krb5p" ); +MODULE_ALIAS ("rpc-auth-gss-390003" ); +MODULE_ALIAS ("rpc-auth-gss-390004" ); +MODULE_ALIAS ("rpc-auth-gss-390005" );Is there any reason we don't do this for the auth modules, and the pnfs layout modules? Seems silly to wait for distro's to add it to modprobe.conf if we don't need to.
Quoted 5 lines
I recall a discussion at connectaton 2010, where Peter Staubach from RedHat ( at that time )
requested a way to disable pNFS without rebuilding the kernel.Probably that's why autoload is not implemented.
Well, autoload *is* implemented, you just have to add an alias command to modprobe.conf before it'll work.
And if we embed the alias in the module instead, it will still be possible to disable autloading by adding a "backlist <modulename>" to modproble.conf.
So I don't *think* that's the issue, unless I've missed something.
--b.
Quoted 7 lines · J. Bruce Fields
Quoted 5 lines · Tigran Mkrtchyan
I recall a discussion at connectaton 2010, where Peter Staubach from RedHat ( at that time )
requested a way to disable pNFS without rebuilding the kernel.Probably that's why autoload is not implemented.
Quoted 8 lines
Well, autoload *is* implemented, you just have to add an alias command to modprobe.conf before it'll work.
And if we embed the alias in the module instead, it will still be possible to disable autloading by adding a "backlist <modulename>" to modproble.conf.
So I don't *think* that's the issue, unless I've missed something.
So can we just do this? (Untested.)
--b.
commit 8b3065071b5469c428d70052c80f1df3cb398da6
Author: J. Bruce Fields <[email protected]> Date: Thu Jun 23 16:15:39 2011 -0400
pnfs: simplify pnfs files module autoloading
Embed the necessary alias into the module rather than waiting for someone to add it to /etc/modprobe.conf
fs/nfs/nfs4filelayout.c +2 -0
@@ -896,5 +896,7 @@ static void __exit nfs4filelayout_exit(void)pnfs_unregister_layoutdriver (&filelayout_type); } +MODULE_ALIAS ("nfs-layouttype4-1" ); +module_init (nfs4filelayout_init);module_exit (nfs4filelayout_exit);
Quoted 37 lines · J. Bruce Fields
Quoted 7 lines · J. Bruce Fields
Quoted 5 lines · Tigran Mkrtchyan
I recall a discussion at connectaton 2010, where Peter Staubach from RedHat ( at that time )
requested a way to disable pNFS without rebuilding the kernel.Probably that's why autoload is not implemented.
Quoted 8 lines
Well, autoload *is* implemented, you just have to add an alias command to modprobe.conf before it'll work.
And if we embed the alias in the module instead, it will still be possible to disable autloading by adding a "backlist <modulename>" to modproble.conf.
So I don't *think* that's the issue, unless I've missed something.
So can we just do this? (Untested.)
--b.
commit
8b3065071b5469c428d70052c80f1df3cb398da6Author: J. Bruce Fields <[email protected]> Date: Thu Jun 23 16:15:39 2011 -0400pnfs: simplify pnfs files module autoloading
Embed the necessary alias into the module rather than waiting for someone to add it to
/etc/modprobe.confSigned-off-by J. Bruce Fields <[email protected]>fs/nfs/nfs4filelayout.c +0
-0
fs/nfs/nfs4filelayout.c static void __exit nfs4filelayout_exit(void) · line 902
Quoted 7 lines
fs/nfs/nfs4filelayout.c +2
-0@@ -896,5 +896,7 @@ static void __exit nfs4filelayout_exit(void)pnfs_unregister_layoutdriver (&filelayout_type); } +MODULE_ALIAS ("nfs-layouttype4-1" ); +module_init (nfs4filelayout_init);module_exit (nfs4filelayout_exit);
fs/nfs/objlayout/objio_osd.c +2 -0
@@ -1065,5 +1065,7 @@ objlayout_exit(void) __func__); } +MODULE_ALIAS ("nfs-layouttype4-2" ); +module_init (objlayout_init);module_exit (objlayout_exit);
---
nfs-layouttype4-1
nfs-layouttype4-2
...
Can we use a name here or it must be the number?
Thanks
Boaz
Quoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 59 lines · Boaz Harrosh
Quoted 44 lines · J. Bruce Fields
Quoted 7 lines · J. Bruce Fields
Quoted 5 lines · Tigran Mkrtchyan
I recall a discussion at connectaton 2010, where Peter Staubach from RedHat ( at that time )
requested a way to disable pNFS without rebuilding the kernel.Probably that's why autoload is not implemented.
Quoted 8 lines
Well, autoload *is* implemented, you just have to add an alias command to modprobe.conf before it'll work.
And if we embed the alias in the module instead, it will still be possible to disable autloading by adding a "backlist <modulename>" to modproble.conf.
So I don't *think* that's the issue, unless I've missed something.
So can we just do this? (Untested.)
--b.
commit
8b3065071b5469c428d70052c80f1df3cb398da6Author: J. Bruce Fields <[email protected]> Date: Thu Jun 23 16:15:39 2011 -0400pnfs: simplify pnfs files module autoloading
Embed the necessary alias into the module rather than waiting for someone to add it to
/etc/modprobe.confSigned-off-by J. Bruce Fields <[email protected]>fs/nfs/nfs4filelayout.c +2
-0@@ -896,5 +896,7 @@ static void __exit nfs4filelayout_exit(void)pnfs_unregister_layoutdriver (&filelayout_type); } +MODULE_ALIAS ("nfs-layouttype4-1" ); +module_init (nfs4filelayout_init);module_exit (nfs4filelayout_exit);fs/nfs/objlayout/objio_osd.c +2
-1@@ -1065,5 +1065,7 @@ objlayout_exit(void) __func__); } +MODULE_ALIAS ("nfs-layouttype4-2" ); +module_init (objlayout_init);module_exit (objlayout_exit); ---
Quoted 5 lines
nfs-layouttype4-1
nfs-layouttype4-2
...Can we use a name here or it must be the number?
Looks like it needs a number; see the request_module() call in set_pnfs_layoutdriver:
request_module("%s-%u", LAYOUT_NFSV4_1_MODULE_PREFIX, id);--b.
Quoted 64 lines · J. Bruce Fields
Quoted 63 lines · Boaz Harrosh
Quoted 44 lines · J. Bruce Fields
Quoted 7 lines · J. Bruce Fields
Quoted 5 lines · Tigran Mkrtchyan
I recall a discussion at connectaton 2010, where Peter Staubach from RedHat ( at that time )
requested a way to disable pNFS without rebuilding the kernel.Probably that's why autoload is not implemented.
Quoted 8 lines
Well, autoload *is* implemented, you just have to add an alias command to modprobe.conf before it'll work.
And if we embed the alias in the module instead, it will still be possible to disable autloading by adding a "backlist <modulename>" to modproble.conf.
So I don't *think* that's the issue, unless I've missed something.
So can we just do this? (Untested.)
--b.
commit
8b3065071b5469c428d70052c80f1df3cb398da6Author: J. Bruce Fields <[email protected]> Date: Thu Jun 23 16:15:39 2011 -0400pnfs: simplify pnfs files module autoloading
Embed the necessary alias into the module rather than waiting for someone to add it to
/etc/modprobe.confSigned-off-by J. Bruce Fields <[email protected]>fs/nfs/nfs4filelayout.c +2
-0@@ -896,5 +896,7 @@ static void __exit nfs4filelayout_exit(void)pnfs_unregister_layoutdriver (&filelayout_type); } +MODULE_ALIAS ("nfs-layouttype4-1" ); +module_init (nfs4filelayout_init);module_exit (nfs4filelayout_exit);fs/nfs/objlayout/objio_osd.c +2
-1@@ -1065,5 +1065,7 @@ objlayout_exit(void) __func__); } +MODULE_ALIAS ("nfs-layouttype4-2" ); +module_init (objlayout_init);module_exit (objlayout_exit); ---nfs-layouttype4-1
nfs-layouttype4-2
...
Quoted 6 lines
Quoted 1 line
Can we use a name here or it must be the number?
Looks like it needs a number; see the
request_module()call inset_pnfs_layoutdriver:request_module("%s-%u", LAYOUT_NFSV4_1_MODULE_PREFIX, id);
The title of the thread is "autoload rpcsec_gss_krb5", but the above patch only deals with layouts.
Now I'm all confused...
Signature · 6 lines
Trond Myklebust Linux NFS client maintainer NetApp [email protected] www.netapp.com
Quoted 70 lines · Trond Myklebust
Quoted 69 lines · J. Bruce Fields
Quoted 59 lines · Boaz Harrosh
Quoted 44 lines · J. Bruce Fields
Quoted 7 lines · J. Bruce Fields
Quoted 5 lines · Tigran Mkrtchyan
I recall a discussion at connectaton 2010, where Peter Staubach from RedHat ( at that time )
requested a way to disable pNFS without rebuilding the kernel.Probably that's why autoload is not implemented.
Quoted 8 lines
Well, autoload *is* implemented, you just have to add an alias command to modprobe.conf before it'll work.
And if we embed the alias in the module instead, it will still be possible to disable autloading by adding a "backlist <modulename>" to modproble.conf.
So I don't *think* that's the issue, unless I've missed something.
So can we just do this? (Untested.)
--b.
commit
8b3065071b5469c428d70052c80f1df3cb398da6Author: J. Bruce Fields <[email protected]> Date: Thu Jun 23 16:15:39 2011 -0400pnfs: simplify pnfs files module autoloading
Embed the necessary alias into the module rather than waiting for someone to add it to
/etc/modprobe.confSigned-off-by J. Bruce Fields <[email protected]>fs/nfs/nfs4filelayout.c +2
-0@@ -896,5 +896,7 @@ static void __exit nfs4filelayout_exit(void)pnfs_unregister_layoutdriver (&filelayout_type); } +MODULE_ALIAS ("nfs-layouttype4-1" ); +module_init (nfs4filelayout_init);module_exit (nfs4filelayout_exit);fs/nfs/objlayout/objio_osd.c +2
-1@@ -1065,5 +1065,7 @@ objlayout_exit(void) __func__); } +MODULE_ALIAS ("nfs-layouttype4-2" ); +module_init (objlayout_init);module_exit (objlayout_exit); ---Quoted 5 lines
nfs-layouttype4-1
nfs-layouttype4-2
...Can we use a name here or it must be the number?
Looks like it needs a number; see the
request_module()call inset_pnfs_layoutdriver:
Quoted 6 lines
Quoted 1 line
request_module("%s-%u", LAYOUT_NFSV4_1_MODULE_PREFIX, id);The title of the thread is "autoload
rpcsec_gss_krb5", but the above patch only deals with layouts.Now I'm all confused...
Topic drift, sorry; original patch, which I'll commit to my tree absent objections:
http://marc.info/?l=linux-nfs&m=130877833918632&w=2
--b.