Jason Gunthorpe <[email protected]> wrote on 02/09/2016 
01:01:52 PM:


> 
> On Tue, Feb 09, 2016 at 12:45:37PM -0500, Stefan Berger wrote:
> > And how do we unroll if tpm_chip_register fails? We just close thefd 
that we
> > gave to user space?
> 
> Arrange for the fd to become permanently readable and read returns
> error, user space will close the fd.

:-( User space will just pass the fd to another process, which is the TPM 
emulator, and that thing then starts failing on the broken file 
descriptor.

> 
> > I also don't see why it is a better solution than what I have here 
now:
> > 
> > https://github.com/stefanberger/linux/commit/
> > 954c7dece4a5c44525ca07a9569dc2f3b2b3d174
> 
> As I've said, this mucks up where we want to go with the core code,
> and breaks our current invariants - the TPM hardware must be fully
> operational before tpm_register is called.

Either way, I don't see how the TPM emulator can be fully operational 
before tpm_chip_register() is called. So far the code allows to start a 
TPM emulator on the file descript 'late'. The possibility for accomodating 
the solution in the future is there by leaving the possibility for a 
boolean where the driver can choose whether timeout retrieval is done as 
part of tpm_chip_register or it has to take care of this itself.

   Stefan


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
tpmdd-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tpmdd-devel

Reply via email to