From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751560AbdE3MHC (ORCPT ); Tue, 30 May 2017 08:07:02 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:37683 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750905AbdE3MHA (ORCPT ); Tue, 30 May 2017 08:07:00 -0400 Subject: Re: [Linux-ima-devel] [PATCH v2 4/5] keys, trusted: modify arguments of tpm_pcr_extend() From: Mimi Zohar To: Roberto Sassu , tpmdd-devel@lists.sourceforge.net Cc: linux-ima-devel@lists.sourceforge.net, linux-security-module@vger.kernel.org, keyrings@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 30 May 2017 08:06:01 -0400 In-Reply-To: References: <20170505142152.29795-1-roberto.sassu@huawei.com> <20170505142152.29795-5-roberto.sassu@huawei.com> <1496115337.3841.485.camel@linux.vnet.ibm.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.5 (3.20.5-1.fc24) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable x-cbid: 17053012-0012-0000-0000-0000023A7B16 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17053012-0013-0000-0000-000007520B44 Message-Id: <1496145961.3841.537.camel@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-05-30_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1705300230 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2017-05-30 at 09:36 +0200, Roberto Sassu wrote: > On 5/30/2017 5:35 AM, Mimi Zohar wrote: > > On Fri, 2017-05-05 at 16:21 +0200, Roberto Sassu wrote: > >> pcrlock() has been modified to pass the correct arguments > >> to tpm_pcr_extend(): the pointer of a tpm2_digest structure containing > >> a random value generated by tpm_get_random() and the size of the array (1). > > > > If the number of arguments is wrong, that means the patch that > > introduced the change is not bi-sect safe. (This comment is > > applicable to patch 5/5 too.) > > Jarkko (the TPM driver maintainer) asked me to not introduce > a new function to pass multiple digests, but to modify > the parameters of tpm_pcr_extend(). Since struct tpm2_digest is a static size, shouldn't we be able to compute the number of digests? Mimi