On Fri, Apr 28, 2017 at 11:27:16AM -0700, Josh Zimmerman wrote: > It sounds like there are several intertwined issues here. I'd like to > keep this patch relatively minimal, so here are my current thoughts on > a path forward: > > * Refactor references to chip->ops to go through tpm_try_get_ops, as > mentioned in the previous patch
As I said, if you rely on the fact that sysfs does not exist for TPM2 then this should already be done for the TPM2 case and an incremental later patch could solve this problem in sysfs to turn shutdown on for tpm1. As long as this logic is clearly documented it is probably an OK step for now. > * Have a common tpm_shutdown method in tpm-chip.c that device specific > drivers call (or that is just registered automatically for all > devices?) that nulls out chip->ops (to prevent any commands being > issued after tpm2_shutdown) and sends tpm2_shutdown I think the original patch got a bit stuck on exactly how to do this, but yes, somehow the common shutdown method is called. Either from the driver core (preferred, IHMO) or via patching every single TPM driver. > Before I spend too much time on this, does this seem like a reasonable > approach? Anything I'm missing? Don't think so, but suggest re-reading that huge original thread to be sure. Jason ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ tpmdd-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tpmdd-devel
