From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754195AbdAZSdD (ORCPT ); Thu, 26 Jan 2017 13:33:03 -0500 Received: from quartz.orcorp.ca ([184.70.90.242]:46504 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753975AbdAZSdC (ORCPT ); Thu, 26 Jan 2017 13:33:02 -0500 Date: Thu, 26 Jan 2017 11:32:52 -0700 From: Jason Gunthorpe To: Jarkko Sakkinen Cc: tpmdd-devel@lists.sourceforge.net, linux-security-module@vger.kernel.org, Peter Huewe , Marcel Selhorst , open list Subject: Re: [PATCH] tpm: fix RC value check in tpm2_seal_trusted Message-ID: <20170126183252.GA16502@obsidianresearch.com> References: <20170125210348.13790-1-jarkko.sakkinen@linux.intel.com> <20170125221245.GB713@obsidianresearch.com> <20170126112714.xvvvb72dybmfgitw@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170126112714.xvvvb72dybmfgitw@intel.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, Jan 26, 2017 at 01:27:14PM +0200, Jarkko Sakkinen wrote: > "The error code handling is bogus as any error code that has the bits > set that TPM_RC_HASH could pass. Implemented tpm2_rc_value() helper to > parse the error value from FMT0 and FMT1 error codes to use to check the > error so that these types of mistakes is prevented in the future." Great thanks Jason