[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bec8663b-ef33-769d-fe7f-10fb1a6eda35@canonical.com>
Date: Mon, 1 Oct 2018 14:12:17 -0700
From: John Johansen <john.johansen@...onical.com>
To: Kees Cook <keescook@...omium.org>, James Morris <jmorris@...ei.org>
Cc: "Serge E. Hallyn" <serge@...lyn.com>,
Paul Moore <paul@...l-moore.com>,
Stephen Smalley <sds@...ho.nsa.gov>,
Casey Schaufler <casey@...aufler-ca.com>,
Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
Mimi Zohar <zohar@...ux.vnet.ibm.com>,
linux-security-module@...r.kernel.org, selinux@...ho.nsa.gov,
"Schaufler, Casey" <casey.schaufler@...el.com>,
Jonathan Corbet <corbet@....net>, linux-doc@...r.kernel.org,
linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH security-next v3 07/29] LSM: Convert security_initcall()
into DEFINE_LSM()
On 09/24/2018 05:18 PM, Kees Cook wrote:
> Instead of using argument-based initializers, switch to defining the
> contents of struct lsm_info on a per-LSM basis. This also drops
> the final use of the now inaccurate "initcall" naming.
>
> Cc: John Johansen <john.johansen@...onical.com>
> Cc: James Morris <jmorris@...ei.org>
> Cc: "Serge E. Hallyn" <serge@...lyn.com>
> Cc: Paul Moore <paul@...l-moore.com>
> Cc: Stephen Smalley <sds@...ho.nsa.gov>
> Cc: Casey Schaufler <casey@...aufler-ca.com>
> Cc: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
> Cc: Mimi Zohar <zohar@...ux.vnet.ibm.com>
> Cc: linux-security-module@...r.kernel.org
> Cc: selinux@...ho.nsa.gov
> Signed-off-by: Kees Cook <keescook@...omium.org>
> ---
> include/linux/lsm_hooks.h | 6 ++++--
> security/apparmor/lsm.c | 4 +++-
> security/integrity/iint.c | 4 +++-
> security/selinux/hooks.c | 4 +++-
> security/smack/smack_lsm.c | 4 +++-
> security/tomoyo/tomoyo.c | 4 +++-
> 6 files changed, 19 insertions(+), 7 deletions(-)
>
> diff --git a/include/linux/lsm_hooks.h b/include/linux/lsm_hooks.h
> index ad04761e5587..02ec717189f9 100644
> --- a/include/linux/lsm_hooks.h
> +++ b/include/linux/lsm_hooks.h
> @@ -2045,11 +2045,13 @@ struct lsm_info {
>
> extern struct lsm_info __start_lsm_info[], __end_lsm_info[];
>
> -#define security_initcall(lsm) \
> +#define DEFINE_LSM(lsm) \
> static struct lsm_info __lsm_##lsm \
> __used __section(.lsm_info.init) \
> __aligned(sizeof(unsigned long)) \
> - = { .init = lsm, }
> + = { \
> +
> +#define END_LSM }
>
I am with Tetsuo on this one, I really don't like the END_LSM thing.
Powered by blists - more mailing lists