Re: [PATCHv6 1/3] optee: use uuid for sysfs driver entry

From: Jarkko Sakkinen
Date: Tue Jun 16 2020 - 16:13:52 EST


On Thu, Jun 04, 2020 at 12:16:21PM +0300, Maxim Uvarov wrote:
> On Thu, 4 Jun 2020 at 11:37, Jarkko Sakkinen
> <jarkko.sakkinen@xxxxxxxxxxxxxxx> wrote:
> >
> > On Mon, Jun 01, 2020 at 06:06:43PM +0300, Maxim Uvarov wrote:
> > > With the evolving use-cases for TEE bus, now it's required to support
> > > multi-stage enumeration process. But using a simple index doesn't
> > > suffice this requirement and instead leads to duplicate sysfs entries.
> > > So instead switch to use more informative device UUID for sysfs entry
> > > like:
> > > /sys/bus/tee/devices/optee-ta-<uuid>
> > >
> > > Signed-off-by: Maxim Uvarov <maxim.uvarov@xxxxxxxxxx>
> > > Reviewed-by: Sumit Garg <sumit.garg@xxxxxxxxxx>
> >
> > Why do you mean by duplicate sysfs entries?
> >
>
> Without this change it will try to register something like that:
> first stage w/o tee-supplicant:
> /sys/bus/tee/devices/optee-clnt0
> /sys/bus/tee/devices/optee-clnt1
> /sys/bus/tee/devices/optee-clnt3
> Then with tee-supplicant also index started with 0. I.e.
> /sys/bus/tee/devices/optee-clnt0
> /sys/bus/tee/devices/optee-clnt1
> ...
>
> So we need to increase global index or use some other unique names.

Got it, thanks.

/Jarkko