From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S939281AbdEYVA5 (ORCPT ); Thu, 25 May 2017 17:00:57 -0400 Received: from quartz.orcorp.ca ([184.70.90.242]:57300 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933798AbdEYVAw (ORCPT ); Thu, 25 May 2017 17:00:52 -0400 Date: Thu, 25 May 2017 15:00:48 -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: <20170525210048.GA14592@obsidianresearch.com> References: <1495717956-14252-1-git-send-email-stefanb@linux.vnet.ibm.com> <20170525155059.GA5151@obsidianresearch.com> <20170525200931.GA12733@obsidianresearch.com> <9ff88c24-ca7a-1867-7284-17689fdac655@linux.vnet.ibm.com> <20170525204414.GA13742@obsidianresearch.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 04:54:01PM -0400, Stefan Berger wrote: > This particular command will never reach anyone listening on the proxy's > file descriptor since the tear-down only begins when the front- and backend > are closed. > The logging happens somewhere else than where the error occurs. What is the > best way to suppress the logging? Remove it entirely -- probably not. > Return a special error code that doesn't get logged? Error code would be my choice. > that indicates this condition? It's not clear to me. Why not just > prevent the command from being sent if it will never reach its > intended destination There are many cases where the vtpm shutdown can race with something else, if the logging for this is bothersome it should be fixed directly. Adding strange special case flags is confusing as to the purpose - eg your commit message didn't even say this is only about fixing some noisy logging. Jason