From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Stefan Berger" Subject: Re: [PATCH v9 2/4] tpm: Proxy driver for supporting multiple emulated TPMs Date: Wed, 13 Apr 2016 07:24:05 -0400 Message-ID: <201604131124.u3DBONR5003501@d03av02.boulder.ibm.com> References: <57068198.6050407@linux.vnet.ibm.com> <20160411084358.GB11322@intel.com> <20160411181403.GB371@obsidianresearch.com> <201604111933.u3BJXErj001305@d03av03.boulder.ibm.com> <20160411202811.GA3663@obsidianresearch.com> <201604112030.u3BKUeJQ017181@d01av04.pok.ibm.com> <20160411205718.GC3663@obsidianresearch.com> <201604112213.u3BMD3i5028908@d03av02.boulder.ibm.com> <20160412000500.GC5861@obsidianresearch.com> <201604121512.u3CFCULH013445@d01av05.pok.ibm.com> <20160412175439.GB5759@obsidianresearch.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3171791004693727549==" Return-path: In-Reply-To: <20160412175439.GB5759-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tpmdd-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Jason Gunthorpe Cc: tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Christophe Ricard List-Id: tpmdd-devel@lists.sourceforge.net --===============3171791004693727549== Content-Type: multipart/alternative; boundary="=_alternative 003EA91C85257F94_=" --=_alternative 003EA91C85257F94_= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="US-ASCII" Jason Gunthorpe wrote on 04/12/2016=20 01:54:40 PM: >=20 > On Tue, Apr 12, 2016 at 11:18:20AM -0400, Stefan Berger wrote: > > > Stick it before the TPM=5FCHIP=5FFLAG=5FVIRTUAL patch and throw aw= ay=20 most of > > > that patch. Just add two flag checks into=20 tpm=5Fadd/del=5Flegacy=5Fsysfs() >=20 > > Here's the v10 series now. If you want a better text for that=20 patch, > > please let me know. >=20 > Sure. I noticed a few other things, full tidied patch below, thanks for > taking this on. >=20 > > I had to extend it to tpm-interface.c > > [2]https://github.com/stefanberger/linux/commits/vtpm-driver.v10 >=20 > Yes, that looks right, thanks Updated it with your patch and the ioctl fix. >=20 > > The patches pass my test suite and tpm tis seems to also work fine. > > [3]https://github.com/stefanberger/linux-vtpm-tests >=20 > > > + rc =3D =5F=5Fcompat=5Fonly=5Fsysfs=5Flink=5Fentry=5Fto=5Fkobj( > > > + &chip->dev.parent->kobj, &chip->dev.kobj, "ppi"); > > > + if (rc && rc !=3D -ENOENT) > > > + goto out=5Ferr; > > I wonder whether it is necessary to goto out=5Ferr or not just retur= n=20 rc > > here? >=20 > Correct >=20 > Good catch on the tpm=5Fpm=5F functions too >=20 > > Also, for tpm0 I now find the following two pcrs entries, as well=20 as > > all the rest of course: > > /sys/devices/pnp0/00:05/tpm/tpm0/pcrs > > /sys/devices/pnp0/00:05/pcrs > > Is this intentionately? >=20 > Yes, the expectation is that the legacy path > '/sys/devices/pnp0/00:05/pcrs' is a symlink to the new path > '/sys/devices/pnp0/00:05/tpm/tpm0/pcrs' >=20 > I assume you saw that all the symlinks were working? Yes, all are working. Stefan --=_alternative 003EA91C85257F94_= Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="US-ASCII" Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> wrote on 04/12/2016 01:54:40 PM:

>
> On Tue, Apr 12, 2016 = at 11:18:20AM -0400, Stefan Berger wrote:
> >    > St= ick it before the TPM=5FCHIP=5FFLAG=5FVIRTUAL patch and throw away most of
> >    > that patch. Just add = two flag checks into tpm=5Fadd/del=5Flegacy=5Fsysfs()
>
> >=    Here's the v10 series now. If you want a better text for that patch,
> >    please let me know.
> =
> Sure. I noticed a few other things, full tidied patch below, thanks for
> taking this on.
>
> >    I had to ext= end it to tpm-interface.c
> >    [2]
https://github.com/stefanberger/linux/commits/vtpm-driver.v10
>
> Yes, that looks right, th= anks


Updated it with your patch and t= he ioctl fix.


>
> > =    The patches pass my test suite and tpm tis seems to also work fine.
> >    [3]
https://gi= thub.com/stefanberger/linux-vtpm-tests>
> >    > +   rc =3D =5F=5Fcompat=5Fonly= =5Fsysfs=5Flink=5Fentry=5Fto=5Fkobj(
> >    > +  = ;    &chip->dev.parent->kobj, &chip->dev.kobj, "ppi");
> >    > + =   if (rc && rc !=3D -ENOENT)
> >    > + =      goto out=5Ferr;
> >    I wonder whet= her it is necessary to goto out=5Ferr or not just return rc
> >    here?
>
> Corr= ect
>
> Good catch on the tpm=5Fpm=5F functions too
> > >    Also, for tpm0 I now find the following two pcrs entries, as well as
> >    all the rest of course:
&g= t; >    /sys/devices/pnp0/00:05/tpm/tpm0/pcrs
> > &nb= sp;  /sys/devices/pnp0/00:05/pcrs
> >    Is this in= tentionately?
>
> Yes, the expectation is that the legacy path=
> '/sys/devices/pnp0/00:05/pcrs' is a symlink to the new path
>= ; '/sys/devices/pnp0/00:05/tpm/tpm0/pcrs'
>
> I assume you saw= that all the symlinks were working?


= Yes, all are working.

   St= efan

--=_alternative 003EA91C85257F94_=-- --===============3171791004693727549== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z --===============3171791004693727549== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ tpmdd-devel mailing list tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/tpmdd-devel --===============3171791004693727549==--