Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1287953

[PATCH 1/2] security/keys: make big_key.c explicitly non-modular

From Paul Gortmaker <paul.gortmaker@windriver.com>
Newsgroups linux.kernel
Subject [PATCH 1/2] security/keys: make big_key.c explicitly non-modular
Date 2015-12-09 23:50 +0100
Message-ID <qDVIC-621-15@gated-at.bofh.it> (permalink)
References <qDVyW-5YD-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


The Kconfig currently controlling compilation of this code is:

config BIG_KEYS
        bool "Large payload keys"

...meaning that it currently is not being built as a module by anyone.

Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.

Since module_init translates to device_initcall in the non-modular
case, the init ordering remains unchanged with this commit.

We also delete the MODULE_LICENSE tag since all that information
is already contained at the top of the file in the comments.

Cc: David Howells <dhowells@redhat.com>
Cc: James Morris <james.l.morris@oracle.com>
Cc: "Serge E. Hallyn" <serge@hallyn.com>
Cc: keyrings@linux-nfs.org
Cc: linux-security-module@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 security/keys/big_key.c | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/security/keys/big_key.c b/security/keys/big_key.c
index 907c1522ee46..c721e398893a 100644
--- a/security/keys/big_key.c
+++ b/security/keys/big_key.c
@@ -9,7 +9,6 @@
  * 2 of the Licence, or (at your option) any later version.
  */
 
-#include <linux/module.h>
 #include <linux/init.h>
 #include <linux/seq_file.h>
 #include <linux/file.h>
@@ -18,8 +17,6 @@
 #include <keys/user-type.h>
 #include <keys/big_key-type.h>
 
-MODULE_LICENSE("GPL");
-
 /*
  * Layout of key payload words.
  */
@@ -212,18 +209,8 @@ long big_key_read(const struct key *key, char __user *buffer, size_t buflen)
 	return ret;
 }
 
-/*
- * Module stuff
- */
 static int __init big_key_init(void)
 {
 	return register_key_type(&key_type_big_key);
 }
-
-static void __exit big_key_cleanup(void)
-{
-	unregister_key_type(&key_type_big_key);
-}
-
-module_init(big_key_init);
-module_exit(big_key_cleanup);
+device_initcall(big_key_init);
-- 
2.6.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] security: clarify that some code is really non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2015-12-09 23:40 +0100
  [PATCH 2/2] security/integrity: make ima/ima_mok.c explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2015-12-09 23:50 +0100
    Re: [PATCH 2/2] security/integrity: make ima/ima_mok.c explicitly  non-modular Mimi Zohar <zohar@linux.vnet.ibm.com> - 2015-12-10 16:50 +0100
  [PATCH 1/2] security/keys: make big_key.c explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2015-12-09 23:50 +0100
  Re: [PATCH 0/2] security: clarify that some code is really non-modular David Howells <dhowells@redhat.com> - 2015-12-10 16:10 +0100

csiph-web