Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1187012ybi; Tue, 16 Jul 2019 10:54:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqznbwOYLShu7zWnfxp5PTxtBEdQBiW99pkL5OwPJgmOdfPEhFm9jchku3CHC8jnJHJoMsLB X-Received: by 2002:a63:fb43:: with SMTP id w3mr2759267pgj.403.1563299678597; Tue, 16 Jul 2019 10:54:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563299678; cv=none; d=google.com; s=arc-20160816; b=NZjbPYtTjTAL6SstzVHCeMRIpI2Wh9WOvJt9y47YgMPP8P+wB1AUc/7qejy63NLh1I ZLEut9RYmfIRXpfqwAEixFpgaB2BldHhHoJOgxmvJx2LIjnOYf5oNIaZ6t5y3nEA53CX 0ExweJVv/cO0el0XxzS1pTHeTvhGuBQZn25wcbjm995SuwVoiSacflYrpXEPiyZv9Gk0 32hH3z/xYQ86AyRRjpUYxkrPTpG33RxzCtP0fQBEHGWA3mR8IRraWMPrmy222YwemfwM 2fOFtmWKuuB1y5GwPInmEO9QQhBNp4HP3zfaP98KDG2nhVaoq6/WlInL5V/6FfxqqaPh EzHQ== 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=NvSK1xsUec2gupYYCeIkfP3APlh4lCZocGaivhhlg/U=; b=qBz/YXxUShZd4Lg3FG3vPFRtznKqqlr0N0hKVcKicWiDpamKHfzWWUvqQUjlNfHrTp NG74zhPP7vQRMi6prh7xL8aHge7kiwkX77F1m3HGLscKCvMlmjPznILefrmUqyk7XnJr nN0M9IqAbqIXOETHOSs6I2SETXRh7CcjFG7tWxFHADu2qz9gz5SuNlURdPREZbh0yGSp HvxnM0OC9h8ia57NY8uWxuX/3a/MjiJNZ9anwCZEHzlaaqj8g0fx5TpMQhA2MeeqydfY pNCRQ8qTM/xZqzB8d1Xdq2I7KwezqZccIVdZzLbhVJ3kpjEE+TDPB4vK8XOtV7saajhh YWkw== 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 t70si20703273pgd.573.2019.07.16.10.54.21; Tue, 16 Jul 2019 10:54:38 -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 S2388299AbfGPRwl convert rfc822-to-8bit (ORCPT + 99 others); Tue, 16 Jul 2019 13:52:41 -0400 Received: from mx2.suse.de ([195.135.220.15]:51094 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728366AbfGPRwk (ORCPT ); Tue, 16 Jul 2019 13:52:40 -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 65944AC67; Tue, 16 Jul 2019 17:52:39 +0000 (UTC) Date: Tue, 16 Jul 2019 19:52:38 +0200 From: Michal =?UTF-8?B?U3VjaMOhbmVr?= To: Jarkko Sakkinen Cc: Nayna Jain , Sachin Sant , linux-kernel@vger.kernel.org, Mimi Zohar , Jason Gunthorpe , linux-integrity@vger.kernel.org, George Wilson , linuxppc-dev@lists.ozlabs.org, Peter Huewe Subject: Re: [PATCH v3] tpm: tpm_ibm_vtpm: Fix unallocated banks Message-ID: <20190716195238.79271980@kitsune.suse.cz> In-Reply-To: <20190711211357.77bl2ixfnplmumcl@linux.intel.com> References: <1562861615-11391-1-git-send-email-nayna@linux.ibm.com> <20190711202824.dfhzxcqtk5ouud5n@linux.intel.com> <20190711211357.77bl2ixfnplmumcl@linux.intel.com> Organization: SUSE Linux X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; 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 Fri, 12 Jul 2019 00:13:57 +0300 Jarkko Sakkinen wrote: > 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. Fixes the issue for me. Thanks Michal