Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751300AbdCQUjZ (ORCPT ); Fri, 17 Mar 2017 16:39:25 -0400 Received: from mga11.intel.com ([192.55.52.93]:8173 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751179AbdCQUjX (ORCPT ); Fri, 17 Mar 2017 16:39:23 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,178,1486454400"; d="scan'208";a="1109663724" Date: Fri, 17 Mar 2017 22:37:18 +0200 From: Jarkko Sakkinen To: Jason Gunthorpe Cc: Jerry Snitselaar , Jarkko Sakkinen , tpmdd-devel@lists.sourceforge.net, linux-security-module@vger.kernel.org, gang.wei@intel.com, Peter Huewe , Marcel Selhorst , open list Subject: Re: [PATCH v3] tpm_crb: request and relinquish locality 0 Message-ID: <20170317203718.3z45mfvnrgjzwn7l@intel.com> References: <20170315055738.11088-1-jarkko.sakkinen@iki.fi> <87h92uvtce.fsf@redhat.com> <87fuidx5mt.fsf@redhat.com> <20170316115543.jw23imcvkcriaam5@intel.com> <878to3x2h2.fsf@redhat.com> <20170317171116.GA29996@obsidianresearch.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170317171116.GA29996@obsidianresearch.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 Content-Length: 1034 Lines: 28 On Fri, Mar 17, 2017 at 11:11:16AM -0600, Jason Gunthorpe wrote: > On Fri, Mar 17, 2017 at 10:00:41AM -0700, Jerry Snitselaar wrote: > > > > Changing the return value to -EBUSY was a stupid mistake from my side. > > > > > > I'll try revise this a bit in a way that the API will allow positive > > > value for stating that the given locality has been already taking. > > > > Is there a big performance hit with requesting and releasing locality? > > If instead it just released it when release_locality is called I think > > the changes are pretty minor. > > If you can measure please let us know :) > > This is all very old it may not actually make any sense.. > > .. and as I said earlier if we want to 'cache' the locality for > performance then the core code should do it. > > I kinda thought the point of releasing the locality was to allow other > platform things to access the TPM, so I'm confused why TIS wouldn't > always release it as well.. > > Jason I would propose to make tpm_tis_core to work like that. /Jarkko