From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com ([192.55.52.88]:28276 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726748AbeJBHjM (ORCPT ); Tue, 2 Oct 2018 03:39:12 -0400 Date: Tue, 2 Oct 2018 03:58:37 +0300 From: Jarkko Sakkinen To: Tomas Winkler Cc: Jason Gunthorpe , Nayna Jain , Alexander Usyskin , Tadeusz Struk , linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 21/21] tpm: use u32 instead of int for PCR index Message-ID: <20181002005837.GJ23753@linux.intel.com> References: <20180928223035.14471-1-tomas.winkler@intel.com> <20180928223035.14471-22-tomas.winkler@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20180928223035.14471-22-tomas.winkler@intel.com> Sender: linux-integrity-owner@vger.kernel.org List-ID: On Sat, Sep 29, 2018 at 01:30:35AM +0300, Tomas Winkler wrote: > The TPM specs defines PCR index as a positive number, and there is > no reason to use a signed number. It is also a possible security > issue as currently no functions check for a negative index, > which may become a large number when converted to u32. > > Adjust the API to use u32 instead of int in all PCR related > functions. > > Signed-off-by: Tomas Winkler > Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen /Jarkko