Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp883034imm; Wed, 19 Sep 2018 08:23:11 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbhRhUF0TitHKi8glUT6HH83JBibfRCemIOijfpP0D8EnUB1dOVKPyckjEZontFQ0MNwgrV X-Received: by 2002:a63:fb07:: with SMTP id o7-v6mr32949582pgh.333.1537370591484; Wed, 19 Sep 2018 08:23:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537370591; cv=none; d=google.com; s=arc-20160816; b=NKHpvlIM/sI15CpzLDGBz+C8jlobBH3QFRpWw0KDFnND7p16xvE/TTWbErsjr7rSCS asJzxJT7xRaPLR2ats/QNlFyGvF5hHjHGXsPXIKIY07MMUgWXavmtJtOfSjdr3gn2dYv 0R7n3GMcuX4toQ4cBxRccnJiqsdcGWtETf+H5Df2Mrh22p9DpUn1ApekGo93+w05dH6M AZMRVBR+eDuMmP24ezA61f9DPvsE0bXbE9GV3NAImQfvViQmmpCnzINbpO978aQ7f+8D rgHbCFViSafoVsXoYLWRKfyjRtznlqLLj7QdrWrLJKPYKXWU9SawjAfM/+FUR1c9YM6T fBzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=2dGTx1oZK3Ef1gMztZ0xTLj3kbDrGOtbzDBwQLpYAWo=; b=H9WCRFxhbqT62EwKqEUN8vNlRwsqCz1iXYiuB6qsc9yLVz1ntwfoyPkNnGiG4pH1B1 kquwFAd4nqAfgXcLKGuzBMs4Ix14cgXzvDfyLSWWM4CyHoW85Gw4NlcojYyOUixTpHt6 O960OYzB4YOPEN/6NfrSYM5zG/tnq95DS2Bs5rfP9sEZxZidhBGphJbFp5QqZAqTROuU hpg2fXQnE8tyjv5pL1Nh6kknfl3OxKGsyT3tdXLeWqNu2GB1XGwogwoa/mUz0aHfYHOe hblES9/HbuXWQQtFm3iu0TIPZrdpub6YiCQyqEfuQ/7cERVW8D9HNgkT7Npt57jPp04i nHvg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s12-v6si22603336plr.120.2018.09.19.08.22.56; Wed, 19 Sep 2018 08:23:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732502AbeISVAt (ORCPT + 99 others); Wed, 19 Sep 2018 17:00:49 -0400 Received: from mga02.intel.com ([134.134.136.20]:64024 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732192AbeISVAt (ORCPT ); Wed, 19 Sep 2018 17:00:49 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Sep 2018 08:22:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,394,1531810800"; d="scan'208";a="87514665" Received: from pqueiros-mobl.ger.corp.intel.com (HELO localhost) ([10.249.37.13]) by fmsmga002.fm.intel.com with ESMTP; 19 Sep 2018 08:22:20 -0700 Date: Wed, 19 Sep 2018 18:22:19 +0300 From: Jarkko Sakkinen To: Tomas Winkler Cc: Jason Gunthorpe , Alexander Usyskin , Tadeusz Struk , linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 18/20] tpm: use u32 instead of int for pcr index Message-ID: <20180919152219.GK31076@linux.intel.com> References: <20180918093459.19165-1-tomas.winkler@intel.com> <20180918093459.19165-19-tomas.winkler@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180918093459.19165-19-tomas.winkler@intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 18, 2018 at 12:34:57PM +0300, Tomas Winkler wrote: > TPM pcr indices cannot be negative, also the tpm > commands accept u32 number as a pcr index. > > 1. Adjust the API to use u32 instead of int in all pcr related > functions. NAK. > 2. Rename tpm1_pcr_read_dev to tpm1_pcr_read() to match > the counterpart tpm2_pcr_read() I would accept this a separate commit (and it should be a separate). > 3. Remove redundant constants in tpm1_pcr_extend() function. > > Signed-off-by: Tomas Winkler /Jarkko