Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1185060ybp; Fri, 4 Oct 2019 10:42:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqyYUrfkqBEgbqAo4ij7dII0txZIHcEAoX0+t3MWjkJ58Tf8TjoN5wH0dNDQzTP/wOO4vMcT X-Received: by 2002:a05:6402:16d5:: with SMTP id r21mr16374513edx.71.1570210972390; Fri, 04 Oct 2019 10:42:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570210972; cv=none; d=google.com; s=arc-20160816; b=uVIZPCx36ba/dvFh+XrGKJbpPPvq9UgIg17g4bpULZSS+cLkRbMIwTTw7eyGsA5qmz F4n4pQlTkrDORvmBjnOHbij0s9O+pNL3jWU/GenigW39tFPpSFUIoqEoBJLgBcf4wKTy qI+tzgwBgjF48fJUnmLsHJLvJ/LnTRhQwmkxptm13O0QRIlwy8miHlGzOeaenODEJA3A lLS+oybdv7vIXXyarCjxWf6U+dp3E2t/J2BybB0rh4liQ7dP+zKe/uQkfJVrKGYm29Wv XEMyxq/UQ3NKYM6UxqQBC6+Ev7UC8yal6ibhEeLEjqy6mnb86T5b5hmkmoQY6EgcPtxA B51g== 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=rRBBediS4MG/eA0t+wENCP0DkukcKJAsFWqk3x4jioI=; b=tQpx4M90vXQBqAfiKYgjeBUClK5aTbMO7pUHuWDL+EYUUX5jTLoD6XjorHKb3UjDP1 3kT2FRv0zvwXBDCF+ohM9sp6BJwsiRJokP74QDoqMHhAgB8+RD5ieVZg0jdSgjSScRZM cgSCRoz/HtKClyKH5VUtdXxte/uVrKvVlolXFTN26QZcfQW6iasmjud4rUiXMjtQz8ou inFKc/lMk1V5DjJaPz1mIlL6Zw2rEVY4uA4JMl4qjMIK1q7Yo954SEYCB9fUNB+v3KDs Piv5LA2ZHs5S/IkJRXne+21G3Ny1pfDaF+spEd2TEAFt0y76tTqraD8C9SRFOkKvjHYQ 9WZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@hansenpartnership.com header.s=20151216 header.b=nbt7KltF; dkim=fail header.i=@hansenpartnership.com header.s=20151216 header.b=sQnuD25a; 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 n14si3592177edv.377.2019.10.04.10.42.27; Fri, 04 Oct 2019 10:42:52 -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=nbt7KltF; dkim=fail header.i=@hansenpartnership.com header.s=20151216 header.b=sQnuD25a; 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 S2388270AbfJDRlq (ORCPT + 99 others); Fri, 4 Oct 2019 13:41:46 -0400 Received: from bedivere.hansenpartnership.com ([66.63.167.143]:59140 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387428AbfJDRlq (ORCPT ); Fri, 4 Oct 2019 13:41:46 -0400 Received: from localhost (localhost [127.0.0.1]) by bedivere.hansenpartnership.com (Postfix) with ESMTP id 23C988EE21D; Fri, 4 Oct 2019 10:41:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=hansenpartnership.com; s=20151216; t=1570210905; bh=y8xVxeb1DPLNLrDZFN+unjwHoSTFwPC/Cd11izdlLAQ=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=nbt7KltFzo16aqLKNy9oVeUZIgtOvuYOBq7C0N5+S/2m/+2EhYTJCQ1nbPzJgwdPx XJyT5FsShIR7Ht9vZUhXKX2YD8g+WQkZ+RpLmfMpWMG9X+2lr6Api+GQ834actiEfw 0T1Gcv5+uK+wHD9+weCeVB8PxeVa3D5baVXQNfLE= 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 gr9W5rhU80Li; Fri, 4 Oct 2019 10:41:44 -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 3E71B8EE0EE; Fri, 4 Oct 2019 10:41:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=hansenpartnership.com; s=20151216; t=1570210904; bh=y8xVxeb1DPLNLrDZFN+unjwHoSTFwPC/Cd11izdlLAQ=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=sQnuD25aRhJ5dz5g6P8NxE8n+RNDS4c0UiDrBplsp6Q79HYORhVGkHsYUT7kX3JHd s4H9wMX19V4E4JiITW7FUB3HqVpzwaJN+y+YDRTUoUed02E8HTJS2/CRgurje8YLar s26TaVdwX0BsbQ9BFoyEhxvY/VU0Z2dOJlteRH34= Message-ID: <1570210902.3563.19.camel@HansenPartnership.com> Subject: Re: [PATCH v3 2/2] tpm: Detach page allocation from tpm_buf From: James Bottomley To: Mimi Zohar , Jarkko Sakkinen , linux-integrity@vger.kernel.org Cc: Jerry Snitselaar , Sumit Garg , Stefan Berger , Peter Huewe , Jason Gunthorpe , Arnd Bergmann , Greg Kroah-Hartman , open list Date: Fri, 04 Oct 2019 10:41:42 -0700 In-Reply-To: <1570210647.5046.78.camel@linux.ibm.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> 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 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