linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: Mark arch_get_ima_policy() and is_ppc_trustedboot_enabled() as __init
@ 2022-04-07 14:15 Michael Ellerman
  2022-04-08 16:05 ` Mimi Zohar
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Ellerman @ 2022-04-07 14:15 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: nayna, zohar, dja

We can mark arch_get_ima_policy() as __init because it's only caller
ima_init_arch_policy() is __init. We can then mark
is_ppc_trustedboot_enabled() __init because its only caller is
arch_get_ima_policy().

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/kernel/ima_arch.c    | 2 +-
 arch/powerpc/kernel/secure_boot.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/ima_arch.c b/arch/powerpc/kernel/ima_arch.c
index 957abd592075..accd228ddc3d 100644
--- a/arch/powerpc/kernel/ima_arch.c
+++ b/arch/powerpc/kernel/ima_arch.c
@@ -60,7 +60,7 @@ static const char *const secure_and_trusted_rules[] = {
  * Returns the relevant IMA arch-specific policies based on the system secure
  * boot state.
  */
-const char *const *arch_get_ima_policy(void)
+const char *const * __init arch_get_ima_policy(void)
 {
 	if (is_ppc_secureboot_enabled()) {
 		if (IS_ENABLED(CONFIG_MODULE_SIG))
diff --git a/arch/powerpc/kernel/secure_boot.c b/arch/powerpc/kernel/secure_boot.c
index f9af305d9579..0adf0f61d3b2 100644
--- a/arch/powerpc/kernel/secure_boot.c
+++ b/arch/powerpc/kernel/secure_boot.c
@@ -41,7 +41,7 @@ bool is_ppc_secureboot_enabled(void)
 	return enabled;
 }
 
-bool is_ppc_trustedboot_enabled(void)
+bool __init is_ppc_trustedboot_enabled(void)
 {
 	struct device_node *node;
 	bool enabled = false;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] powerpc: Mark arch_get_ima_policy() and is_ppc_trustedboot_enabled() as __init
  2022-04-07 14:15 [PATCH] powerpc: Mark arch_get_ima_policy() and is_ppc_trustedboot_enabled() as __init Michael Ellerman
@ 2022-04-08 16:05 ` Mimi Zohar
  2022-04-08 17:31   ` Mimi Zohar
  2022-04-09 13:03   ` Michael Ellerman
  0 siblings, 2 replies; 6+ messages in thread
From: Mimi Zohar @ 2022-04-08 16:05 UTC (permalink / raw)
  To: Michael Ellerman, linuxppc-dev; +Cc: nayna, dja

On Fri, 2022-04-08 at 00:15 +1000, Michael Ellerman wrote:
> We can mark arch_get_ima_policy() as __init because it's only caller
> ima_init_arch_policy() is __init. We can then mark
> is_ppc_trustedboot_enabled() __init because its only caller is
> arch_get_ima_policy().
> 
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

I assume you want to upstream this via power,

    Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>

thanks,

Mimi


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] powerpc: Mark arch_get_ima_policy() and is_ppc_trustedboot_enabled() as __init
  2022-04-08 16:05 ` Mimi Zohar
@ 2022-04-08 17:31   ` Mimi Zohar
  2022-04-08 17:46     ` Mimi Zohar
  2022-04-09 13:03   ` Michael Ellerman
  1 sibling, 1 reply; 6+ messages in thread
From: Mimi Zohar @ 2022-04-08 17:31 UTC (permalink / raw)
  To: Michael Ellerman, linuxppc-dev; +Cc: nayna, dja

On Fri, 2022-04-08 at 12:05 -0400, Mimi Zohar wrote:
> On Fri, 2022-04-08 at 00:15 +1000, Michael Ellerman wrote:
> > We can mark arch_get_ima_policy() as __init because it's only caller
> > ima_init_arch_policy() is __init. We can then mark
> > is_ppc_trustedboot_enabled() __init because its only caller is
> > arch_get_ima_policy().
> > 
> > Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> 
> I assume you want to upstream this via power,
> 
>     Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>

Sorry, I just noticed that is_ppc_trustedboot_enabled() is also called
by arch_ima_get_secureboot().

