[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87wocw5p1d.fsf@mpe.ellerman.id.au>
Date: Wed, 23 Oct 2019 10:38:38 +1100
From: Michael Ellerman <mpe@...erman.id.au>
To: Nayna Jain <nayna@...ux.ibm.com>, linuxppc-dev@...abs.org,
linux-efi@...r.kernel.org, linux-integrity@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
Jeremy Kerr <jk@...abs.org>,
Matthew Garret <matthew.garret@...ula.com>,
Mimi Zohar <zohar@...ux.ibm.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Claudio Carvalho <cclaudio@...ux.ibm.com>,
George Wilson <gcwilson@...ux.ibm.com>,
Elaine Palmer <erpalmer@...ibm.com>,
Eric Ricther <erichte@...ux.ibm.com>,
Oliver O'Halloran <oohall@...il.com>,
Nayna Jain <nayna@...ux.ibm.com>,
Prakhar Srivastava <prsriva02@...il.com>,
Lakshmi Ramasubramanian <nramas@...ux.microsoft.com>
Subject: Re: [PATCH v8 3/8] powerpc: detect the trusted boot state of the system
Nayna Jain <nayna@...ux.ibm.com> writes:
> diff --git a/arch/powerpc/kernel/secure_boot.c b/arch/powerpc/kernel/secure_boot.c
> index 99bba7915629..9753470ab08a 100644
> --- a/arch/powerpc/kernel/secure_boot.c
> +++ b/arch/powerpc/kernel/secure_boot.c
> @@ -28,3 +39,16 @@ bool is_ppc_secureboot_enabled(void)
> pr_info("Secure boot mode %s\n", enabled ? "enabled" : "disabled");
> return enabled;
> }
> +
> +bool is_ppc_trustedboot_enabled(void)
> +{
> + struct device_node *node;
> + bool enabled = false;
> +
> + node = get_ppc_fw_sb_node();
> + enabled = of_property_read_bool(node, "trusted-enabled");
Also here you need:
of_node_put(node);
> +
> + pr_info("Trusted boot mode %s\n", enabled ? "enabled" : "disabled");
> +
> + return enabled;
> +}
cheers
Powered by blists - more mailing lists