Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1582977imu; Wed, 16 Jan 2019 23:19:39 -0800 (PST) X-Google-Smtp-Source: ALg8bN4lTvgY7dWZJfPSGhV5pXyEKY6MhOAtbzEVdkWcsO8aVN8Bvbz/7GYrQgR78U9GTUyCzbfM X-Received: by 2002:a17:902:b40d:: with SMTP id x13mr14024052plr.237.1547709579780; Wed, 16 Jan 2019 23:19:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547709579; cv=none; d=google.com; s=arc-20160816; b=Q+ERpF8qOupLKkm3WFV+E8sCVx5fy6ctsOlf3eJD6q6VwjOUZNkTrQlUNoSjYVZZ2M a+tOGRFDu52CEn3LnqCwa31pFCKsFclRKmZnhQ/DcOVQx1v2fBdZaK3UHSh7SvaxB34k ga2OEXNwslSiADBX2vwyBEZVJx4uhwZfvLpMJjoQLHDid2S+lw1DhKMviQHUzwRMnNob AcwYujDSjNIU2rcXFwxWAHbWR6v5UbiNiFJV58YiIiYfrW08IlFjgSmWhyDJGbGdBdRM FHcbn+dsBdT8gwzliuK90CF3ychwloSuNTGrjuKtfLy6gXYUjZlogVBKL5vkEktB0zHW P5XA== 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=tOBouySK+SaVmbwI8L46W2QtoVxMinhyFTRSDfElpnQ=; b=wBBG2RKJuuwrAdq4mMUzJYX2sFd9nkNh7PFhYo9WEqYnMdIjmiXTxRHO2MGnXmjvpw VnBJIbMmbzDXNhga0ulmb2QUpJ9UDvaPyg7mwYllRttWt6y3atPc5T5v2JO725kKhmfm JdMqO4OtOhQauq5FrmagWQGXZYecOs+p1pd/WDf4YipJ10E8h/C2JtYBvkeLZ/VOMM6J Rtq2gBsTP7JHdYxFek5Z3ORIdC7+piDacJepiXBsV2V4iUg62p1eC+3VzcKc89blX5SS 9J8/e/y8yOq5qEHyet+rRBYo95onC7iLNXNv5GHhNyJbpdyXFQ2lqBEG2TrzmXau2PUF 26Dg== 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 n78si901027pfi.235.2019.01.16.23.19.24; Wed, 16 Jan 2019 23:19:39 -0800 (PST) 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 S1732972AbfAPWRh (ORCPT + 99 others); Wed, 16 Jan 2019 17:17:37 -0500 Received: from mga05.intel.com ([192.55.52.43]:31825 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729384AbfAPWRg (ORCPT ); Wed, 16 Jan 2019 17:17:36 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Jan 2019 14:17:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,487,1539673200"; d="scan'208";a="117282574" Received: from lhaqq1-mobl2.amr.corp.intel.com (HELO localhost) ([10.249.254.231]) by fmsmga008.fm.intel.com with ESMTP; 16 Jan 2019 14:17:31 -0800 Date: Thu, 17 Jan 2019 00:17:29 +0200 From: Jarkko Sakkinen To: Jia Zhang , nayna@linux.ibm.com Cc: peterhuewe@gmx.de, jgg@ziepe.ca, tweek@google.com, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] tpm/eventlog/tpm1: Fix off-by-1 when reading binary_bios_measurements Message-ID: <20190116221729.GI25803@linux.intel.com> References: <1547197173-52826-1-git-send-email-zhang.jia@linux.alibaba.com> <1547197173-52826-3-git-send-email-zhang.jia@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1547197173-52826-3-git-send-email-zhang.jia@linux.alibaba.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 Fri, Jan 11, 2019 at 04:59:33PM +0800, Jia Zhang wrote: > It is unable to read the entry when it is the only one in > binary_bios_measurements: > > 00000000 00 00 00 00 08 00 00 00 c4 2f ed ad 26 82 00 cb > 00000010 1d 15 f9 78 41 c3 44 e7 9d ae 33 20 00 00 00 00 > 00000020 > > This is obviously a firmware problem on my linux machine: > > Manufacturer: Inspur > Product Name: SA5212M4 > Version: 01 > > However, binary_bios_measurements should return it any way, > rather than nothing, after all its content is completely > valid. > > Fixes: 55a82ab("tpm: add bios measurement log") > Signed-off-by: Jia Zhang LGTM, Nayna? /Jarkko