From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jarkko Sakkinen Subject: Re: [PATCH] tpm: fix RC value check in tpm2_seal_trusted Date: Sun, 29 Jan 2017 17:11:58 +0200 Message-ID: <20170129151158.6gr4oxluj4tprbca@intel.com> References: <20170125210348.13790-1-jarkko.sakkinen@linux.intel.com> <20170125221245.GB713@obsidianresearch.com> <20170126112714.xvvvb72dybmfgitw@intel.com> <20170126183252.GA16502@obsidianresearch.com> <20170127064327.esussb6itanaqibq@intel.com> <20170127162416.GA32330@obsidianresearch.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20170127162416.GA32330-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tpmdd-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Jason Gunthorpe Cc: linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, open list List-Id: tpmdd-devel@lists.sourceforge.net On Fri, Jan 27, 2017 at 09:24:16AM -0700, Jason Gunthorpe wrote: > On Fri, Jan 27, 2017 at 08:43:27AM +0200, Jarkko Sakkinen wrote: > > On Thu, Jan 26, 2017 at 11:32:52AM -0700, Jason Gunthorpe wrote: > > > 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 > > > > Can I put your Reviewed-by? I would like to get this into 4.11. > > I'm not up to speed on the TPM2 parsing, but it looks OK based on your > description. > > Reviewed-by: Jason Gunthorpe > > Jason Thanks I applied this patch to master. /Jarkko ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751438AbdA2POI (ORCPT ); Sun, 29 Jan 2017 10:14:08 -0500 Received: from mga14.intel.com ([192.55.52.115]:39654 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751109AbdA2POG (ORCPT ); Sun, 29 Jan 2017 10:14:06 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,306,1477983600"; d="scan'208";a="59536910" Date: Sun, 29 Jan 2017 17:11:58 +0200 From: Jarkko Sakkinen To: Jason Gunthorpe 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: <20170129151158.6gr4oxluj4tprbca@intel.com> References: <20170125210348.13790-1-jarkko.sakkinen@linux.intel.com> <20170125221245.GB713@obsidianresearch.com> <20170126112714.xvvvb72dybmfgitw@intel.com> <20170126183252.GA16502@obsidianresearch.com> <20170127064327.esussb6itanaqibq@intel.com> <20170127162416.GA32330@obsidianresearch.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170127162416.GA32330@obsidianresearch.com> 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 Fri, Jan 27, 2017 at 09:24:16AM -0700, Jason Gunthorpe wrote: > On Fri, Jan 27, 2017 at 08:43:27AM +0200, Jarkko Sakkinen wrote: > > On Thu, Jan 26, 2017 at 11:32:52AM -0700, Jason Gunthorpe wrote: > > > 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 > > > > Can I put your Reviewed-by? I would like to get this into 4.11. > > I'm not up to speed on the TPM2 parsing, but it looks OK based on your > description. > > Reviewed-by: Jason Gunthorpe > > Jason Thanks I applied this patch to master. /Jarkko