Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1807003ybn; Thu, 26 Sep 2019 02:30:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqzkkiLQEpqGooV8x9Y+bZLnWdQ0hWqtDRlT0aP+lwfOUi/6ufD29tTnPIJkgQjPwo571Nsp X-Received: by 2002:a50:93a4:: with SMTP id o33mr2564707eda.0.1569490210790; Thu, 26 Sep 2019 02:30:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569490210; cv=none; d=google.com; s=arc-20160816; b=gkFS5w63D7mBMswtWpMwWjwxZqA2hSaG0PbdUABn6MxM3OBAOGlqlPe/V/RvhAScWD ZLAhkmmYXH9pkiwCaocuVjX6bfXtUGFHJ0MMuxcJAtacOo19ruepgpA5ALuxTUl5rLR4 zir2h7tc3JEO4ZUs9qUlhfbIzihzTHu3A3ylS0T2IhpbAPFOWlRC5PyksoyE6sJxYsis Xasb/yop/715+AXVpOmyev6frcJMEGQZ51E9/B5SBwtXTYY8LeUsCSBCPFVpLrxmzKp+ pptvEVp6q7wcPuR6wqTnHjBhOtmtGiec2Jl3ldPghdgRUGVdtoEMMgiHppBMj2d3a1bh a31Q== 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=dgf5VBzydhDfk5iGCuMdfdWq2ZKQEUZOftdjK39oi10=; b=y5KumNLcwEkUt5X2PpLcNgUorFABA850XVXcCXs72ZR7IFHtPqkWsHqkkVyvj0JsNk LVHa2v2e4EAETcxTHlFSXu59EYQw3J+1QZeVUhnwnLag/JCpivChXDKffI2JshAaJ6GO VKXBeghelFXfzTDzrubQs04jhVfqyK81OQ937kLe2MyIyXdpEMEY4qRupBD3k/0CTPgU TEe69h0YXiplQ+kyj6nvonqV0+gaP4J1uGZIaksv8z84BjkBIXdFgWfWqHKzbdWDz+cG txzMPd0uL5VZA9/XLoGXufuwCgsHD8DxVa244kbw66GeB+46idM1LRFOpSt4DNrrDpS/ XVHQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-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 i55si1026824eda.88.2019.09.26.02.29.46; Thu, 26 Sep 2019 02:30:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-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-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-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 S1730516AbfIYMfB (ORCPT + 99 others); Wed, 25 Sep 2019 08:35:01 -0400 Received: from mga07.intel.com ([134.134.136.100]:40044 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726369AbfIYMfB (ORCPT ); Wed, 25 Sep 2019 08:35:01 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Sep 2019 05:35:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,548,1559545200"; d="scan'208";a="203602442" Received: from kmakows-mobl.ger.corp.intel.com (HELO localhost) ([10.249.39.225]) by fmsmga001.fm.intel.com with ESMTP; 25 Sep 2019 05:34:58 -0700 Date: Wed, 25 Sep 2019 15:34:57 +0300 From: Jarkko Sakkinen To: James Bottomley Cc: linux-integrity@vger.kernel.org, linux-crypto@vger.kernel.org, linux-security-module@vger.kernel.org Subject: Re: [PATCH v6 02/12] tpm-buf: add handling for TPM2B types Message-ID: <20190925123457.GB24028@linux.intel.com> References: <1568031408.6613.29.camel@HansenPartnership.com> <1568031515.6613.31.camel@HansenPartnership.com> <20190920141826.GC9578@linux.intel.com> <1569323560.24519.6.camel@HansenPartnership.com> <20190925123401.GA24028@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190925123401.GA24028@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, Sep 25, 2019 at 03:34:01PM +0300, Jarkko Sakkinen wrote: > On Tue, Sep 24, 2019 at 07:12:40AM -0400, James Bottomley wrote: > > I thought about that. The main problem is that most of the > > construct/append functions use the header, and these are the functions > > most useful to the TPM2B operation. > > > > The other thing that argues against this is that the TPM2B case would > > save nothing if we eliminated the header, because we allocate a page > > for all the data regardless. > > It would be way more clean. There is absolutely nothing TPM2B specific. Given the recent regression I'm detaching allocation from tpm_buf and make it purely a decorator (sending patch today). /Jarkko