From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3FF0C636C7 for ; Thu, 15 Jul 2021 18:09:24 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E0E5660551 for ; Thu, 15 Jul 2021 18:09:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E0E5660551 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 18C4A81E1C; Thu, 15 Jul 2021 20:09:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="AsMfCA2h"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6431181FC6; Thu, 15 Jul 2021 20:09:19 +0200 (CEST) Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 58BD881D6C for ; Thu, 15 Jul 2021 20:09:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-ed1-x536.google.com with SMTP id w14so9384507edc.8 for ; Thu, 15 Jul 2021 11:09:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=a4RrsFeTioif4+fsoS96ZWJ85YaSkQLkA3BmM80do1w=; b=AsMfCA2hztFUTu0A/KqWRZYG5VvJsEkEvmx1Wqr8TfpvslcvSnrXRXrUrf824nR6J6 NKaXtbfto0CcKD1SGQqGtlx1E12EscPvjhztDYiOVzyo1K7a9obILxUym7VEwFiZ+nz1 peLX8W4a31fIp0X3HU9pUJIK4VSAwDEGjGs4ct+5W8xCLKCHRNRBgI0wvuENf2j55IE9 vLcavXxQwAjulELyJ2EdyR5kHAQr9sBB43q8XMevOGuWKa/LwW9qx2SFqNdfcMUgbWVw LFYpZEnMPBQenv+O1d8Bq2SblHDSMgBvquiND2aACjDot2DcZzHLz7mF/5PIGZypEoPl e8fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=a4RrsFeTioif4+fsoS96ZWJ85YaSkQLkA3BmM80do1w=; b=aLYZJuoaSo//aapzi9+MvEh0KWi5RlBmYIl9WrnXp0KBheHnvuBjgS3mfp87uN5tjE Nj2TN2H4uRBOwR4sNpN/xmzUdkOvv2zC+/ej8697LWi9p2pfKHDLEfNZV/O4oZikCzm/ b/Z56K1PcZGmapCvpOHXdrCfcftqqPr0co1mFtHExYLAbnKY/lQec/nFepPRVYS3XFmd egTIE+FWxb6Epdd6adJGf6sVuvBGcxA0iz4cqTNBp2fAtO6C3KJNO0U+RvCMwSBl9aQ6 S07jFaV9CVlDjbdKhCSb8+FYsMxgOwZfAhxXscXK036LTkVb5DKW7GZHuK38Is9npoJw HXSg== X-Gm-Message-State: AOAM531jejPdVf8jp7mDFp6ATeTXmimI/+ughIPKqmXwVuHx42z0c8t/ MtBM/JUYe8fEpL+fmkycWgMhZQ== X-Google-Smtp-Source: ABdhPJy0FLswBtOTeRSl9Gu/UUxy6YieiTcKtIZ+9R4gqRSB4F8tMkp9H3DSD0OLFILnu17x4VBBzQ== X-Received: by 2002:a05:6402:4314:: with SMTP id m20mr8747429edc.71.1626372556030; Thu, 15 Jul 2021 11:09:16 -0700 (PDT) Received: from enceladus (ppp-94-66-243-35.home.otenet.gr. [94.66.243.35]) by smtp.gmail.com with ESMTPSA id m26sm664957edf.4.2021.07.15.11.09.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jul 2021 11:09:15 -0700 (PDT) Date: Thu, 15 Jul 2021 21:09:13 +0300 From: Ilias Apalodimas To: Simon Glass Cc: U-Boot Mailing List , Thirupathaiah Annapureddy , Heinrich Schuchardt Subject: Re: [PATCH 5/9] sandbox: tpm: Finish comments for struct sandbox_tpm2 Message-ID: References: <20210705154849.2083972-1-sjg@chromium.org> <20210705154849.2083972-6-sjg@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210705154849.2083972-6-sjg@chromium.org> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On Mon, Jul 05, 2021 at 09:48:45AM -0600, Simon Glass wrote: > Tidy up the missing comments for this struct. > > Signed-off-by: Simon Glass > --- > > drivers/tpm/tpm2_tis_sandbox.c | 20 ++++++++++++++++---- > 1 file changed, 16 insertions(+), 4 deletions(-) > > diff --git a/drivers/tpm/tpm2_tis_sandbox.c b/drivers/tpm/tpm2_tis_sandbox.c > index 24c804a5645..5e0bd304699 100644 > --- a/drivers/tpm/tpm2_tis_sandbox.c > +++ b/drivers/tpm/tpm2_tis_sandbox.c > @@ -45,19 +45,31 @@ static const u8 sandbox_extended_once_pcr[] = { > 0xea, 0x98, 0x31, 0xa9, 0x27, 0x59, 0xfb, 0x4b, > }; > > +/* > + * Information about our TPM emulation. This is preserved in the sandbox > + * state file if enabled. > + * > + * @init_done: true if open() has been called > + * @startup_done: true if TPM2_CC_STARTUP has been processed > + * @tests_done: true if TPM2_CC_SELF_TEST has be processed > + * @pw: TPM password per hierarchy > + * @pw_sz: Size of each password in bytes > + * @properties: TPM properties > + * @pcr: TPM Platform Configuration Registers. Each of these holds a hash and > + * can be 'extended' a number of times, meaning another hash is added into > + * its value (initial value all zeroes) > + * @pcr_extensions: Number of times each PCR has been extended (starts at 0) > + * @nvdata: non-volatile data, used to store important things for the platform > + */ > struct sandbox_tpm2 { > /* TPM internal states */ > bool init_done; > bool startup_done; > bool tests_done; > - /* TPM password per hierarchy */ > char pw[TPM2_HIERARCHY_NB][TPM2_DIGEST_LEN + 1]; > int pw_sz[TPM2_HIERARCHY_NB]; > - /* TPM properties */ > u32 properties[TPM2_PROPERTY_NB]; > - /* TPM PCRs */ > u8 pcr[SANDBOX_TPM_PCR_NB][TPM2_DIGEST_LEN]; > - /* TPM PCR extensions */ > u32 pcr_extensions[SANDBOX_TPM_PCR_NB]; > }; > > -- > 2.32.0.93.g670b81a890-goog > Acked-by: Ilias Apalodimas