Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp40002ybi; Thu, 11 Jul 2019 14:16:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqwukc/ObSKKhcYCSVC14kf8eQVh1bY4OJpZOcmuzkgXF0BdgRTrN5WINcSGq5Dnb6oID7Sy X-Received: by 2002:a65:6281:: with SMTP id f1mr6193953pgv.400.1562879785947; Thu, 11 Jul 2019 14:16:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562879785; cv=none; d=google.com; s=arc-20160816; b=nlLZEVpG+ymfs9U9oGWyOUTiHDmGVcv/t054OkMuatAYCu7JJKGRKPs5lPQaBPTbH4 ZG5q5DCYfIpoNBtY3PXGOBZricbiXSchxc+Jw4EOO6ar2wmRLWqp8vygt9c9rMGazbHn EdNof7LbU65Q2g1x8wIZzCIyG1bYzODxIAhfA+m0CIv8f4NNHmL2IPgNVcVN+cJO6DbD WaqsVutQ8q/pmTpr/CTHhfZwaaH+1WF7Nf+3b40civC09ZClBGU6uuc02ryLJTkha6CJ B1t5hgrGvLveuQSWzBfAF+yAOMbo7VLz6R+Non4vD1TYS5CrudfNezNiFb6uzJk6OcIv N9Iw== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=3qjzw7RLoSOv2pAaDo/Z8mKz4ZR24Gw1aI1EuIY7M74=; b=vmAHoTERmjJJLg54mB+GKiIyaa4mNtpTfsPSNpuNs9foWYZpXibePZHhcroO1yvRNR 4o1XnPVd2b+9/sB1xQCEwsSoEmmslzqFZFjbcYkiRcwC1cIrvXrYoiB7UxVRjM4WWZkY D7DkFu4z+3rYMyJfpSZ4W/y6E1dloxi/XofBM9CIyJ7HSPiGhLnkEZQQh/rt5AoLfWKI l2Q3d2M0CiS3Qhqsf8ZEk1SBHove9YPp/VruAVYja1FcbfmKyWa6ymjttXJFSnX/PbHu 3eQXI3PZrqhkm6GiXfJtDcD6jM+IQYhqteYokppKgVtz2mKRl1w+5DSWsEFqz6LwQ2Fe w6Sw== 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 x20si6268900pgf.118.2019.07.11.14.16.09; Thu, 11 Jul 2019 14:16: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 S1728809AbfGKVOF (ORCPT + 99 others); Thu, 11 Jul 2019 17:14:05 -0400 Received: from mga05.intel.com ([192.55.52.43]:37743 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726880AbfGKVOF (ORCPT ); Thu, 11 Jul 2019 17:14:05 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jul 2019 14:14:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,480,1557212400"; d="scan'208";a="193537485" Received: from mmoerth-mobl6.ger.corp.intel.com (HELO localhost) ([10.249.35.82]) by fmsmga002.fm.intel.com with ESMTP; 11 Jul 2019 14:14:00 -0700 Date: Fri, 12 Jul 2019 00:13:57 +0300 From: Jarkko Sakkinen To: Nayna Jain Cc: linux-integrity@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Jason Gunthorpe , Sachin Sant , George Wilson , Michael Ellerman , Michal Suchanek , Peter Huewe , Mimi Zohar Subject: Re: [PATCH v3] tpm: tpm_ibm_vtpm: Fix unallocated banks Message-ID: <20190711211357.77bl2ixfnplmumcl@linux.intel.com> References: <1562861615-11391-1-git-send-email-nayna@linux.ibm.com> <20190711202824.dfhzxcqtk5ouud5n@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190711202824.dfhzxcqtk5ouud5n@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 11, 2019 at 11:28:24PM +0300, Jarkko Sakkinen wrote: > On Thu, Jul 11, 2019 at 12:13:35PM -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") > > Reported-by: Michal Suchanek > > Signed-off-by: Nayna Jain > > Reviewed-by: Mimi Zohar > > Tested-by: Sachin Sant > > Tested-by: Michal Such?nek > > Reviewed-by: Jarkko Sakkinen Thanks a lot! It is applied now. /Jarkko