Mimi


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] powerpc: Mark arch_get_ima_policy() and is_ppc_trustedboot_enabled() as __init
  2022-04-08 17:31   ` Mimi Zohar
@ 2022-04-08 17:46     ` Mimi Zohar
  2022-04-09 13:04       ` Michael Ellerman
  0 siblings, 1 reply; 6+ messages in thread
From: Mimi Zohar @ 2022-04-08 17:46 UTC (permalink / raw)
  To: Michael Ellerman, linuxppc-dev; +Cc: nayna, dja

On Fri, 2022-04-08 at 13:31 -0400, Mimi Zohar wrote:
> On Fri, 2022-04-08 at 12:05 -0400, Mimi Zohar wrote:
> > On Fri, 2022-04-08 at 00:15 +1000, Michael Ellerman wrote:
> > > We can mark arch_get_ima_policy() as __init because it's only caller
> > > ima_init_arch_policy() is __init. We can then mark
> > > is_ppc_trustedboot_enabled() __init because its only caller is
> > > arch_get_ima_policy().
> > > 
> > > Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> > 
> > I assume you want to upstream this via power,
> > 
> >     Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>
> 
> Sorry, I just noticed that is_ppc_trustedboot_enabled() is also called
> by arch_ima_get_secureboot().

Never mind, arch_ima_get_secureboot() calls
is_ppc_secureboot_enabled(), not is_ppc_trustedboot_enabled().



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] powerpc: Mark arch_get_ima_policy() and is_ppc_trustedboot_enabled() as __init
  2022-04-08 16:05 ` Mimi Zohar
  2022-04-08 17:31   ` Mimi Zohar
@ 2022-04-09 13:03   ` Michael Ellerman
  1 sibling, 0 replies; 6+ messages in thread
From: Michael Ellerman @ 2022-04-09 13:03 UTC (permalink / raw)
  To: Mimi Zohar, linuxppc-dev; +Cc: nayna, dja

Mimi Zohar <zohar@linux.ibm.com> writes:
> On Fri, 2022-04-08 at 00:15 +1000, Michael Ellerman wrote:
>> We can mark arch_get_ima_policy() as __init because it's only caller
>> ima_init_arch_policy() is __init. We can then mark
>> is_ppc_trustedboot_enabled() __init because its only caller is
>> arch_get_ima_policy().
>> 
>> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
>
> I assume you want to upstream this via power,
>
>     Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>

Yep, thanks.

cheers

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] powerpc: Mark arch_get_ima_policy() and is_ppc_trustedboot_enabled() as __init
  2022-04-08 17:46     ` Mimi Zohar
@ 2022-04-09 13:04       ` Michael Ellerman
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Ellerman @ 2022-04-09 13:04 UTC (permalink / raw)
  To: Mimi Zohar, linuxppc-dev; +Cc: nayna, dja

Mimi Zohar <zohar@linux.ibm.com> writes:
> On Fri, 2022-04-08 at 13:31 -0400, Mimi Zohar wrote:
>> On Fri, 2022-04-08 at 12:05 -0400, Mimi Zohar wrote:
>> > On Fri, 2022-04-08 at 00:15 +1000, Michael Ellerman wrote:
>> > > We can mark arch_get_ima_policy() as __init because it's only caller
>> > > ima_init_arch_policy() is __init. We can then mark
>> > > is_ppc_trustedboot_enabled() __init because its only caller is
>> > > arch_get_ima_policy().
>> > > 
>> > > Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
>> > 
>> > I assume you want to upstream this via power,
>> > 
>> >     Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>
>> 
>> Sorry, I just noticed that is_ppc_trustedboot_enabled() is also called
>> by arch_ima_get_secureboot().
>
> Never mind, arch_ima_get_secureboot() calls
> is_ppc_secureboot_enabled(), not is_ppc_trustedboot_enabled().

Yeah despite the long names they are still easy to confuse :)

cheers

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-04-09 13:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-07 14:15 [PATCH] powerpc: Mark arch_get_ima_policy() and is_ppc_trustedboot_enabled() as __init Michael Ellerman
2022-04-08 16:05 ` Mimi Zohar
2022-04-08 17:31   ` Mimi Zohar
2022-04-08 17:46     ` Mimi Zohar
2022-04-09 13:04       ` Michael Ellerman
2022-04-09 13:03   ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).