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


Groups > linux.kernel > #1288616

Re: [PATCH 2/2] security/integrity: make ima/ima_mok.c explicitly non-modular

From Mimi Zohar <zohar@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] security/integrity: make ima/ima_mok.c explicitly non-modular
Date 2015-12-10 16:50 +0100
Message-ID <qEbDI-87n-21@gated-at.bofh.it> (permalink)
References <qDVyW-5YD-17@gated-at.bofh.it> <qDVIC-621-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, 2015-12-09 at 17:37 -0500, Paul Gortmaker wrote:
> The Kconfig currently controlling compilation of this code is:
> 
> ima/Kconfig:config IMA_MOK_KEYRING
> ima/Kconfig: bool "Create IMA machine owner keys (MOK) and blacklist keyrings"
> 
> ...meaning that it currently is not being built as a module by anyone.
> 
> Lets remove the couple of traces of modularity so that when reading the
> driver there is no doubt it really is builtin-only.
> 
> Since module_init translates to device_initcall in the non-modular
> case, the init ordering remains unchanged with this commit.
> 
> Cc: Mimi Zohar <zohar@linux.vnet.ibm.com>
> Cc: Dmitry Kasatkin <dmitry.kasatkin@gmail.com>
> Cc: James Morris <james.l.morris@oracle.com>
> Cc: "Serge E. Hallyn" <serge@hallyn.com>
> Cc: linux-ima-devel@lists.sourceforge.net
> Cc: linux-ima-user@lists.sourceforge.net
> Cc: linux-security-module@vger.kernel.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

Thanks, this patch is queued to be upstreamed with the original ima_mok
keyring patch.

Mimi

> ---
>  security/integrity/ima/ima_mok.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/security/integrity/ima/ima_mok.c b/security/integrity/ima/ima_mok.c
> index 8dad9a2b8e47..676885e4320e 100644
> --- a/security/integrity/ima/ima_mok.c
> +++ b/security/integrity/ima/ima_mok.c
> @@ -16,7 +16,7 @@
>  #include <linux/sched.h>
>  #include <linux/cred.h>
>  #include <linux/err.h>
> -#include <linux/module.h>
> +#include <linux/init.h>
>  #include <keys/asymmetric-type.h>
> 
> 
> @@ -52,5 +52,4 @@ __init int ima_mok_init(void)
>  	set_bit(KEY_FLAG_KEEP, &ima_blacklist_keyring->flags);
>  	return 0;
>  }
> -
> -module_init(ima_mok_init);
> +device_initcall(ima_mok_init);


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