Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2308212ybi; Thu, 4 Jul 2019 08:34:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqzlk2bjrOyA7HOxCkRysJQq776iisMk1utVxsfKAMKd+ZrDHunYBr7ZQkNk32G2oWEc46yh X-Received: by 2002:a17:90a:f488:: with SMTP id bx8mr155836pjb.91.1562254466880; Thu, 04 Jul 2019 08:34:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562254466; cv=none; d=google.com; s=arc-20160816; b=NoAfE2zC2P7Aq7//40WtiwaDD9bwYXnPXyQZc8tmfx/C2KOkgndu+uCJnr5NmpL092 Od+kJt8oXYuwGuCYqbWdrk4YwG4MQSFs0848A23M6A0yAYSlDMpC21BZxhjKZfPejpLs gRvCfisDdN7GTNcAYYafytqH52mERR7MEuUlPA8CmFSHcKJVPGkBvuI7SPFZDfzVaay7 wUYTv+tJJAJASskN5g5nJOFRWWKE+bRCuoQEdDA1GFmdAvY8JK8RDFfyrIVUFCx0MOV9 1H5LTrW6RCQ7DfBBHkSEN1ZSnroIVI9zCjRUOnc8C7ve2mVf6DVL7DygQxc9tB0vidcj FI3w== 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:message-id:subject:cc:to:from :date; bh=XselMFDp2neORZEwGvQxm1q0sysnVpkixarhjE2AWOc=; b=O7sG1VzUKz6LmcaMG/qvANHNyeWiBC8y3OY2UujdEV3iq5F5OAYu7Xo1USOh5XlQh3 Yo3xUuaxj9WphTCfJWITfkzzlcbNOEK9QQNuZU/7jgzU/OkD3ORbpFPKLT/j2glbrqPj ztEqy+A+jPG+kWq6WJL13KIHq1rDh6JT1FmHuf87aFOVdGdH0nk8mMOE6iA8Uy2/LpXg 1mO1TTCTgpe8RBHCiIXlOdUbSW3qwk8FP42/AVMNhJkBuxZ6qtzKFF2lSrt+eTppT374 AS0zZIy3PdtZELhuJI3jpIMqn1oH4yJP9pSN5UNOxMQuf36PnBDQM6up/Ow4WGKkk071 gUQA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z142si5863276pfc.128.2019.07.04.08.34.11; Thu, 04 Jul 2019 08:34:26 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727812AbfGDPce convert rfc822-to-8bit (ORCPT + 99 others); Thu, 4 Jul 2019 11:32:34 -0400 Received: from mx2.suse.de ([195.135.220.15]:57420 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727462AbfGDPcd (ORCPT ); Thu, 4 Jul 2019 11:32:33 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 66563AF81; Thu, 4 Jul 2019 15:32:32 +0000 (UTC) Date: Thu, 4 Jul 2019 17:32:31 +0200 From: Michal =?UTF-8?B?U3VjaMOhbmVr?= To: Sachin Sant Cc: Nayna Jain , linux-kernel@vger.kernel.org, Jarkko Sakkinen , Jason Gunthorpe , Mimi Zohar , linux-integrity@vger.kernel.org, George Wilson , linuxppc-dev@lists.ozlabs.org, Peter Huewe Subject: Re: [PATCH] tpm: fixes uninitialized allocated banks for IBM vtpm driver Message-ID: <20190704173231.27365b51@kitsune.suse.cz> In-Reply-To: <0EDE02C7-3716-47A2-B7B0-007025F28567@linux.vnet.ibm.com> References: <1562211121-2188-1-git-send-email-nayna@linux.ibm.com> <1562241547.6165.81.camel@linux.ibm.com> <0EDE02C7-3716-47A2-B7B0-007025F28567@linux.vnet.ibm.com> Organization: SUSE Linux X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.31; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 4 Jul 2019 19:26:36 +0530 Sachin Sant wrote: > > On 04-Jul-2019, at 5:29 PM, Mimi Zohar wrote: > > > > On Wed, 2019-07-03 at 23:32 -0400, Nayna Jain wrote: > >> The nr_allocated_banks and allocated banks are initialized as part of > >> tpm_chip_register. Currently, this is done as part of auto startup > >> function. However, some drivers, like the ibm vtpm driver, do not run > >> auto startup during initialization. This results in uninitialized memory > >> issue and causes a kernel panic during boot. > >> > >> This patch moves the pcr allocation outside the auto startup function > >> into tpm_chip_register. This ensures that allocated banks are initialized > >> in any case. > >> > >> Fixes: 879b589210a9 ("tpm: retrieve digest size of unknown algorithms with > >> PCR read") > >> Signed-off-by: Nayna Jain > > Reviewed-by: Mimi Zohar > > Thanks for the fix. Kernel boots fine with this fix. > > Tested-by: Sachin Sant > Tested-by: Michal Suchánek Thanks Michal