Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3635016ybp; Sun, 6 Oct 2019 16:38:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqz68ll+MOUdW9TAWOmGNBvRKpa3b+bQacqNH1obVgBHENGj2qDmS1JZ2BxEsp/Z2XImRMg/ X-Received: by 2002:a17:906:9604:: with SMTP id s4mr21608966ejx.38.1570405112590; Sun, 06 Oct 2019 16:38:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570405112; cv=none; d=google.com; s=arc-20160816; b=uIftFU4sszuKycBjoM3zq+dm+miR0yA0QLkuzitdN7P2KzsYnT/IJz6STX85IRnjo5 o4dIwMy+6jfHQKeZGZSju1izyqtM9VR7+nSg7E5t7B+tnPA1z2SMrgVSza4/yLWKqREz yoLTI05XbJW5jNDtYIetA8Vni7MAz/bHAk68VsBQVc+j/JOIVY7uyhYbKFuGiUPOZ0xA E3DEee7ab4yQ5jGN75VBZtsBNsT2V42Mq5ZAUIOSKn6hcHoN+SktzLDQ2X9Nk60830og ZVxWw0z+9gA4EI36QCY9rLRHaXhy8p8WBh++7Ee6CIaSJ4RsbVCIkUhxqSuwH9mg/j3Y 2S/w== 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:to :from:date; bh=KcPyg1/uSl79P1o8J/758oQl3ZO37H9iv+vKlHwx024=; b=dqML8Se+frTIKG22miJ8q1jSSoBAyUrz9EyhCsi6jp6y/R7WO1opWnXqUgvxth/UYd 0S0GyOB3TD/6Xge6IGFTt7McY/JujOl+Vcg0fZeN0mlmVOQf7LJNb2F34E4wEHw2lWTP amR2fV/wdm9dhDuKshkKHHcmyPrc/sClwddD3nT9YsTSkNAEIM8SCWs/LppGtYd24mgq 9MAqkEFSKTayN/wzs3c+lzldRMZtKT1108Oj+CJEHCXHxHdxHIsrb63hWvQY23OLC4oi 96FyaFNl0iK13hk4qM9aieBOapbducMpR068f0fiGygiqFVHuCcAzgQCW7Juo+CAM/yx B1rA== 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 f57si7777011ede.78.2019.10.06.16.38.08; Sun, 06 Oct 2019 16:38:32 -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 S1726946AbfJFXcd (ORCPT + 99 others); Sun, 6 Oct 2019 19:32:33 -0400 Received: from mga06.intel.com ([134.134.136.31]:22013 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726000AbfJFXcd (ORCPT ); Sun, 6 Oct 2019 19:32:33 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Oct 2019 16:32:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,265,1566889200"; d="scan'208";a="276626306" Received: from mwebb1-mobl.ger.corp.intel.com (HELO localhost) ([10.251.93.103]) by orsmga001.jf.intel.com with ESMTP; 06 Oct 2019 16:32:27 -0700 Date: Mon, 7 Oct 2019 02:32:21 +0300 From: Jarkko Sakkinen To: James Bottomley , Mimi Zohar , linux-integrity@vger.kernel.org, Sumit Garg , Stefan Berger , Peter Huewe , Jason Gunthorpe , Arnd Bergmann , Greg Kroah-Hartman , open list Subject: Re: [PATCH v3 2/2] tpm: Detach page allocation from tpm_buf Message-ID: <20191006233221.GA15594@linux.intel.com> References: <20191003185103.26347-1-jarkko.sakkinen@linux.intel.com> <20191003185103.26347-3-jarkko.sakkinen@linux.intel.com> <1570207062.3563.17.camel@HansenPartnership.com> <1570210647.5046.78.camel@linux.ibm.com> <1570210902.3563.19.camel@HansenPartnership.com> <20191004182434.tjwtfjzvamomybhr@cantor> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191004182434.tjwtfjzvamomybhr@cantor> 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 Fri, Oct 04, 2019 at 11:24:34AM -0700, Jerry Snitselaar wrote: > On Fri Oct 04 19, James Bottomley wrote: > > On Fri, 2019-10-04 at 13:37 -0400, Mimi Zohar wrote: > > > On Fri, 2019-10-04 at 09:37 -0700, James Bottomley wrote: > > > > On Thu, 2019-10-03 at 21:51 +0300, Jarkko Sakkinen wrote: > > > > > As has been seen recently, binding the buffer allocation and > > > > > tpm_buf > > > > > together is sometimes far from optimal. > > > > > > > > Can you elaborate on this a bit more? I must have missed the > > > > discussion. > > > > > > Refer to e13cd21ffd50 ("tpm: Wrap the buffer from the caller to > > > tpm_buf in tpm_send()") for the details. > > > > Yes, I get that, but to my mind that calls for moving the > > tpm_init/destroy_buf into the callers of tpm_send (which, for the most > > part, already exist), which means there's no need to separate the buf > > and data lifetimes. > > > > James > > > > Sumit has been working on a patchset that does this. His patchset > converts both the asymmetric keys and trusted keys code to using the > tpm_buf manipulation functions. And it is also in a shape that it can soon be merged (within few iterations at most). /Jarkko