From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752337AbdATNjU (ORCPT ); Fri, 20 Jan 2017 08:39:20 -0500 Received: from mga05.intel.com ([192.55.52.43]:44384 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752008AbdATNjS (ORCPT ); Fri, 20 Jan 2017 08:39:18 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,258,1477983600"; d="scan'208";a="811258625" Date: Fri, 20 Jan 2017 15:39:14 +0200 From: Jarkko Sakkinen To: James Bottomley Cc: tpmdd-devel@lists.sourceforge.net, open list , linux-security-module@vger.kernel.org Subject: Re: [tpmdd-devel] [PATCH RFC v3 5/5] tpm2: expose resource manager via a device link /dev/tpms Message-ID: <20170120133914.2wk43nteh2hh7n3c@intel.com> References: <20170116131215.28930-1-jarkko.sakkinen@linux.intel.com> <20170116131215.28930-6-jarkko.sakkinen@linux.intel.com> <1484751663.2717.10.camel@HansenPartnership.com> <20170119104922.vhgz4rxw6yzdrxqt@intel.com> <1484828380.3140.11.camel@HansenPartnership.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1484828380.3140.11.camel@HansenPartnership.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.6.2-neo (2016-08-21) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 19, 2017 at 07:19:40AM -0500, James Bottomley wrote: > On Thu, 2017-01-19 at 12:49 +0200, Jarkko Sakkinen wrote: > > On Wed, Jan 18, 2017 at 10:01:03AM -0500, James Bottomley wrote: > > > On Mon, 2017-01-16 at 15:12 +0200, Jarkko Sakkinen wrote: > > > > From: James Bottomley > > > > > > > > Currently the Resource Manager (RM) is not exposed to userspace. > > > > Make this exposure via a separate device, which can now be > > > > opened multiple times because each read/write transaction goes > > > > separately via the RM. > > > > > > > > Concurrency is protected by the chip->tpm_mutex for each > > > > read/write transaction separately. The TPM is cleared of all > > > > transient objects by the time the mutex is dropped, so there > > > > should be no interference between the kernel and userspace. > > > > > > There's actually a missing kfree of context_buf on the tpms_release > > > path as well. This patch fixes it up. > > > > Can you send me a fresh version of the whole patch so that I can > > include to v4 that includes also changes that I requested in my > > recent comments + all the fixes? > > Sure, I think the attached is basically it > > James Thank you! /Jarkko