Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8845352imu; Tue, 4 Dec 2018 15:27:10 -0800 (PST) X-Google-Smtp-Source: AFSGD/XJFx3nWYhGY2h1wrEi1pgysMuTCn1KH/Wq4edtLoSpAY/AuzA7h5/eWLualg1vatAkitoM X-Received: by 2002:a63:ba19:: with SMTP id k25mr18352642pgf.194.1543966030524; Tue, 04 Dec 2018 15:27:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543966030; cv=none; d=google.com; s=arc-20160816; b=J8JVd0qoIR2xA5XCDuT3zR++4GCkrEHMaI7iJu3UX4vcUC58er9G5t/gqZIJvFc3Ez 05pQW0tqqvEX8s+bJjJhNslQ+/K56XHgT/NOKQehlDHgraDBjBoTWQiV+RLwBtYnVLqA p4YiW5FTA+pd9WY+GJA05ADO84QPPHbt3kq26oPJhhHvuNwUeY6h7FSGZaTHO80wxE+d 7QB5kz1b/jtseaOMNcpRrEo/xy/XxFXlstJzMxkY+asbczWsO2dYGVTMOfgFzhFWjtWs oO+iNyu6Y0CesVDtjY0VGEvC6nVGERXJVzcKyNO4YxbnyRcCm+z7HJX7JnxINGCxTOs8 rZWQ== 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=xk351jCZZ/QyktLI45IbXdHDN8KECrfDpJRQSh5qb8w=; b=alvIY/oin4lvKsDYuF0DxApMuPppwqyQ8vwmyK3rvqwG2uHwSdUHQIffYPTkT6hjO2 DWkgnC+3yuvTG2BJ2++bGFBGjknwCBBdMPJ4hWPKIhkiHy1kO6fMDrZqlFa8bVNX/AA0 TPy/eaCZCbvZ4CHKiO6eLmME5lsQFAFY5xrikeUXnIIDD6DOLLPaeFqxFbKsJy+t8Sgq BRsoyUtRdMqNt/CLL1MwDqEkX8xOHBA63/jWJXb0QEgH6Y3HTEysMWTL1ZILR6KKD3lK svMqfVCGGpjJGFybIxSQWYJLbblGr6zR0Eqat/nur/KIewx8M2Wjr8RQYEmlh8DzUz/O hLiA== 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 w2si15113822pgp.546.2018.12.04.15.26.54; Tue, 04 Dec 2018 15:27:10 -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 S1726533AbeLDX0S (ORCPT + 99 others); Tue, 4 Dec 2018 18:26:18 -0500 Received: from mga14.intel.com ([192.55.52.115]:39231 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725906AbeLDX0R (ORCPT ); Tue, 4 Dec 2018 18:26:17 -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 fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Dec 2018 15:26:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,316,1539673200"; d="scan'208";a="107020318" Received: from jsakkine-mobl1.jf.intel.com (HELO localhost) ([10.24.8.183]) by fmsmga008.fm.intel.com with ESMTP; 04 Dec 2018 15:26:17 -0800 Date: Tue, 4 Dec 2018 15:26:16 -0800 From: Jarkko Sakkinen To: Roberto Sassu Cc: zohar@linux.ibm.com, david.safford@ge.com, monty.wiseman@ge.com, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, silviu.vlasceanu@huawei.com Subject: Re: [PATCH v6 2/7] tpm: add _head suffix to tcg_efi_specid_event and tcg_pcr_event2 Message-ID: <20181204232616.GB1233@linux.intel.com> References: <20181204082138.24600-1-roberto.sassu@huawei.com> <20181204082138.24600-3-roberto.sassu@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181204082138.24600-3-roberto.sassu@huawei.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 Tue, Dec 04, 2018 at 09:21:33AM +0100, Roberto Sassu wrote: > TCG defines two structures, TCG_EfiSpecIDEventStruct and TCG_PCR_EVENT2, > which contain variable-sized arrays in the middle of the definition. > > Since these structures are not suitable for type casting, this patch > removes structure members after the variable-sized arrays and adds the > _head suffix to the structure name, to indicate that the renamed structures > do not contain all fields defined by TCG. > > Lastly, given that variable-sized arrays are now in the last position, and > given that the size of the arrays cannot be determined in advance, this > patch also sets the size of those arrays to zero and removes the definition > of TPM2_ACTIVE_PCR_BANKS. > > Signed-off-by: Roberto Sassu Thank you, brings up a lot of clarity. Reviewed-by: Jarkko Sakkinen /Jarkko