From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750976AbdAPJwq (ORCPT ); Mon, 16 Jan 2017 04:52:46 -0500 Received: from mga01.intel.com ([192.55.52.88]:33598 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750826AbdAPJwn (ORCPT ); Mon, 16 Jan 2017 04:52:43 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,238,1477983600"; d="scan'208";a="31081058" Date: Mon, 16 Jan 2017 11:52:36 +0200 From: Jarkko Sakkinen To: Ken Goldman Cc: linux-security-module@vger.kernel.org, tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [tpmdd-devel] [PATCH RFC v2 3/5] tpm: infrastructure for TPM spaces Message-ID: <20170116095236.dlhqf4ghv2xv2sas@intel.com> References: <20170112174612.9314-1-jarkko.sakkinen@linux.intel.com> <20170112174612.9314-4-jarkko.sakkinen@linux.intel.com> <1484253532.5807.16.camel@linux.vnet.ibm.com> <20170113162855.dddgsomp7m4c3inc@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 On Sat, Jan 14, 2017 at 12:53:15PM -0500, Ken Goldman wrote: > On 1/13/2017 11:28 AM, Jarkko Sakkinen wrote: > > > > > + > > > > + if (!tpm2_find_cc_attrs(chip, cc, &attrs)) { > > > > + /* should never happen */ > > > > + dev_err(&chip->dev, "TPM returned a different CC: > > > > 0x%04x\n", > > > > + cc); > > > > + rc = -EFAULT; > > > > + goto out_err; > > > > + } > > Something is strange here. Is "CC" command code? > > The TPM does not return a command code. The mapping should use the > command code from the command. > > It could be the code is correct - the command code mapped OK in the command > but then failed in the response. But the error message is strange. Thanks. I'll update that message. /Jarkko