From: Ken Goldman Subject: RM - why flushcontext fails, possible solution Date: Wed, 11 Jan 2017 14:52:39 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tpmdd-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: tpmdd-devel@lists.sourceforge.net I think I may know why this is failing. in tpm2_auto_startup(), the device driver gets the command handle count from the TPM using a getcapability TPM2_CAP_COMMANDS. The TPM does not treat the TPM2_FlushContext as a handle, because it can flush a session that is not TPM resident. Thus, command handle count is zero, and I suspect that the RM doesn't try to map it. A solution may be to just special case this flushcontext and set the command handle count to 1 in the table. Then tpm2_map_command() will see nr_handles == 1 and do the mapping. ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi