From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5BC6C2BC11 for ; Fri, 11 Sep 2020 11:49:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6CEB1221F1 for ; Fri, 11 Sep 2020 11:49:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725861AbgIKLtM (ORCPT ); Fri, 11 Sep 2020 07:49:12 -0400 Received: from mga03.intel.com ([134.134.136.65]:28366 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725853AbgIKLsV (ORCPT ); Fri, 11 Sep 2020 07:48:21 -0400 IronPort-SDR: hdPkqMFSo03m2Wla7DLAXL8YXq+dtu09mmtVRih7qAPOS22Kyx3Z8T0NxWKBP8JZZoFfK64fJJ 0Gy6g8fD1g/A== X-IronPort-AV: E=McAfee;i="6000,8403,9740"; a="158776210" X-IronPort-AV: E=Sophos;i="5.76,415,1592895600"; d="scan'208";a="158776210" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Sep 2020 04:47:47 -0700 IronPort-SDR: CESeq24l0uQku2aI3NLAuVvRvfkb8dsKu35iz8crQChob8qm6GtBgOjwnVrbjmOIZouBz/4AfJ PuPpS8V2Ca0A== X-IronPort-AV: E=Sophos;i="5.76,415,1592895600"; d="scan'208";a="334489030" Received: from amaksymi-mobl.ger.corp.intel.com (HELO localhost) ([10.252.60.247]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Sep 2020 04:47:44 -0700 Date: Fri, 11 Sep 2020 14:47:41 +0300 From: Jarkko Sakkinen To: James Bottomley Cc: Greg KH , linux-integrity@vger.kernel.org, Mimi Zohar , linux-api@vger.kernel.org Subject: Re: [PATCH RESEND v4 0/1] add sysfs exports for TPM 2 PCR registers Message-ID: <20200911114741.GA6877@linux.intel.com> References: <20200906203245.18429-1-James.Bottomley@HansenPartnership.com> <20200907053824.GA279469@kroah.com> <20200907132322.GB106839@linux.intel.com> <1599515528.4232.55.camel@HansenPartnership.com> <20200908054552.GB303404@kroah.com> <20200908180513.GB5390@linux.intel.com> <1599588851.10803.29.camel@HansenPartnership.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1599588851.10803.29.camel@HansenPartnership.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-api-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-api@vger.kernel.org On Tue, Sep 08, 2020 at 11:14:11AM -0700, James Bottomley wrote: > On Tue, 2020-09-08 at 21:05 +0300, Jarkko Sakkinen wrote: > > On Tue, Sep 08, 2020 at 07:45:52AM +0200, Greg KH wrote: > > > On Mon, Sep 07, 2020 at 02:52:08PM -0700, James Bottomley wrote: > [...] > > > > I've got to say I think binary attributes are actively evil. I > > > > can see > > > > they're a necessity when there's no good way to represent the > > > > data they > > > > contain, like the bios measurement log or firmware code or a raw > > > > interface like we do for the SMP frame code in libsas. But when > > > > there's a well understood and easy to produce user friendly non- > > > > binary > > > > representation, I think dumping binary is inimical to being a > > > > good API. > > > > > > Agreed. > > > > > > thanks, > > > > > > greg k-h > > > > Looking at the patch, something like /pcrs// > > would be a bit cleaner representation than the current /pcrs- > > /. > > That's actually a technical limitation of using the current attribute > groups API: It's designed to support single level directories in sysfs > (or no directory at all). That's not to say we can't do multi-level > ones, but if we do we have to roll our own machinery for managing the > files rather than relying on the groups API. > > Given that the current groups API does all the nasty lifetime > management that I'd otherwise have to do in the patch, I have a strong > incentive for keeping it, which is why the single /pcrs- > / format. OK, I do get that. I've tried to do something similar in past and it turnd out to be a tremendous job. I guess I'll have to re-review the whole patch again. I'll prioritize that next week. > James /Jarkko