Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp54003ybx; Thu, 31 Oct 2019 15:49:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqzvQyQ0BNv+Anut58/aZGfDKBz1s0U34LZW666RsXWlGgbvzGF3pFXk17N7jO5YTsf+1Wwi X-Received: by 2002:a17:906:3746:: with SMTP id e6mr6584915ejc.170.1572562147110; Thu, 31 Oct 2019 15:49:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572562147; cv=none; d=google.com; s=arc-20160816; b=m85untRMcQoeKBxAJK5hhCPB4y8npbMqcVbnDnHC8uf09N0WsoamxVW94IK30C/5JP YxB5MRr3ycyAoxqkAMoXjVRpplTkvNCckFUdQf4QpQP3hKnJhQK4hI744qI3cOBeFlL+ VWSxsr5WuJjHGaXPOPYsYDps9TJB4Iwsz9M7XjSqlbcaqQVSUCwiygqHkpGPIQ3pf/j6 JTzz/Ti3+SRMInE6ANvlHEFULqKFFRunui4A+x6BV7Yxtw61wZ1susubMGAl7yT3KTBC utAHyALiuZOzUZ2zUmBh58x0ClY0xII3iqXDFRs860E3dOrJ+rVO1prir8RsQwtazg6X rxqQ== 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=Zb1/FpM9Kxh7EDaK5Wiipp+wy0ZqUGsofdO9o9tt0NQ=; b=myq/zDEdeMnEKclJrgotgFROBcEF//aT+svMpYqOla/ehYMyC/arYyCUYL8vr3hIqY GVh/oCCQC+HFcDJ6yBtoch46XjBpvQN3Hj2mDLmf2U1u+kgylA8srfUsjHHGvg7PITPR b8/m7HmImcz0XD+K2wzxjFpZHsljf/JslStpzVoXKTW3p3fEMmSkDmVUxp05lLeQdOkA IqA1F7Hk6em11f8VQA2xju5ho9kgc4egM1iv1cn0TjRO2jR4vuqO3CFhT4hNAV/G14e1 RLWZXFlUbtMakemLOirOfYJmYq+wea4qHnOMsKjBgUJYq+Vb5x3yDM+sNNEFD2ExTnwD H1jQ== 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 x19si3086854ejv.256.2019.10.31.15.48.25; Thu, 31 Oct 2019 15:49:07 -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 S1729841AbfJaVEl (ORCPT + 99 others); Thu, 31 Oct 2019 17:04:41 -0400 Received: from mga05.intel.com ([192.55.52.43]:18371 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726680AbfJaVEl (ORCPT ); Thu, 31 Oct 2019 17:04:41 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Oct 2019 14:04:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,253,1569308400"; d="scan'208";a="231008754" Received: from epobrien-mobl1.ger.corp.intel.com (HELO localhost) ([10.252.10.103]) by fmsmga002.fm.intel.com with ESMTP; 31 Oct 2019 14:04:38 -0700 Date: Thu, 31 Oct 2019 23:04:37 +0200 From: Jarkko Sakkinen To: James Bottomley Cc: Jason Gunthorpe , linux-kernel@vger.kernel.org, Peter Huewe , linux-integrity@vger.kernel.org Subject: Re: [PATCH v2] tpm: Add major_version sysfs file Message-ID: <20191031210437.GB10507@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> <20191029142225.GC7415@linux.intel.com> <1572361008.4812.2.camel@HansenPartnership.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1572361008.4812.2.camel@HansenPartnership.com> 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 07:56:48AM -0700, James Bottomley wrote: > On Tue, 2019-10-29 at 16:22 +0200, Jarkko Sakkinen wrote: > > 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/ahc > > > i_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. > > You have to be careful with overly generic names in sysfs ... this is > what happened to us in SCSI: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=42caa0edabd6a0a392ec36a5f0943924e4954311 > > That's not to say version_major is wrong ... plenty of sysfs files have > generic names like this, it's just that tpm_version_major might be more > future proof. I'm cool with that name as long as the postfix also stays. /Jarkko