* [PATCH] LSM: SafeSetID: Mark safesetid_initialized as __initdata
@ 2021-06-08 23:09 Austin Kim
2021-06-10 16:50 ` Micah Morton
0 siblings, 1 reply; 3+ messages in thread
From: Austin Kim @ 2021-06-08 23:09 UTC (permalink / raw)
To: mortonm, jmorris, serge
Cc: linux-security-module, linux-kernel, austindh.kim, austin.kim
Mark safesetid_initialized as __initdata since it is only used
in initialization routine.
Signed-off-by: Austin Kim <austindh.kim@gmail.com>
---
security/safesetid/lsm.c | 2 +-
security/safesetid/lsm.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/security/safesetid/lsm.c b/security/safesetid/lsm.c
index 1079c6d54784..963f4ad9cb66 100644
--- a/security/safesetid/lsm.c
+++ b/security/safesetid/lsm.c
@@ -22,7 +22,7 @@
#include "lsm.h"
/* Flag indicating whether initialization completed */
-int safesetid_initialized;
+int safesetid_initialized __initdata;
struct setid_ruleset __rcu *safesetid_setuid_rules;
struct setid_ruleset __rcu *safesetid_setgid_rules;
diff --git a/security/safesetid/lsm.h b/security/safesetid/lsm.h
index bde8c43a3767..d346f4849cea 100644
--- a/security/safesetid/lsm.h
+++ b/security/safesetid/lsm.h
@@ -19,7 +19,7 @@
#include <linux/hashtable.h>
/* Flag indicating whether initialization completed */
-extern int safesetid_initialized;
+extern int safesetid_initialized __initdata;
enum sid_policy_type {
SIDPOL_DEFAULT, /* source ID is unaffected by policy */
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] LSM: SafeSetID: Mark safesetid_initialized as __initdata
2021-06-08 23:09 [PATCH] LSM: SafeSetID: Mark safesetid_initialized as __initdata Austin Kim
@ 2021-06-10 16:50 ` Micah Morton
2021-06-10 22:33 ` Austin Kim
0 siblings, 1 reply; 3+ messages in thread
From: Micah Morton @ 2021-06-10 16:50 UTC (permalink / raw)
To: Austin Kim
Cc: James Morris, Serge E. Hallyn, linux-security-module,
Linux Kernel Mailing List, austin.kim
Thanks for the patch. Looks right, since that variable is only used in
safesetid_security_init() and safesetid_init_securityfs(), which are
both marked __init. I can merge it to the safesetid-next branch today
and send the patch through my tree during the 5.14 merge window.
On Tue, Jun 8, 2021 at 1:09 PM Austin Kim <austindh.kim@gmail.com> wrote:
>
> Mark safesetid_initialized as __initdata since it is only used
> in initialization routine.
>
> Signed-off-by: Austin Kim <austindh.kim@gmail.com>
> ---
> security/safesetid/lsm.c | 2 +-
> security/safesetid/lsm.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/security/safesetid/lsm.c b/security/safesetid/lsm.c
> index 1079c6d54784..963f4ad9cb66 100644
> --- a/security/safesetid/lsm.c
> +++ b/security/safesetid/lsm.c
> @@ -22,7 +22,7 @@
> #include "lsm.h"
>
> /* Flag indicating whether initialization completed */
> -int safesetid_initialized;
> +int safesetid_initialized __initdata;
>
> struct setid_ruleset __rcu *safesetid_setuid_rules;
> struct setid_ruleset __rcu *safesetid_setgid_rules;
> diff --git a/security/safesetid/lsm.h b/security/safesetid/lsm.h
> index bde8c43a3767..d346f4849cea 100644
> --- a/security/safesetid/lsm.h
> +++ b/security/safesetid/lsm.h
> @@ -19,7 +19,7 @@
> #include <linux/hashtable.h>
>
> /* Flag indicating whether initialization completed */
> -extern int safesetid_initialized;
> +extern int safesetid_initialized __initdata;
>
> enum sid_policy_type {
> SIDPOL_DEFAULT, /* source ID is unaffected by policy */
> --
> 2.20.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] LSM: SafeSetID: Mark safesetid_initialized as __initdata
2021-06-10 16:50 ` Micah Morton
@ 2021-06-10 22:33 ` Austin Kim
0 siblings, 0 replies; 3+ messages in thread
From: Austin Kim @ 2021-06-10 22:33 UTC (permalink / raw)
To: Micah Morton
Cc: James Morris, Serge E. Hallyn, linux-security-module,
Linux Kernel Mailing List, 김동현
2021년 6월 11일 (금) 오전 1:50, Micah Morton <mortonm@chromium.org>님이 작성:
>
> Thanks for the patch. Looks right, since that variable is only used in
> safesetid_security_init() and safesetid_init_securityfs(), which are
> both marked __init. I can merge it to the safesetid-next branch today
> and send the patch through my tree during the 5.14 merge window.
Great. Thanks!
>
> On Tue, Jun 8, 2021 at 1:09 PM Austin Kim <austindh.kim@gmail.com> wrote:
> >
> > Mark safesetid_initialized as __initdata since it is only used
> > in initialization routine.
> >
> > Signed-off-by: Austin Kim <austindh.kim@gmail.com>
> > ---
> > security/safesetid/lsm.c | 2 +-
> > security/safesetid/lsm.h | 2 +-
> > 2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/security/safesetid/lsm.c b/security/safesetid/lsm.c
> > index 1079c6d54784..963f4ad9cb66 100644
> > --- a/security/safesetid/lsm.c
> > +++ b/security/safesetid/lsm.c
> > @@ -22,7 +22,7 @@
> > #include "lsm.h"
> >
> > /* Flag indicating whether initialization completed */
> > -int safesetid_initialized;
> > +int safesetid_initialized __initdata;
> >
> > struct setid_ruleset __rcu *safesetid_setuid_rules;
> > struct setid_ruleset __rcu *safesetid_setgid_rules;
> > diff --git a/security/safesetid/lsm.h b/security/safesetid/lsm.h
> > index bde8c43a3767..d346f4849cea 100644
> > --- a/security/safesetid/lsm.h
> > +++ b/security/safesetid/lsm.h
> > @@ -19,7 +19,7 @@
> > #include <linux/hashtable.h>
> >
> > /* Flag indicating whether initialization completed */
> > -extern int safesetid_initialized;
> > +extern int safesetid_initialized __initdata;
> >
> > enum sid_policy_type {
> > SIDPOL_DEFAULT, /* source ID is unaffected by policy */
> > --
> > 2.20.1
> >
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-10 22:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-08 23:09 [PATCH] LSM: SafeSetID: Mark safesetid_initialized as __initdata Austin Kim
2021-06-10 16:50 ` Micah Morton
2021-06-10 22:33 ` Austin Kim
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.