Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3224409ybi; Fri, 5 Jul 2019 04:01:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqyVrGiYh0oI8n4ZcV7UiK3gRLpFdQjICKbCLpICZxiCo0486zSZNatVQqAMEDaYwCZqYJCL X-Received: by 2002:a17:90a:342c:: with SMTP id o41mr4767861pjb.1.1562324467640; Fri, 05 Jul 2019 04:01:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562324467; cv=none; d=google.com; s=arc-20160816; b=x9XruBg//w+XwRrkZgb6rpWlKYXZjfl9Rp+oHNfgs47uB9asXqjvqGqr/Misft7OJE Z9o5zx9AO+xxIlHxj+D5YCUUZaX6gtL2nVXF+Ch4IQr0JYNh9dGqPXBZIz1YZW49xPkW zN6I0L3qGIcHS52Wr2bBBbI5msPjqVB1kLY3Tm/mMM9V0nK/0sOb6POACJ5m8lETRLkb MwrTEcmlytOIsb5HwJGSUFD7U1rKPaCwf6EhQh3a5JCrc2pzKYQ9knPwPZPt1MZpYHZM smGroShCRQhH/UZohqkd4VCO7Us/4NrsfP8XxtJPRPixFB7hcY8KAtg16ZQL6jjrYjqr +I3Q== 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 :references:in-reply-to:message-id:subject:cc:to:from:date; bh=lfkObalUCJrhMcBWar7oPEN9MZGa43habkXrHuSisL8=; b=DV5WdqZut4brNzAbimw3MUwYarOV53WrpQwLP6wdk9wsN/+53RQlr8ZXJsgvosQ+Ko umKeRLIa+tnq5hP2PtmulUsfjmVIOANMSoPYtKKsIGHlynWoSoko7rkiTaNqCCfggws6 IZ559xBFtqR9iF4+55Y9ZMf65MZswD/kY/IPa5zF7PtnLCrHZhkb9cz/qVXDsLhTToxZ QucZUgBrYYjuc/6Nf11TfCpE0qsNbk0EzWiWfANHmus3Mj00im1UjNyZSqaMV76g3q59 oDdC47ePhpGCPnrEy0KeYlo3w+9L5VM8FXxFtYvLHDlZrfsvSIinR8IOOIMmNoy33PZZ BG2w== 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 b11si2672143plz.307.2019.07.05.04.00.52; Fri, 05 Jul 2019 04:01:07 -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 S1728606AbfGEKwC (ORCPT + 99 others); Fri, 5 Jul 2019 06:52:02 -0400 Received: from mx2.suse.de ([195.135.220.15]:49132 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727825AbfGEKwC (ORCPT ); Fri, 5 Jul 2019 06:52:02 -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 2E458AD8A; Fri, 5 Jul 2019 10:52:01 +0000 (UTC) Date: Fri, 5 Jul 2019 12:51:58 +0200 From: Michal =?UTF-8?B?U3VjaMOhbmVr?= To: Jarkko Sakkinen Cc: Nayna Jain , linux-integrity@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Sachin Sant , George Wilson , linux-kernel@vger.kernel.org, Mimi Zohar , Jason Gunthorpe , Peter Huewe Subject: Re: [PATCH] tpm: fixes uninitialized allocated banks for IBM vtpm driver Message-ID: <20190705125158.72f79929@naga> In-Reply-To: References: <1562211121-2188-1-git-send-email-nayna@linux.ibm.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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, 05 Jul 2019 13:42:18 +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? Should be easy to test. Without the patch the machine crashes on boot so it is quite obvious case. I have a few VMs with the vTPM available. Thanks Michal