eCryptfs: export key type
Subsystems (2)
PATCH 2/3 eCryptfs: export key type
This is the second in a series of three patches for the eCryptfs kernel module.
The key_type_user symbol in user_defined.c needs to be exported.
Signature · 1 line
Phillip Hellewell <phillip AT hellewell.homeip.net>
security/keys/user_defined.c +2 -0
@@ -48,6 +48,8 @@char data[0 ];/* actual data */ }; +EXPORT_SYMBOL ( key_type_user ); +/*****************************************************************************/ /* * instantiate a user defined key
Quoted 6 lines · Phillip Hellewell
This is the second in a series of three patches for the eCryptfs kernel module.
The
key_type_usersymbol inuser_defined.cneeds to be exported.
...
+EXPORT_SYMBOL(key_type_user);
This is the only modification necessary to support eCryptfs. While we are working on getting it ready for merging into the mainline kernel, we would like to distribute it as a separate kernel module, and we would like for users or distro's do not need to modify their kernels to build and run it.
Would there be any objections to exporting the key_type_user symbol? Is there any general reason why kernel modules should not have access to the user key type struct?
Mike
David Howells
maintainerQuoted 3 lines · Michael Halcrow
Quoted 1 line
+EXPORT_SYMBOL(
key_type_user);This is the only modification necessary to support eCryptfs.
Unfortunately, that might have to be EXPORT_SYMBOL_GPL() nowadays since I reimplemented the predefined keyring types of user and keyring using RCU.
Quoted 4 lines
While we are working on getting it ready for merging into the mainline kernel, we would like to distribute it as a separate kernel module, and we would like for users or distro's do not need to modify their kernels to build and run it.
"It" being?
Quoted 3 lines
Would there be any objections to exporting the
key_type_usersymbol? Is there any general reason why kernel modules should not have access to the user key type struct?
No and no, but see above. You could also export the user defined key type ops and define your own key type using them.
David
Re: [PATCH 2/3, 2.6.12-rc5-mm1] eCryptfs: export user key type
Quoted 8 lines · David Howells
Quoted 3 lines · Michael Halcrow
Quoted 1 line
+EXPORT_SYMBOL(
key_type_user);This is the only modification necessary to support eCryptfs.
Unfortunately, that might have to be
EXPORT_SYMBOL_GPL()nowadays since I reimplemented the predefined keyring types of user and keyring using RCU.
Noted; new patch included below.
Quoted 6 lines
Quoted 4 lines
While we are working on getting it ready for merging into the mainline kernel, we would like to distribute it as a separate kernel module, and we would like for users or distro's do not need to modify their kernels to build and run it.
"It" being?
eCryptfs.
Quoted 6 lines
Quoted 3 lines
Would there be any objections to exporting the
key_type_usersymbol? Is there any general reason why kernel modules should not have access to the user key type struct?No and no, but see above. You could also export the user defined key type ops and define your own key type using them.
I can imagine scenarios where new kernel modules make use some universal key type (i.e., without userspace apps having to be aware of a special keytype). The ``user'' key type seems like a good candidate for that.
Signed off by: Michael Halcrow <[email protected]>
security/keys/user_defined.c +2 -0
@@ -48,6 +48,8 @@char data[0 ];/* actual data */ }; +EXPORT_SYMBOL_GPL (key_type_user); +/*****************************************************************************/ /* * instantiate a user defined key
David Howells
maintainerRe: [PATCH 2/3, 2.6.12-rc5-mm1] eCryptfs: export user key type
Quoted 1 line · Michael Halcrow
Signed off by: Michael Halcrow <[email protected]>
There need to be two more changes. The prototype needs declaring in a header file and Documentation/keys.txt needs updating.
David