lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 29 Oct 2019 16:22:25 +0200
From:   Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
To:     Jason Gunthorpe <jgg@...pe.ca>
Cc:     linux-kernel@...r.kernel.org, Peter Huewe <peterhuewe@....de>,
        linux-integrity@...r.kernel.org
Subject: Re: [PATCH v2] tpm: Add major_version sysfs file

On Tue, Oct 29, 2019 at 09:43:42AM -0300, Jason Gunthorpe wrote:
> On Tue, Oct 29, 2019 at 11:17:31AM +0200, Jarkko Sakkinen wrote:
> > On Mon, Oct 28, 2019 at 02:05:07PM -0700, Jerry Snitselaar wrote:
> > > On Mon Oct 28 19, Jarkko Sakkinen wrote:
> > > > On Fri, Oct 25, 2019 at 12:31:03PM -0700, Jerry Snitselaar wrote:
> > > > > +	return sprintf(buf, "%s\n", chip->flags & TPM_CHIP_FLAG_TPM2
> > > > > +		       ? "2.0" : "1.2");
> > > > 
> > > > This is not right. Should be either "1" or "2".
> > > > 
> > > > /Jarkko
> > > 
> > > Okay I will fix that up. Do we have a final decision on the file name,
> > > major_version versus version_major?
> > 
> > Well, I don't see how major_version would make any sense. It is
> > not as future proof as version_major. Still waiting for Jason's
> > feedback for this.
> 
> $ find /sys/ -name  "*version*"
> /sys/devices/pci0000:00/0000:00:17.0/ata1/host0/scsi_host/host0/ahci_host_version
> /sys/devices/virtual/net/docker0/bridge/multicast_mld_version
> /sys/devices/virtual/net/docker0/bridge/multicast_igmp_version
> /sys/firmware/efi/esrt/entries/entry0/lowest_supported_fw_version
> /sys/firmware/efi/esrt/entries/entry0/last_attempt_version
> /sys/firmware/efi/esrt/entries/entry0/fw_version
> /sys/module/acpi/parameters/acpica_version
> 
> etc..
> 
> Not a single example of the backward version.
> 
> Most likely it should be called 'tpm_version'

The postfix gives tells the part of the version number that the file
reports. If you really want to add the prefix, then the appropriate
name would be tpm_version_major.

I'd still go with just version_major as tpm_ prefix is somewhat
redundant.

/Jarkko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