Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4490153ybg; Tue, 29 Oct 2019 07:58:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqxSK+8V9+JtkG1JducfFb7nj8oHXtTXnP4R9/5RI9gefPn+sZsW74nWWTIb8fvkfcrNPx4K X-Received: by 2002:a17:906:d291:: with SMTP id ay17mr3686775ejb.85.1572361122513; Tue, 29 Oct 2019 07:58:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572361122; cv=none; d=google.com; s=arc-20160816; b=aq7kI0jxTWuvlYHM7WhnilrH0ynebrEmHChtsDwPTDsbCcv7LbfK3B2f5QVWnlmPgs KTfAh5M/lOKaWaodZPbsuzXIwS7J4+vxGRlEgEopZjKJeKoukVABqNtbUekhSduNqpQ5 ijDaf5WJgztWzNbpWy+ct+K6brkWg9KKRGMI1wsQ1pVZacIO8WaCkzX07CYxK8kENNA3 mAcbAkr3NqH+W1QdvRH1vhNFP0c+n1RG6uHDfpNGfPFuCca/BkzddSnjeer++y6rXDRx EkGJVab+lr3IS31NrlB70l524NKTqxcBEUNGH3hZ+lgdU5/OmdQNILKw5BHSgKXkCB5v bwsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature:dkim-signature; bh=QOlR3EI73xZUjw35oopZnI7d5JhY691/zl9H2BLtbyg=; b=zRGtxC4uFZSpZ6aZWnlO/8f4zRIbUt7mOhh+tTVE040jvzFBBXiucy7eb+BH8D6wpz MyhGAhTrU8chCyACO2n449FhHeKr9G8r8ua0VKxhhJ2Vg1aPEfZ6mYDnV5YiymL4jjhP 9yJEJWq8a4wqmtd78TiJdf5LIzSJ/6te+GlX1tAqB1/y9IZDGYoMIFPcC7gCHznzz6FY /LaR8qhZKoLmNqJ8/j2kg6RDuHkz1n2544ywgy3MR93wNaazb7uyR7jp7HHAZe0KP68R h3n7u+w1hthNDf6SqvfQANo+B8bfkIvm1zWrOpXwDqTIXe/T0h40+Br5PCuNYBFUcw5s /2fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@hansenpartnership.com header.s=20151216 header.b=CUnYZRQS; dkim=fail header.i=@hansenpartnership.com header.s=20151216 header.b=CUnYZRQS; 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=hansenpartnership.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d1si8012679ejh.281.2019.10.29.07.58.18; Tue, 29 Oct 2019 07:58:42 -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; dkim=fail header.i=@hansenpartnership.com header.s=20151216 header.b=CUnYZRQS; dkim=fail header.i=@hansenpartnership.com header.s=20151216 header.b=CUnYZRQS; 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=hansenpartnership.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389623AbfJ2O4x (ORCPT + 99 others); Tue, 29 Oct 2019 10:56:53 -0400 Received: from bedivere.hansenpartnership.com ([66.63.167.143]:38170 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389095AbfJ2O4x (ORCPT ); Tue, 29 Oct 2019 10:56:53 -0400 Received: from localhost (localhost [127.0.0.1]) by bedivere.hansenpartnership.com (Postfix) with ESMTP id 6F5938EE180; Tue, 29 Oct 2019 07:56:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=hansenpartnership.com; s=20151216; t=1572361012; bh=hSAPbbchUW71aepMVeoCwqh6IN8XqeFoWWXaychDyd0=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=CUnYZRQSwJp/G4unXoq4DjugON9DDRqeog63IrzuT3uOa59rp+uygu4R71hXVqiOy GOpmVJvnFNgnGAC4B+aVIiDsuRKAvDBCvyjVlltkXpc7UPYaduGoMg8j/qrOI1FT+E TK8D22TdOtNTuXZp5z6ftP47GpU9lgd0vYTofzAc= Received: from bedivere.hansenpartnership.com ([127.0.0.1]) by localhost (bedivere.hansenpartnership.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3ejYJQojYjHj; Tue, 29 Oct 2019 07:56:52 -0700 (PDT) Received: from jarvis.lan (unknown [50.35.76.230]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bedivere.hansenpartnership.com (Postfix) with ESMTPSA id DB9718EE15F; Tue, 29 Oct 2019 07:56:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=hansenpartnership.com; s=20151216; t=1572361012; bh=hSAPbbchUW71aepMVeoCwqh6IN8XqeFoWWXaychDyd0=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=CUnYZRQSwJp/G4unXoq4DjugON9DDRqeog63IrzuT3uOa59rp+uygu4R71hXVqiOy GOpmVJvnFNgnGAC4B+aVIiDsuRKAvDBCvyjVlltkXpc7UPYaduGoMg8j/qrOI1FT+E TK8D22TdOtNTuXZp5z6ftP47GpU9lgd0vYTofzAc= Message-ID: <1572361008.4812.2.camel@HansenPartnership.com> Subject: Re: [PATCH v2] tpm: Add major_version sysfs file From: James Bottomley To: Jarkko Sakkinen , Jason Gunthorpe Cc: linux-kernel@vger.kernel.org, Peter Huewe , linux-integrity@vger.kernel.org Date: Tue, 29 Oct 2019 07:56:48 -0700 In-Reply-To: <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> <20191029142225.GC7415@linux.intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.6 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. James