Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4454887ybg; Tue, 29 Oct 2019 07:25:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqwCvJIH7i3HmwtXqPdkJ6fM8SNMYAK5tnLdf9BoJFYTVfedrQpm0HTR9Zob/poh/i1rGrQJ X-Received: by 2002:a50:f096:: with SMTP id v22mr26772180edl.149.1572359138178; Tue, 29 Oct 2019 07:25:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572359138; cv=none; d=google.com; s=arc-20160816; b=KMxz5HjsWzn0dwSBOBDs72lRarx4wv2CrKP+Ml5+gjvt23SV9XMi2JwJTslMIz7jLX AK1kKAFRSLvselsDhJUJ+AUSoGa6BecRUTaPMkLv7Ee8WhZh3BS/5C3lNF00t3sNo2xc t5F6WhoPVVkv6JxQFgCQ6EcxAohUxn8rotwtftVoHxSP4VUaSzWJ5RFnxfSg2CQDsrdl PHnr5CgOs1wQ/GHCHefsT4bN0mVVecxsKEyMlFcvCxfzp9jsam0Mus1MAIEsVeG1vIPe V13XqaeAA36Rqtg88yy1mmmyXKDI5LWiiuz5AKi8+YMSUMHhEVX6FHFa4maOTecO6m9L 5mbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=mSKwPguERQCpkd8O0jOVofMAmNVX+80ISmyJe5P6E/k=; b=wxEYbr/AiFBnAYv+TJnanlsLXXvbl2vpa8VFMWanYDhpLnPlaokTGsxi9m9WYVvb9t aetL5Sy8dQ9DEMAAne72Ies8gvSUFDHeXuqKh6xRy8EK6S7cQxD6XRqftYCWnvBCo9F0 GO1vtZx/TwUmuku45I0B369QESU9wqfHvkETnkWeWz12eS6zyJVeXt7AmzUSY0Vh45pU 9HqXiOKH7mQ3aTi0T/jbcrwL+KBn/VcRW+ez/fDpj/GRR04maqcjEJNiRfp2Q0uOZX+t WN4zg3Rr+jEJbqm09ckeExlvi7CXfHk9X0QshVr3sJo8GdQ/v/ZDkBiPL4sCI/c/at5g 4AhA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id jr6si7957966ejb.307.2019.10.29.07.25.13; Tue, 29 Oct 2019 07:25:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389182AbfJ2OWa (ORCPT + 99 others); Tue, 29 Oct 2019 10:22:30 -0400 Received: from mga18.intel.com ([134.134.136.126]:40857 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727255AbfJ2OW3 (ORCPT ); Tue, 29 Oct 2019 10:22:29 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Oct 2019 07:22:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,244,1569308400"; d="scan'208";a="202858277" Received: from jkenneal-mobl.ger.corp.intel.com (HELO localhost) ([10.252.31.252]) by orsmga003.jf.intel.com with ESMTP; 29 Oct 2019 07:22:26 -0700 Date: Tue, 29 Oct 2019 16:22:25 +0200 From: Jarkko Sakkinen To: Jason Gunthorpe Cc: linux-kernel@vger.kernel.org, Peter Huewe , linux-integrity@vger.kernel.org Subject: Re: [PATCH v2] tpm: Add major_version sysfs file Message-ID: <20191029142225.GC7415@linux.intel.com> References: <20191025193103.30226-1-jsnitsel@redhat.com> <20191028205313.GH8279@linux.intel.com> <20191028210507.7i6d6b5olw72shm3@cantor> <20191029091731.GC9896@linux.intel.com> <20191029124342.GB6128@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191029124342.GB6128@ziepe.ca> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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