Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1806699ybn; Thu, 26 Sep 2019 02:29:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqyJBCIddlHMX8lphd308MRvY5Ojb1SG5s5E/P7IR1SnOssw4DP4mNGy4VVTISslbiQKuz3l X-Received: by 2002:a50:bb22:: with SMTP id y31mr2581257ede.58.1569490191797; Thu, 26 Sep 2019 02:29:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569490191; cv=none; d=google.com; s=arc-20160816; b=GyZd55/zBiEWxv1o58lD6eWeuUKzzC7x5WNhebCnU/IT+tudnBGlczM6AvXO7ZcXFl VE0/y6T/1XNy0QaqsCnjrbT7dLDDIGNyOgpEIki+ulniijA8RvoY+ioxpkzpj/FAVCy2 6C2r2Jt3NYXGb6bhkFAyyeip1V5+HuChfoo2wPA2ttxyP8xHVukMNkVHduSPAGS77jE5 nGJTZVGWEN4hYJpqynPcpzrWrxZrpFkXPEXenGQJcE2tHtH+JXGdu+TbPrH0PTZdcnFa fir2TPwYFoYZ7Ig7xj5LIMR2EvYW/M6kEZEOt32v2fEgRZsVUPT6wqaTq+qakTlI4/id 4xEQ== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=mZUN6jHh0xlKw8oMLRRRyVk94bYwAKTIOl/ee6BvjdE=; b=Pfsa6dX2eJlenpyFwuKa9SAyov4w+hZcCr/q1DfdIOSLypnSKUCpLXkE8Y+x3t9JX+ M9xvELWO8Edq8FispjokZd7cXMePxkUat2Qvob+uXGDAnSkFZnjYhrqe1rFYnsopIOO0 K0TBqafrBFpVcfApmKP5/dzEAcmmDZlItzn/oiUSaHxxow19MrvSMPtn6UE7zmV71koB qRXKez+uZ/S1QKkVFFl8x6aUHGVSjger+dPRv3t+aJ1jLjjdap17WMefvxsPqV8SwEqt OitJLUF11/P6WbR6GltYKyBYW/kxCnJIr8UQohzFckH6KNmhD6ugehYpFdmG6z3QoD6T 3Waw== 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 qo6si667567ejb.386.2019.09.26.02.29.27; Thu, 26 Sep 2019 02:29:51 -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 S2390164AbfIYKjK (ORCPT + 99 others); Wed, 25 Sep 2019 06:39:10 -0400 Received: from mga03.intel.com ([134.134.136.65]:60742 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389655AbfIYKjK (ORCPT ); Wed, 25 Sep 2019 06:39:10 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Sep 2019 03:39:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,547,1559545200"; d="scan'208";a="364285173" Received: from dariusvo-mobl.ger.corp.intel.com (HELO localhost) ([10.249.39.150]) by orsmga005.jf.intel.com with ESMTP; 25 Sep 2019 03:38:57 -0700 Date: Wed, 25 Sep 2019 13:38:54 +0300 From: Jarkko Sakkinen To: Jerry Snitselaar Cc: linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-integrity@vger.kernel.org, Matthew Garrett , Ard Biesheuvel Subject: Re: [RFC PATCH] tpm: only set efi_tpm_final_log_size after successful event log parsing Message-ID: <20190925103854.GC6256@linux.intel.com> References: <20190918191626.5741-1-jsnitsel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190918191626.5741-1-jsnitsel@redhat.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 18, 2019 at 12:16:26PM -0700, Jerry Snitselaar wrote: > + if (tbl_size < 0) { > + pr_err("Failed to parse event in TPM Final Event log\n"); FW_BUG? > + goto calc_out; > + } > + > memblock_reserve((unsigned long)final_tbl, > tbl_size + sizeof(*final_tbl)); > - early_memunmap(final_tbl, sizeof(*final_tbl)); > efi_tpm_final_log_size = tbl_size; > > +calc_out: > + early_memunmap(final_tbl, sizeof(*final_tbl)); out_calc > out: > early_memunmap(log_tbl, sizeof(*log_tbl)); > return ret; > -- > 2.23.0 > /Jarkko