Re: [PATCH v5 7/7] tpm: create TPM 2.0 devices using own device class

From: Jason Gunthorpe
Date: Tue Nov 04 2014 - 15:49:33 EST


On Tue, Nov 04, 2014 at 10:38:43PM +0200, Jarkko Sakkinen wrote:

> > Then a patch: Drop misc_register entirely, no compat stuff. Explain
> > clearly the resulting sysfs changes, CC the various people who monitor
> > the sysfs API, act on any feedback. I'm hoping it is an OK change.
> > [ If it is not OK then we can talk about using it only for TPM2 or
> > whatever ]
>
> Hold on. So you are proposing that for a TPM 1.0 device you would
> have simultaneously as an intermediate step:
>
> - /sys/class/tpm/tpm0
> - /sys/class/misc/tpm0

Yes, well more specifically:

/sys/class/tpm/tpm0/
/sys/class/misc/tpm0/dev

The reason for this is simply that adding to sysfs is certainly OK,
I don't think the tpm and misc device will collide in any way - udev
will look for the 'dev' file and ignore the class/tpm directory.

It breaks up the patch too, this would be a monster:

> Maybe it would be a better idea to just create patch that would simply

Because of all the variable rename noise and so forth.

Even if the net result is we apply several patchs in a row that wipes
/sys/class/misc/tpm0 the patches themselves will be smaller and more
reviewable if split, especially those big variable rename ones..

> Moving the current TPM sysfs attributes is not really an issue because
> they are only for human consumption (not machine readable in any sany
> way) :) And AFAIK TrouSerS does not use sysfs PPI interface.

Someone in user space must use that event log and PPI stuff??? Does
anyone know who and how?

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/