From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S942539AbdEYPvO (ORCPT ); Thu, 25 May 2017 11:51:14 -0400 Received: from quartz.orcorp.ca ([184.70.90.242]:34845 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S942477AbdEYPvM (ORCPT ); Thu, 25 May 2017 11:51:12 -0400 Date: Thu, 25 May 2017 09:50:59 -0600 From: Jason Gunthorpe To: Stefan Berger Cc: jarkko.sakkinen@linux.intel.com, tpmdd-devel@lists.sourceforge.net, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] tpm: vtpm_proxy: Do not run tpm2_shutdown Message-ID: <20170525155059.GA5151@obsidianresearch.com> References: <1495717956-14252-1-git-send-email-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1495717956-14252-1-git-send-email-stefanb@linux.vnet.ibm.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Broken-Reverse-DNS: no host name found for IP address 10.0.0.156 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 25, 2017 at 09:12:36AM -0400, Stefan Berger wrote: > The tpm2_shutdown does not work with the VTPM proxy driver since the > function only gets called when the backend file descriptor is already > closed and at this point no data can be sent anymore. A proper shutdown > would have to be initated by a user space application, such as a container > management stack, that sends the command via the character device before > terminating the TPM emulator. > > To avoid the tpm2_shutdown we introduce a TPM_CHIP_FLAG_NO_SHUTDOWN flag > that only the VTPM proxy driver sets. This also avoids misleading kernel > log messages. This seems strange to me.. Why isn't ops null if the fd has gone away? What is the call flow that hits this? Jason