public inbox for linux-crypto@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Thompson <daniel.thompson@linaro.org>
To: Sumit Garg <sumit.garg@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	"open list:HARDWARE RANDOM NUMBER GENERATOR CORE"
	<linux-crypto@vger.kernel.org>,
	Devicetree List <devicetree@vger.kernel.org>,
	mpm@selenic.com, Herbert Xu <herbert@gondor.apana.org.au>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jens Wiklander <jens.wiklander@linaro.org>,
	Bhupesh Sharma <bhsharma@redhat.com>,
	tee-dev@lists.linaro.org
Subject: Re: [PATCH v1 1/2] dt/bindings: add bindings for optional optee rng-uuid property
Date: Thu, 3 Jan 2019 17:14:41 +0000	[thread overview]
Message-ID: <20190103171441.6ymnhbxnb4asr3kl@holly.lan> (raw)
In-Reply-To: <CAFA6WYOpw-URTYJ4i0Y_Tie0_ccMwekbOVzXz3d05NttyL9sHg@mail.gmail.com>

On Fri, Dec 28, 2018 at 02:41:01PM +0530, Sumit Garg wrote:
> On Thu, 27 Dec 2018 at 19:10, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> >
> > On Thu, 27 Dec 2018 at 12:08, Sumit Garg <sumit.garg@linaro.org> wrote:
> > >
> > > Add bindings for OP-TEE based optional hardware random number
> > > generator identifier property. It could be used on ARM based devices
> > > where entropy source is not accessible to normal world (linux in this
> > > case).
> > >
> > > Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
> > > ---
> > >  Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.txt | 4 ++++
> > >  1 file changed, 4 insertions(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.txt b/Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.txt
> > > index d38834c..e3a4c35 100644
> > > --- a/Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.txt
> > > +++ b/Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.txt
> > > @@ -20,6 +20,9 @@ the reference implementation maintained by Linaro.
> > >                     "hvc" : HVC #0, with the register assignments specified
> > >                            in drivers/tee/optee/optee_smc.h
> > >
> > > +- rng-uuid       : Optional OP-TEE based RNG service identifier in case
> > > +                   hardware entropy source is not accesible to normal world
> > > +                   (Linux).
> > >
> > >
> > >  Example:
> > > @@ -27,5 +30,6 @@ Example:
> > >                 optee {
> > >                         compatible = "linaro,optee-tz";
> > >                         method = "smc";
> > > +                       rng-uuid = "ab7a617c-b8e7-4d8f-8301-d09b61036b64";
> >
> > If OP-TEE is going to expose devices in this way, it should be modeled
> > more like a bus driver, i.e., sub-nodes that represent the devices,
> > with compatible strings, and perhaps even 'reg' properties for the
> > UUIDs.
> >
> 
> This is something Daniel also suggested during our discussion. But we
> agreed to discuss in upstream to get more feedback.
> 
> I think generic TEE should be modelled as a bus driver with devices
> identified via UUIDs, probably queried from underline implementations
> like OP-TEE regarding which resident devices (pseudo-TA UUIDs) it
> supports. Then this list of device UUIDs can be compared against child
> driver's UUID as part of match callback during driver registration.
> Also the child driver could maintain list of device UUIDs which it
> supports.
> 
> If we go via this approach we may not require device tree entry for
> corresponding device UUIDs.

That's pretty much aligned with my thinking.

Having said that I had wondered whether all TEEs would be prepared to
describe the set of available UUIDs since AFAIK UUID enumeration isn't
part of the GlobalPlatform standards so it is not implemented by GP
based TEEs (such as OP-TEE).

Is it feasible to extend OP-TEE to enumerate the available UUIDs?
If nothing else can it provide an (optional) pseudo TA to provide such a
service? Personally I'd be OK with a kernel TEE bus infrastructure that
mandated such a service (e.g. a TEE that does not provide the service
can only interact with TEE from userspace).


Daniel.

  parent reply	other threads:[~2019-01-03 17:14 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-27 11:07 [PATCH v1 0/2] Add OP-TEE based hwrng driver Sumit Garg
2018-12-27 11:07 ` [PATCH v1 1/2] dt/bindings: add bindings for optional optee rng-uuid property Sumit Garg
2018-12-27 13:39   ` Ard Biesheuvel
2018-12-27 13:39     ` Ard Biesheuvel
2018-12-28  9:11     ` Sumit Garg
2018-12-28  9:11       ` Sumit Garg
2019-01-03 17:14       ` Daniel Thompson [this message]
2019-01-03 17:14         ` Daniel Thompson
2019-01-04  6:39         ` Sumit Garg
2019-01-04  6:39           ` Sumit Garg
2019-01-04 11:01           ` Jens Wiklander
2019-01-04 11:01             ` Jens Wiklander
2019-01-04 12:01             ` Sumit Garg
2019-01-04 12:01               ` Sumit Garg
2019-01-04 13:03               ` Jens Wiklander
2019-01-04 13:03                 ` Jens Wiklander
2019-01-07  5:32                 ` Sumit Garg
2019-01-07  5:32                   ` Sumit Garg
2019-01-07  5:59                   ` Ard Biesheuvel
2019-01-07  5:59                     ` Ard Biesheuvel
2019-01-07  6:46                     ` Sumit Garg
2019-01-07  6:46                       ` Sumit Garg
2019-01-03 16:20     ` Rob Herring
2019-01-03 16:20       ` Rob Herring
2018-12-27 11:07 ` [PATCH v1 2/2] hwrng: add OP-TEE based rng driver Sumit Garg
2018-12-27 18:28   ` Ard Biesheuvel
2018-12-27 18:28     ` Ard Biesheuvel
2018-12-28  9:58     ` Sumit Garg
2018-12-28  9:58       ` Sumit Garg
2018-12-28 10:38       ` Ard Biesheuvel
2018-12-28 10:38         ` Ard Biesheuvel
2018-12-28 13:03         ` Sumit Garg
2018-12-28 13:03           ` Sumit Garg
2018-12-28 14:46           ` Jens Wiklander
2018-12-28 14:46             ` Jens Wiklander
2018-12-30 14:59             ` Vesa Jääskeläinen
2018-12-30 14:59               ` Vesa Jääskeläinen
2018-12-31 10:35               ` Sumit Garg
2018-12-31 10:35                 ` Sumit Garg
2018-12-31 10:24             ` Sumit Garg
2018-12-31 10:24               ` Sumit Garg
2019-01-02  8:04               ` Jens Wiklander
2019-01-02  8:04                 ` Jens Wiklander
2019-01-02  8:26                 ` Bhupesh Sharma
2019-01-02  8:26                   ` Bhupesh Sharma
2019-01-02 10:12                 ` Sumit Garg
2019-01-02 10:12                   ` Sumit Garg

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=20190103171441.6ymnhbxnb4asr3kl@holly.lan \
    --to=daniel.thompson@linaro.org \
    --cc=ard.biesheuvel@linaro.org \
    --cc=arnd@arndb.de \
    --cc=bhsharma@redhat.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=jens.wiklander@linaro.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mpm@selenic.com \
    --cc=robh+dt@kernel.org \
    --cc=sumit.garg@linaro.org \
    --cc=tee-dev@lists.linaro.org \
    /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