Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp646756ybl; Fri, 31 Jan 2020 05:34:33 -0800 (PST) X-Google-Smtp-Source: APXvYqwdeC7zrs2N5heV2ZQHByZqi8+ZMB1e0EPaJbPxLJjoK0fBM+K67Cbh/DZmSKNZZhaOaVnn X-Received: by 2002:a9d:545:: with SMTP id 63mr7878727otw.285.1580477673376; Fri, 31 Jan 2020 05:34:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580477673; cv=none; d=google.com; s=arc-20160816; b=x4edFfUZdFqp9x1n1Pm85FVEBkujaZyeXI5xQd5pF1bSimoIEavfHCLT1g9xCROkJj N2UK+bGPdT7Dh6CcmDDjsbI+vv6D3p6hUOBO9r8dh4A76Dvx4Y4MhEVGGXv/E3+mA2N/ M9pFsWqaOO0MF+pPzbpzLk6ePhNF29jPr3J6cu9gk6OI09LaC/GXo4w1wWF5jLShPUUl n0YV/mAv4QCOoa9bcWQrjf+q1w2uJSw0ZqV4SW3lLuSz3ZBRMcTePLcoF8c51pkSuXQT b7js3YMgkE+tPdRK8cPuBkXVKNdKSd0LzgU4F0M9m1kxa3kYHdU8oCz4DQtpSv2eOqCt bBQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:references:in-reply-to:date:cc:to:from:subject; bh=O3RlgMWvucl7L9v6dlhSdNBnLu6rOYh/KfiwJwiEnyE=; b=lLtBtlxfpgLrgxX+PwHR498rV+tXrX381npxZNQztxYGzAp8D3HvXAh6l5LFDOJSmQ BJqIsXp5cVFOCsJAl8NGX8MvqOIckbXHZC8f8pKBwNUuKsc7NwuDZi0tAgT6HFxP8VwQ VUQDwb1WDD4Nn9dVmeZGI3G2ERmHl6PKTS8/P2f/bDen+hK5IHqK+SY/hsi/QERZtZ/s 3GF6PmnCav3MhNGGqkcvszSDCpDT/Wl2m80qmo/zylqdA3/MuRa/29fy+IGwkvXV1KSn qXpZvbZVohqB/rQ9f5E+ZaCIfh/44QkhvV3NfVXUZI8UzLT2w9EEcdLidKGgndhpWwVv o4Zg== 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p13si4738580otq.210.2020.01.31.05.34.21; Fri, 31 Jan 2020 05:34:33 -0800 (PST) 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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728667AbgAaNdV (ORCPT + 99 others); Fri, 31 Jan 2020 08:33:21 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:26640 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728614AbgAaNdV (ORCPT ); Fri, 31 Jan 2020 08:33:21 -0500 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 00VDU2WD029264 for ; Fri, 31 Jan 2020 08:33:20 -0500 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0b-001b2d01.pphosted.com with ESMTP id 2xve64jp2m-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 31 Jan 2020 08:33:19 -0500 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 31 Jan 2020 13:33:17 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 31 Jan 2020 13:33:14 -0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 00VDXDXa41943252 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 31 Jan 2020 13:33:13 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 137CBAE04D; Fri, 31 Jan 2020 13:33:13 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 96D83AE057; Fri, 31 Jan 2020 13:33:11 +0000 (GMT) Received: from localhost.localdomain (unknown [9.85.193.32]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 31 Jan 2020 13:33:11 +0000 (GMT) Subject: Re: [PATCH 1/8] tpm: initialize crypto_id of allocated_banks to HASH_ALGO__LAST From: Mimi Zohar To: Roberto Sassu , Jarkko Sakkinen , "james.bottomley@hansenpartnership.com" , "linux-integrity@vger.kernel.org" Cc: "linux-security-module@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Silviu Vlasceanu Date: Fri, 31 Jan 2020 08:33:10 -0500 In-Reply-To: <8c15cf66708a4d38916b8ca39f26b5f6@huawei.com> References: <20200127170443.21538-1-roberto.sassu@huawei.com> <20200127170443.21538-2-roberto.sassu@huawei.com> <50afe1f50297b02af52621b6738ffff0c24f1bdf.camel@linux.intel.com> <8c15cf66708a4d38916b8ca39f26b5f6@huawei.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: 8bit X-TM-AS-GCONF: 00 x-cbid: 20013113-0020-0000-0000-000003A5D948 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20013113-0021-0000-0000-000021FD933C Message-Id: <1580477590.6104.61.camel@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-01-31_03:2020-01-31,2020-01-31 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 clxscore=1015 suspectscore=0 adultscore=0 lowpriorityscore=0 phishscore=0 mlxscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 spamscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1911200001 definitions=main-2001310117 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2020-01-30 at 16:11 +0000, Roberto Sassu wrote: > > -----Original Message----- > > From: Jarkko Sakkinen [mailto:jarkko.sakkinen@linux.intel.com] > > Sent: Thursday, January 30, 2020 9:48 AM > > To: Roberto Sassu ; zohar@linux.ibm.com; > > james.bottomley@hansenpartnership.com; linux-integrity@vger.kernel.org > > Cc: linux-security-module@vger.kernel.org; linux-kernel@vger.kernel.org; > > Silviu Vlasceanu > > Subject: Re: [PATCH 1/8] tpm: initialize crypto_id of allocated_banks to > > HASH_ALGO__LAST > > > > On Mon, 2020-01-27 at 18:04 +0100, Roberto Sassu wrote: > > > chip->allocated_banks contains the list of TPM algorithm IDs of allocated > > > PCR banks. It also contains the corresponding ID of the crypto subsystem, > > > so that users of the TPM driver can calculate a digest for a PCR extend > > > operation. > > > > > > However, if there is no mapping between TPM algorithm ID and crypto ID, > > the > > > crypto_id field in chip->allocated_banks remains set to zero (the array is > > > allocated and initialized with kcalloc() in tpm2_get_pcr_allocation()). > > > Zero should not be used as value for unknown mappings, as it is a valid > > > crypto ID (HASH_ALGO_MD4). > > > > > > This patch initializes crypto_id to HASH_ALGO__LAST. > > > > > > Signed-off-by: Roberto Sassu --- > > > > Remarks: > > > > * After the subsystem tag, short summary starts with a capital lettter. > > * Missing fixes tag and cc tag to stable. > > * A struct called allocated_banks does not exist. > > * Please prefer using an imperative sentence when describing the action > > to take e.g. "Thus, initialize crypto_id to HASH_ALGO__LAST". > > Thanks. I will fix these issues in the next version of the patch set. Jarkko, I realize this is a TPM patch, but this patch set is dependent on it.  When this patch is ready, could you create a topic branch, which both of us could merge? thanks, Mimi