From: Conor Dooley <conor@kernel.org>
To: Stefan Berger <stefanb@linux.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
linux-integrity@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
conor.dooley@microchip.com, nayna@linux.ibm.com,
Lukas Wunner <lukas@wunner.de>,
linux-kernel@vger.kernel.org, jarkko@kernel.org,
rnsastry@linux.ibm.com, peterhuewe@gmx.de, viparash@in.ibm.com
Subject: Re: [PATCH 1/2] powerpc/prom_init: Replace linux,sml-base/sml-size with linux,sml-log
Date: Thu, 7 Mar 2024 21:29:26 +0000 [thread overview]
Message-ID: <20240307-freely-sassy-cae2bdeae800@spud> (raw)
In-Reply-To: <71c151b2-b03a-49a7-87b9-fc902b0cf328@linux.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 4578 bytes --]
On Thu, Mar 07, 2024 at 04:15:01PM -0500, Stefan Berger wrote:
>
>
> On 3/7/24 15:39, Conor Dooley wrote:
> > On Thu, Mar 07, 2024 at 10:11:03AM -0500, Stefan Berger wrote:
> > > On 3/7/24 05:41, Michael Ellerman wrote:
> > > > Stefan Berger <stefanb@linux.ibm.com> writes:
> >
> > > >
> > > diff --git a/Documentation/devicetree/bindings/tpm/tpm-common.yaml
> > > b/Documentation/devicetree/bindings/tpm/tpm-common.yaml
> > > index 3c1241b2a43f..591c48f8cb74 100644
> > > --- a/Documentation/devicetree/bindings/tpm/tpm-common.yaml
> > > +++ b/Documentation/devicetree/bindings/tpm/tpm-common.yaml
> > > @@ -30,6 +30,11 @@ properties:
> > > size of reserved memory allocated for firmware event log
> > > $ref: /schemas/types.yaml#/definitions/uint32
> > >
> > > + linux,sml-log:
> > > + description:
> > > + firmware event log
> >
> > Can you provide a more complete description here please as to what the
> > different between this and the other property? If I was populating a DT
> > I would have absolutely no idea whether or not to use this or the other
> > property, nor how to go about actually populating it.
> > The "log" in your example doesn't look like an actual log of any sort,
> > but I know nothing about TPMs so I'll take your word for it that that's
> > what a TPM log looks like.
>
> In the example I cannot give a log but only a part of it. The log is in
> binary format and in case of TPM 2.0 starts with a header followed by log
> entries about what was measured. I don't think it's necessary to even give
> the full log header here. You do need some TPM specific knowledge about the
> 'firmware even log'.
>
>
> The existing properties are described like this:
>
> linux,sml-base:
> description:
> base address of reserved memory allocated for firmware event log
> $ref: /schemas/types.yaml#/definitions/uint64
>
> linux,sml-size:
> description:
> size of reserved memory allocated for firmware event log
> $ref: /schemas/types.yaml#/definitions/uint32
>
> Would this describe the new property 'better' by prefixing it with
> 'embedded'?
IMO, no that's not any better. Spell it out so that someone who doesn't
know his arse from his elbow when it comes to tpm immediately knows that
this means the entire tpm log is inside the dtb. The paragraph you wrote
above gives more information about what this property is populated with
than the property description does.
> linux,sml-log:
> description:
> embedded firmware event log
> $ref: /schemas/types.yaml#/definitions/uint8-array
>
>
> >
> > > + $ref: /schemas/types.yaml#/definitions/uint8-array
> > > +
> > > memory-region:
> > > description: reserved memory allocated for firmware event log
> > > maxItems: 1
> > >
> > >
> > > Is my patch missing something?
> >
> > I think you also need the dependantSchema stuff you had in your original
> > snippet that makes the linux,* properties mutually exclusive with
> > memory-region (or at least something like that).
> >
> I modified my new example now like this:
> ...
> ibm,loc-code = "U9080.HEX.134CA08-V7-C3";
> linux,sml-log = <00 00 00 00 03 00 00>;
> linux,sml-size = <0xbce10200>; <-- added
> ibm,loc-code = "U8286.41A.10082DV-V3-C3";
> linux,sml-base = <0xc60e 0x0>;
> linux,sml-size = <0xbce10200>;
> linux,sml-log = <00 00 00 00 03 00 00>; <- added
>
> It errors out on bad examples, which is good.
Aye, that is covered by your new oneOf for this one binding. The
dependantSchema bit in tpm-common.yaml enforces it for all tpm devices.
It also covers the memory-region property being mutually exclusive with
the linux,sml-{base,size} properties so I think you need to extend that
to also cover linux,sml-lof property.
> > Please make sure you CC the DT maintainers and list on the v2 and Lukas
> > Wunner too.
>
> Yes, I have them already cc'ed here.
To: Conor Dooley <conor@kernel.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>, linux-integrity@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, conor.dooley@microchip.com, nayna@linux.ibm.com, Lukas Wunner <lukas@wunner.de>, linux-kernel@vger.kernel.org, jarkko@kernel.org,
rnsastry@linux.ibm.com, peterhuewe@gmx.de, viparash@in.ibm.com
You have Lukas, one of the three DT maintainers and not the list as far
as I can see. Correct me please if I am wrong.
Thanks,
Conor.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2024-03-07 21:29 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-06 15:55 [PATCH 0/2] Preserve TPM log across kexec Stefan Berger
2024-03-06 15:55 ` [PATCH 1/2] powerpc/prom_init: Replace linux,sml-base/sml-size with linux,sml-log Stefan Berger
2024-03-07 10:41 ` Michael Ellerman
2024-03-07 15:11 ` Stefan Berger
2024-03-07 20:39 ` Conor Dooley
2024-03-07 21:15 ` Stefan Berger
2024-03-07 21:29 ` Conor Dooley [this message]
2024-03-07 21:52 ` Rob Herring
2024-03-08 12:23 ` Stefan Berger
2024-03-08 20:57 ` Rob Herring
2024-03-08 21:26 ` Stefan Berger
2024-03-12 10:32 ` Michael Ellerman
2024-03-12 16:22 ` Rob Herring
2024-03-12 19:15 ` Stefan Berger
2024-03-07 20:11 ` Jarkko Sakkinen
2024-03-06 15:55 ` [PATCH 2/2] tpm: of: If available Use linux,sml-log to get the log and its size Stefan Berger
2024-03-07 10:42 ` Michael Ellerman
2024-03-07 15:00 ` Stefan Berger
2024-03-07 11:35 ` Conor Dooley
2024-03-07 19:57 ` Jarkko Sakkinen
2024-03-07 20:00 ` Jarkko Sakkinen
2024-03-08 12:17 ` Stefan Berger
2024-03-11 20:09 ` Jarkko Sakkinen
2024-03-12 10:35 ` Michael Ellerman
2024-03-12 15:50 ` Jarkko Sakkinen
2024-03-12 19:08 ` Stefan Berger
2024-03-06 16:08 ` [PATCH 0/2] Preserve TPM log across kexec Stefan Berger
2024-03-07 21:42 ` Rob Herring
2024-03-07 22:32 ` Stefan Berger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240307-freely-sassy-cae2bdeae800@spud \
--to=conor@kernel.org \
--cc=conor.dooley@microchip.com \
--cc=jarkko@kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lukas@wunner.de \
--cc=mpe@ellerman.id.au \
--cc=nayna@linux.ibm.com \
--cc=peterhuewe@gmx.de \
--cc=rnsastry@linux.ibm.com \
--cc=stefanb@linux.ibm.com \
--cc=viparash@in.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox