Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3229911ybi; Fri, 5 Jul 2019 04:05:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqwcsi3fp+12pMObYHViRCR3Sb0kM7OtHmsgKUKrWKKrXzBL0sh6SzOa0ebd/ta6QJSeB8eC X-Received: by 2002:a17:90a:2648:: with SMTP id l66mr4749515pje.65.1562324735615; Fri, 05 Jul 2019 04:05:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562324735; cv=none; d=google.com; s=arc-20160816; b=r45Snxw5Kf46YbAUHr5iif2a8L1v8ugx4Sp34l4XKJ8AXYEccfrnCwpWRJLqlNucg4 YQmd2djOtutjIH0aPaGIepHrBCpfp7KeQ5VbAI04Pi661HbJgv9Vbgxmc04EZjbDYTTt c7PQJCbAqCcBZtev4tx03Yhps4ohYJtHlum+X9RwgYA0E+kD21F+H+gPYyS0rL0T8A2l Wr2YkwIqYVnkmf4JHayjO5C3sBpy5LepZHIJ0nITgN4wSW5sKHvdYU9gtO1q6+Bau6rl 8zxVnUjFFAGJI8NeYXg2U+Nz+mvFxCcPLNNC+yqX6Awnk0mB0dc8N749ejY6gS1FwEny VKIA== 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 :user-agent:organization:references:in-reply-to:date:cc:to:from :subject:message-id; bh=o01cRXbwSZmoKtV73eVU0ROO/q9BPnLxU9olVzeH0eM=; b=pF1EVtfO1gUFjhJjn08pwDGl1FRf1fpQgoleBew41vYut4y04qs8jWOGXNcyHFzogb d+zrmKeU/AwVg3WegJhEkmgQC9nr/mj5yoxUII5d2lruPeqsUeitwdUyKVN2hwDR+zHG EtIxMQtpJQ2XYZieQvHCsSe3IP6MVcstPgRJjQ8uzsh9urZhXNKkv309eNIsF773sg+g HFBbvF5osypYph6/GqTN6xYNdDgnzTxT6IpozevI+2kdxuGbbUfSLyyuy5Qge4c6SuOT sUFrEF27AfmrLPmnBT/ms76wxSsOub262vj+mXhrxC0vEOYbRMhplbNcXQeU/IIxox9/ FuSA== 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 w66si6255276pfw.21.2019.07.05.04.05.20; Fri, 05 Jul 2019 04:05:35 -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 S1727808AbfGELCM (ORCPT + 99 others); Fri, 5 Jul 2019 07:02:12 -0400 Received: from mga17.intel.com ([192.55.52.151]:43279 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726116AbfGELCM (ORCPT ); Fri, 5 Jul 2019 07:02:12 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Jul 2019 04:02:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,454,1557212400"; d="scan'208";a="169647925" Received: from jsakkine-mobl1.tm.intel.com ([10.237.50.189]) by orsmga006.jf.intel.com with ESMTP; 05 Jul 2019 04:02:07 -0700 Message-ID: Subject: Re: [PATCH] tpm: fixes uninitialized allocated banks for IBM vtpm driver From: Jarkko Sakkinen To: Nayna Jain , linux-integrity@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Michal Suchanek Cc: linux-kernel@vger.kernel.org, Peter Huewe , Jason Gunthorpe , Michael Ellerman , Mimi Zohar , Sachin Sant , George Wilson Date: Fri, 05 Jul 2019 14:02:06 +0300 In-Reply-To: References: <1562211121-2188-1-git-send-email-nayna@linux.ibm.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2019-07-05 at 13:42 +0300, Jarkko Sakkinen 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 > > Please add > > Reported-by: Michal Suchanek > > It is missing. Michal is there a chance you could try this out once > Nayna send a new version? Hey, I saw Michal's tested-by. I can do that minor reorg cosmetic bits myeslf and add Micha's tag. Some issue with the network but I'll push a commit soonish. /Jarkko