From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=FROM_EXCESS_BASE64, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93845C76195 for ; Tue, 16 Jul 2019 17:52:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6D7F3206C2 for ; Tue, 16 Jul 2019 17:52:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388356AbfGPRwl convert rfc822-to-8bit (ORCPT ); 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