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=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham 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 0A333C4360C for ; Fri, 27 Sep 2019 15:43:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DEA3C21850 for ; Fri, 27 Sep 2019 15:43:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727866AbfI0PnL (ORCPT ); Fri, 27 Sep 2019 11:43:11 -0400 Received: from mga03.intel.com ([134.134.136.65]:2799 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727207AbfI0PnL (ORCPT ); Fri, 27 Sep 2019 11:43:11 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Sep 2019 08:43:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,556,1559545200"; d="scan'208";a="214871594" Received: from mdauner2-mobl2.ger.corp.intel.com (HELO localhost) ([10.249.39.118]) by fmsmga004.fm.intel.com with ESMTP; 27 Sep 2019 08:42:46 -0700 Date: Fri, 27 Sep 2019 18:42:45 +0300 From: Jarkko Sakkinen To: linux-integrity@vger.kernel.org Cc: Mimi Zohar , Jerry Snitselaar , James Bottomley , Sumit Garg , Stefan Berger , Peter Huewe , Jason Gunthorpe , Arnd Bergmann , Greg Kroah-Hartman , open list Subject: Re: [PATCH] tpm: Detach page allocation from tpm_buf Message-ID: <20190927154245.GG10545@linux.intel.com> References: <20190926172324.3405-1-jarkko.sakkinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190926172324.3405-1-jarkko.sakkinen@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-integrity-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org On Thu, Sep 26, 2019 at 08:23:24PM +0300, Jarkko Sakkinen wrote: > As has been seen recently, binding the buffer allocation and tpm_buf > together is sometimes far from optimal. The buffer might come from the > caller namely when tpm_send() is used by another subsystem. In addition we > can stability in call sites w/o rollback (e.g. power events)> > > Take allocation out of the tpm_buf framework and make it purely a wrapper > for the data buffer. > > Link: https://patchwork.kernel.org/patch/11146585/ > Cc: Mimi Zohar > Cc: Jerry Snitselaar > Cc: James Bottomley > Cc: Sumit Garg > Cc: Stefan Berger > Signed-off-by: Jarkko Sakkinen > --- > v2: > * In tpm2_get_random(), TPM2_CC_GET_RANDOM was accidently switch to > TPM2_CC_PCR_EXTEND. Now it has been switched back. Forgot --subject-prefix="PATCH v2". /Jarkko