Received: by 2002:a4a:301c:0:0:0:0:0 with SMTP id q28-v6csp1053097oof; Tue, 25 Sep 2018 07:43:25 -0700 (PDT) X-Google-Smtp-Source: ACcGV62hUQj5yNjd5rsteLRGvc4PYMMk49zbHOK97HgB8uDmoXzAJwT7NMgYvfaCnxWfcGJG/aqX X-Received: by 2002:a65:40cd:: with SMTP id u13-v6mr1404236pgp.334.1537886605578; Tue, 25 Sep 2018 07:43:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537886605; cv=none; d=google.com; s=arc-20160816; b=sfv+y7cKoj7mQp5QXhxi0dxu3eLxA+feNKjMV3ojq8vK+Dt9jYr9EfZWJEkdV59RU6 CIe+9gVmRx0wOSDW09yEsCE3ZH8POGakOgXmFDTT1JVFp8ArMwnTJRRZgfmvLgFpgRDN o0aXoGZj2c0SRH02GR9G20R7KdcFufzTV0McS5D+mQeZAiAhs8Xf5LXcYWVE+oi1H7PG B/+tnVt5y3wRUTG3ZrJ/BpIny+dYYbQS65OscBFDNiLcfOUpetie+H0h9TWUQXXLpCh8 YIvVg1tXgjV3pHXbnS2/PRod3GiXrBUEdZGlhL/kK5tOJZNTI8ooj8vSc244Zr3z/ch/ 3V6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:date:cc:to:from:subject :message-id; bh=F7sC2F4ZFzUywhmsWsd3Z8fi6stUoa6VFy+6Dp7lS6g=; b=eSebntZfZ5Oq2qXCNzcSy5Fputan6bR/ARxHWJcexeDN5laa+WpINwC4mgEGEkzrEP ATxVR8tU0WkBrQizFNt7y7Vqok048Ml68IbWZaUHUeN3KyzGv7QeA0f1XoWv6juisF/d cfjlwXumYQSIKUCSrtrYAjPj4iQo4Fm+bQ2Pq09hQ5lb68BZvU6fZboO0dvZFTlz+328 LQX/ugcfHUvstOVlCM0bWgPVhtlM20V2byN1gOmHtDGjtnVaeocGq5PNjXxH7rMk07pV frUycN9UeedSWPGlvI7AEGlmACw3Hgl9uxgxMWVjYTAP5azA/oOdCL8nh+uacFiBPubT MB8w== 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 gn24si2570764plb.43.2018.09.25.07.43.09; Tue, 25 Sep 2018 07:43:25 -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 S1729459AbeIYUtv (ORCPT + 99 others); Tue, 25 Sep 2018 16:49:51 -0400 Received: from mga12.intel.com ([192.55.52.136]:1281 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729272AbeIYUtv (ORCPT ); Tue, 25 Sep 2018 16:49:51 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Sep 2018 07:42:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,302,1534834800"; d="scan'208";a="94666955" Received: from thomasvo-mobl2.ger.corp.intel.com ([10.252.53.212]) by orsmga002.jf.intel.com with ESMTP; 25 Sep 2018 07:41:53 -0700 Message-ID: Subject: Re: [PATCH v4 21/21] tpm: use u32 instead of int for PCR index From: Jarkko Sakkinen To: Tomas Winkler , Jason Gunthorpe Cc: Alexander Usyskin , Tadeusz Struk , linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 25 Sep 2018 17:41:52 +0300 In-Reply-To: <20180921135820.20549-22-tomas.winkler@intel.com> References: <20180921135820.20549-1-tomas.winkler@intel.com> <20180921135820.20549-22-tomas.winkler@intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.1-2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2018-09-21 at 16:58 +0300, Tomas Winkler wrote: > The TPM specs defines PCR index a positive number, there is > no reason to use a signed number and it's also a possible security > issue as currently no functions check for a negative index, > which my into 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 I think I barked something about this in prev version but after giving some thought. I think this a good change (more exact API). Reviewed-by: Jarkko Sakkinen /Jarkko