On 1/10/2017 3:08 PM, Jason Gunthorpe wrote: >> 4 - Is a write() error desirable? I think the application would prefer >> a TPM formatted response like TPM_RC_VALUE. > > > IMHO, I prefer the write errno, but we need to clearly define what our > errnos means. Errnos used by RM should not overlap with errnos from > other parts of our kernel stack. > > This makes it clear the kernel is source of the error, not the physical TPM.
Except that the kernel is clearly not the source of the error. The user application tried to flush a handle and specified the wrong handle number. "write error" sounds like a write error, but the TPMDD didn't actually write anything. "bad address" sounds like the kernel tried to access a bad address. But it didn't access any address. 1 - I prefer an error that is meaningful to the user, and I think this one is very misleading. 2 - What's the TSS supposed to do with it? I can return some generic "problem in the TPM device driver". It's going to take a long time for the average user to realize that the "bad address" is actually a bad key handle. ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi _______________________________________________ tpmdd-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tpmdd-devel
