Re: [PATCH] tpm: Add major_version sysfs file

From: Jason Gunthorpe
Date: Fri Oct 25 2019 - 15:32:48 EST


On Fri, Oct 25, 2019 at 11:45:22AM -0700, Jerry Snitselaar wrote:
> On Fri Oct 25 19, Mimi Zohar wrote:
> > On Fri, 2019-10-25 at 07:28 -0700, Jerry Snitselaar wrote:
> > > Easily determining what TCG version a tpm device implements
> > > has been a pain point for userspace for a long time, so
> > > add a sysfs file to report the tcg version of a tpm device.
> >
> > Use "TCG" uppercase consistently.
> > Â
> > >
> > > Cc: Jarkko Sakkinen <jarkko.sakkinen@xxxxxxxxxxxxxxx>
> > > Cc: Peter Huewe <peterhuewe@xxxxxx>
> > > Cc: Jason Gunthorpe <jgg@xxxxxxxx>
> > > Cc: linux-integrity@xxxxxxxxxxxxxxx
> > > Signed-off-by: Jerry Snitselaar <jsnitsel@xxxxxxxxxx>
> >
> > thanks!
> >
> > Reviewed-by: Mimi Zohar <zohar@xxxxxxxxxxxxx>
> >
> > FYI, on my system(s) the new file is accessible as
> > /sys/class/tpm/tpm0/version_major. ÂDoes this need to be documented
> > anywhere?
> >
> >
>
> Yes, there should be an entry added to
> Documentation/ABI/stable/sysfs-class-tpm.
> I will fix that up and the TCG not being uppercase in a v2.
>
> Should Documentation/ABI/stable/sysfs-class-tpm updated in
> some way to reflect that those are all links under device
> now and not actually there.

Applications should not use the link version, that path was a
mistake. The link is for compatability with old userspace.

Jason