From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932094AbdA3WPc (ORCPT ); Mon, 30 Jan 2017 17:15:32 -0500 Received: from bedivere.hansenpartnership.com ([66.63.167.143]:33740 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753035AbdA3WPa (ORCPT ); Mon, 30 Jan 2017 17:15:30 -0500 Message-ID: <1485814477.2518.30.camel@HansenPartnership.com> Subject: Re: [tpmdd-devel] [PATCH v2 1/2] tpm2: add session handle context saving and restoring to the space code From: James Bottomley To: Jarkko Sakkinen Cc: linux-security-module@vger.kernel.org, tpmdd-devel@lists.sourceforge.net, open list Date: Mon, 30 Jan 2017 14:14:37 -0800 In-Reply-To: <20170130214526.56e4ai2k6zhzvgy4@intel.com> References: <1485563481.3229.39.camel@HansenPartnership.com> <1485563558.3229.41.camel@HansenPartnership.com> <20170129213957.zx6v6g42kwcabc6y@intel.com> <1485729418.2491.10.camel@HansenPartnership.com> <20170130214526.56e4ai2k6zhzvgy4@intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.5 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2017-01-30 at 23:45 +0200, Jarkko Sakkinen wrote: > On Sun, Jan 29, 2017 at 02:36:58PM -0800, James Bottomley wrote: [...] > > > 2. Can it really return both TPM_RC_HANDLE and > > > TPM_RC_REFERENCE_H0? > > > > Yes, it seems that a session that doesn't exist (because it's been > > flushed) then it returns TPM_RC_REFERNCE_H0, but if the context has > > a sequence mismatch (because it's been flushed and reloaded) then > > we get TPM_RC_HANDLE. > > > > James > > If it is flushed, wouldn't you just get TPM_RC_REFERENCE_H0 when you > try to TPM2_ContextLoad? The "and reloaded" does not make sense to > me. Once a session is flushed it cannot be reloaded. > > Maybe you meant to say "beause it's been saved and reloaded"? That > would make more sense and fits better what I see in the Commands > specification. I mean if you load a prior context instead of the current one for an existing handle, effectively a replay, you get TPM_RC_HANDLE. James