[PATCH] powerpc/security: Show powerpc_security_features in debugfs

Joel Stanley joel at jms.id.au
Thu Apr 11 20:35:49 AEST 2019


On Tue, 9 Apr 2019 at 22:45, Michael Ellerman <mpe at 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 at ellerman.id.au>

Reviewed-by: Joel Stanley <joel at 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
>


More information about the Linuxppc-dev mailing list