Skip to contentSkip to conversation

eCryptfs: export key type

PATCH In review Phillip Hellewell 3 participants 5 messages Jun 2, 2005 – Jun 7, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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
diff -Naur linux-2.6.12-rc4-mm2/security/keys/user_defined.c linux-2.6.12-rc4-mm2-ecryptfs/security/keys/user_defined.c
@@ -48,6 +48,8 @@
 	char		data[0];	/* actual data */
 };
 
+EXPORT_SYMBOL( key_type_user );
+
 /*****************************************************************************/
 /*
  * instantiate a user defined key
#1 lore raw
Quoted 6 lines · Phillip Hellewell

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.
...
+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

maintainer
#2 lore raw
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.

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_user symbol? 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

#3 lore raw

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_user symbol? 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
maintainer
#4 lore raw

Re: [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