linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/security: Show powerpc_security_features in debugfs
@ 2019-04-09 13:14 Michael Ellerman
  2019-04-11 10:35 ` Joel Stanley
  2019-05-03  6:59 ` Michael Ellerman
  0 siblings, 2 replies; 3+ messages in thread
From: Michael Ellerman @ 2019-04-09 13:14 UTC (permalink / raw)
  To: linuxppc-dev

This can be helpful for debugging problems with the security feature
flags, especially on guests where the flags come from the hypervisor
via an hcall and so can't be observed in the device tree.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/kernel/security.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/powerpc/kernel/security.c b/arch/powerpc/kernel/security.c
index b33bafb8fcea..d6ba696d0ed0 100644
--- a/arch/powerpc/kernel/security.c
+++ b/arch/powerpc/kernel/security.c
@@ -104,6 +104,14 @@ static __init int barrier_nospec_debugfs_init(void)
 	return 0;
 }
 device_initcall(barrier_nospec_debugfs_init);
+
+static __init int security_feature_debugfs_init(void)
+{
+	debugfs_create_x64("security_features", 0400, powerpc_debugfs_root,
+			   (u64 *)&powerpc_security_features);
+	return 0;
+}
+device_initcall(security_feature_debugfs_init);
 #endif /* CONFIG_DEBUG_FS */
 
 #ifdef CONFIG_PPC_FSL_BOOK3E
-- 
2.20.1


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

* Re: [PATCH] powerpc/security: Show powerpc_security_features in debugfs
  2019-04-09 13:14 [PATCH] powerpc/security: Show powerpc_security_features in debugfs Michael Ellerman
@ 2019-04-11 10:35 ` Joel Stanley
  2019-05-03  6:59 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Joel Stanley @ 2019-04-11 10:35 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev

On Tue, 9 Apr 2019 at 22:45, Michael Ellerman <mpe@ellerman.id.au> wrote:
>
> This can be helpful for debugging problems with the security feature
> flags, especially on guests where the flags come from the hypervisor
> via an hcall and so can't be observed in the device tree.
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

Reviewed-by: Joel Stanley <joel@jms.id.au>


> ---
>  arch/powerpc/kernel/security.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/arch/powerpc/kernel/security.c b/arch/powerpc/kernel/security.c
> index b33bafb8fcea..d6ba696d0ed0 100644
> --- a/arch/powerpc/kernel/security.c
> +++ b/arch/powerpc/kernel/security.c
> @@ -104,6 +104,14 @@ static __init int barrier_nospec_debugfs_init(void)
>         return 0;
>  }
>  device_initcall(barrier_nospec_debugfs_init);
> +
> +static __init int security_feature_debugfs_init(void)
> +{
> +       debugfs_create_x64("security_features", 0400, powerpc_debugfs_root,
> +                          (u64 *)&powerpc_security_features);
> +       return 0;
> +}
> +device_initcall(security_feature_debugfs_init);
>  #endif /* CONFIG_DEBUG_FS */
>
>  #ifdef CONFIG_PPC_FSL_BOOK3E
> --
> 2.20.1
>

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

* Re: [PATCH] powerpc/security: Show powerpc_security_features in debugfs
  2019-04-09 13:14 [PATCH] powerpc/security: Show powerpc_security_features in debugfs Michael Ellerman
  2019-04-11 10:35 ` Joel Stanley
@ 2019-05-03  6:59 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2019-05-03  6:59 UTC (permalink / raw)
  To: Michael Ellerman, linuxppc-dev

On Tue, 2019-04-09 at 13:14:20 UTC, Michael Ellerman wrote:
> This can be helpful for debugging problems with the security feature
> flags, especially on guests where the flags come from the hypervisor
> via an hcall and so can't be observed in the device tree.
> 
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> Reviewed-by: Joel Stanley <joel@jms.id.au>

Applied to powerpc next.

https://git.kernel.org/powerpc/c/398af571128fe75f07343f929975b26d

cheers

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

end of thread, other threads:[~2019-05-03  7:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-09 13:14 [PATCH] powerpc/security: Show powerpc_security_features in debugfs Michael Ellerman
2019-04-11 10:35 ` Joel Stanley
2019-05-03  6:59 ` 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).