Received: by 2002:a17:90a:8504:0:0:0:0 with SMTP id l4csp4831860pjn; Tue, 29 Oct 2019 08:23:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqxXoDZot2pXFdB4voIgDWrQcdrT4eTIFnMm5zatOMFuX0qiVVhuax8MnZODrCjGnH7ecyo2 X-Received: by 2002:a17:906:1505:: with SMTP id b5mr3907942ejd.195.1572362601148; Tue, 29 Oct 2019 08:23:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572362601; cv=none; d=google.com; s=arc-20160816; b=Ihn5E8Y2FcqQyZB7ck4mSXqNpfWnek42g0NaXL++dx3bMBX0m50HxsKSbRKhl/7y5g pY5JiZPRcUgISLSU5253UgI6BLtWzh4TwhNh3vApNpoqSzy9u+W9yhOJSvq/tBMW6uHO WY8+7iF+el+fBbslNG+Eas5ZF4dQkr9wEHl1dsoFQMJwPpEfE8PdmgMUUZHzOUr2L0DQ ntuLdZcjFAFaPMC8/jNSVsHsa9l9dE56crVBmZufBt4g0RPewfeNP6dr55G5+qYRpew2 +DlH3lP2f1/ZMzhP9RW1MNsRvr1SD4N42wbZnN+DPbEIqD3UIBzJaLlIA2u5jLNuqTR5 d5mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=KJ2tUGVkciILzBBgFhdC61JtF6ibtgppsm1fyVjOFLQ=; b=i1zQoxAo01a3FGne3/cO0TtxK7bp26Q6jiJ1MpuX9vdU2g2arsKpXd2P4VAZ4Q3eue iBZUZZt5h9Lr0yxfv31SPB1iLT3IoMh2FRVsRtK3paKmDvkAtR7ldv+oIT+GUfkM4bFX BKTgIrD/EUvPpO9WkS9JNyyZit9jerlTk5WhDdTXtSUEbBG1D6Q5xUi1FmJNUbDZVHe8 +q7wiXSDzYCJaPZlkA0LYYukZ+/jgqI5NnRquZaBsTT/tN24GwW6+Dk67nvpK3RZGEKD ZMhuPCbs0bV1Eu8pEak8V81bF+9dAX70mYFaVqqIJZuw/UoJ1rvsMUxB/kIp881ddnSB secA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=MjLxo0CQ; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f51si10140205edb.421.2019.10.29.08.22.56; Tue, 29 Oct 2019 08:23:21 -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=pass header.i=@ziepe.ca header.s=google header.b=MjLxo0CQ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389889AbfJ2PWP (ORCPT + 99 others); Tue, 29 Oct 2019 11:22:15 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:34784 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728879AbfJ2PWP (ORCPT ); Tue, 29 Oct 2019 11:22:15 -0400 Received: by mail-qt1-f195.google.com with SMTP id e14so20799844qto.1 for ; Tue, 29 Oct 2019 08:22:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=KJ2tUGVkciILzBBgFhdC61JtF6ibtgppsm1fyVjOFLQ=; b=MjLxo0CQi64Bmh/eGY+poTwa1hrB2LqoX1NA3eWPKQ+L4Hmh81yIpXJid9IlfSAyUq KSIUG7abrSMrkwnEDPbL+MoHpCuisAGc4+EpNLifawyRxS5wiNKtDTLt/9h+Rtz0e/FU Jf9WjriqDc7rkrv6WWXLemtgoU7jzUxdDfWuAHtp5K8CY+9M6C8nzmPNQIEIRMr8Nvco POiT9OzFzSNaarWqAH9e+BSFTMi9HijpfcvJ9bBnNVl976cqdk7/CaaB49xHysXdsbnp DKYtVURgO2ZHzxv5ztyoWSrdeLOXKSoVeTIYG9BGKO3VsptyfqtcZDxtH8LvJhPEo3QA VtQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=KJ2tUGVkciILzBBgFhdC61JtF6ibtgppsm1fyVjOFLQ=; b=lO8SqbKYJhZFmG8GNX2oMTR2DA4RlFuxqRUKmE/5sd3Q75zufKEWBr2CqQH2Y2npuA l+8W8FQEyGpXqLJCwSS+nog9cVbwZ8VeUEFqOKlxUTD7SRkVi0Nu2JKf6TrAsxN9FcoQ JeVZdVJ6jvpG18rW35tYu2GSecQS+cOEZctm0OddV7mQjkBUyPIwow6WJpLlev4t8io6 ylVa+2lOz/IG1KQy85k+smPH7ET4PD4OPBOh2xECCCERQFAVve8fIarsUR/BfZKPXGQC gMr1CEQyJmrVHHGPuzzS7eW7EvUdWam43Rbir7WNQy2seqwr1/46gwSZmpvlo1f/m8Z4 53xQ== X-Gm-Message-State: APjAAAU8oXbNY6sd9SK9nupk0OkGB++aGf3D2L3MrlFncaHKpRJPyMws LRHAYpumJHpFUzgaXrXcwHgUXA== X-Received: by 2002:ac8:28c7:: with SMTP id j7mr4246821qtj.4.1572362532708; Tue, 29 Oct 2019 08:22:12 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-162-113-180.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.113.180]) by smtp.gmail.com with ESMTPSA id p59sm6906193qtd.2.2019.10.29.08.22.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 Oct 2019 08:22:12 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1iPTJz-00073b-DL; Tue, 29 Oct 2019 12:22:11 -0300 Date: Tue, 29 Oct 2019 12:22:11 -0300 From: Jason Gunthorpe To: James Bottomley Cc: Jarkko Sakkinen , linux-kernel@vger.kernel.org, Peter Huewe , linux-integrity@vger.kernel.org Subject: Re: [PATCH v2] tpm: Add major_version sysfs file Message-ID: <20191029152211.GE6128@ziepe.ca> 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> User-Agent: Mutt/1.9.4 (2018-02-28) 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. Indeed, it is a bit a global namespace, so nothing wrong with adding tpm_ Jason