From patchwork Thu Dec 30 09:39:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ivanhu X-Patchwork-Id: 1574128 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=PPBofEfn; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=fwts-devel-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JPjtB1x8kz9s3q for ; Thu, 30 Dec 2021 20:40:01 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1n2rud-0006Kb-AA; Thu, 30 Dec 2021 09:39:55 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1n2rub-0006KU-Ls for fwts-devel@lists.ubuntu.com; Thu, 30 Dec 2021 09:39:53 +0000 Received: from canonical.com (unknown [175.182.110.232]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id B35123F117 for ; Thu, 30 Dec 2021 09:39:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1640857193; bh=g35IQXLc80d2Shkg4YeLTENunOUio6i0GCjH88dkCfw=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=PPBofEfntkjcWZ/TcARUXTTZDBmI4sFfUKPqLbMADyCf3acIMkRUftYud7isrG8av 5qNc2nnbCJ+nMrymiPykGC7uDFq4HlYK3jpnqmfFkqQ6DrLEuWFGl2hGWIDHfqDrvh wI5c/Xh7RX0HldCmekJOoxlhu8I7u3u3zUnWWQOQBPxtT4RfO7XhDIoOFTWhEmIFUL dDkriaC1YE9WeoxcDaBr+ZRbB1HUzRzf35gnnNwolIkswEToa8AnWX/qkibPhVqYhq Owpiv6y1jWk/8JZNO6uZJ2mastOEHumr9kShESszV/DqFp0im5AnWlqmexPM34lNAM +HoA2xkqmlMEA== From: Ivan Hu To: fwts-devel@lists.ubuntu.com Subject: [PATCH 1/2] lib: fwts_tpm.h: add new type definition Date: Thu, 30 Dec 2021 17:39:49 +0800 Message-Id: <20211230093950.31577-1-ivan.hu@canonical.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: "fwts-devel" The TCG PFP(TCG PC Client Platform Firmware Profile Specification) version 1.05 adds several new TPM event log type. Add supporting the new log type. Signed-off-by: Ivan Hu Acked-by: Alex Hung --- src/lib/include/fwts_tpm.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/include/fwts_tpm.h b/src/lib/include/fwts_tpm.h index ca96f971..302940fa 100644 --- a/src/lib/include/fwts_tpm.h +++ b/src/lib/include/fwts_tpm.h @@ -110,8 +110,13 @@ typedef enum { EV_EFI_ACTION = 0x80000007, EV_EFI_PLATFORM_FIRMWARE_BLOB = 0x80000008, EV_EFI_HANDOFF_TABLES = 0x80000009, + EV_EFI_PLATFORM_FIRMWARE_BLOB2 = 0x8000000a, + EV_EFI_HANDOFF_TABLES2 = 0x8000000b, + EV_EFI_VARIABLE_BOOT2 = 0x8000000c, EV_EFI_HCRTM_EVENT = 0x80000010, - EV_EFI_VARIABLE_AUTHORITY = 0x800000e0 + EV_EFI_VARIABLE_AUTHORITY = 0x800000e0, + EV_EFI_SPDM_FIRMWARE_BLOB = 0x800000e1, + EV_EFI_SPDM_FIRMWARE_CONFIG = 0x800000e2 } fwts_tpmlog_event_type; From patchwork Thu Dec 30 09:39:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ivanhu X-Patchwork-Id: 1574129 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=jjl2wUhB; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=fwts-devel-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JPjtB2R8Wz9sRK for ; Thu, 30 Dec 2021 20:40:02 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1n2ruh-0006LE-DK; Thu, 30 Dec 2021 09:39:59 +0000 Received: from smtp-relay-canonical-0.internal ([10.131.114.83] helo=smtp-relay-canonical-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1n2ruf-0006L2-Oz for fwts-devel@lists.ubuntu.com; Thu, 30 Dec 2021 09:39:57 +0000 Received: from canonical.com (unknown [175.182.110.232]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id 80FBC3FFFE for ; Thu, 30 Dec 2021 09:39:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1640857197; bh=J5l/xAlCKad+C2gsVYEEaDQ2Ezrw5+99m3rSB+uQCXY=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=jjl2wUhBk1KP0Z3m/c7S4x77rrMz5v/RyBQj0P/JK3VdRcbhmPxVRolFSJyXPNrTj 2gxj9EtVWQaJJZcJ8x5bCUvq1H9c47LJboeyd+NpAU+yGCAtInkUVmVpmU2H4f0gor ezya8bbMLL9gRW47nZ6nuNeFa50GVboE8L0sCZbXcH2GFh8rb7Zb2csST3GdyOGGpr //mC6PVgfXKsviCjOKgDegSY2aZ3s1W/ruBP5ChkQm1w5gYQOIIxg2/lLMF2pRAicl z1+28AP8vSmIFUmaO7BEthia/3bVlwoGZfwkPhvxHmF6Fs9xaWVXGwAzHHmgkwxAdZ 39QDFoZtdaWKQ== From: Ivan Hu To: fwts-devel@lists.ubuntu.com Subject: [PATCH 2/2] tpmevlog: add supporting several new types for event log checking Date: Thu, 30 Dec 2021 17:39:50 +0800 Message-Id: <20211230093950.31577-2-ivan.hu@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211230093950.31577-1-ivan.hu@canonical.com> References: <20211230093950.31577-1-ivan.hu@canonical.com> MIME-Version: 1.0 X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: "fwts-devel" Add supporting the new tpm event log types which defined in the TCG PTP 1.05 Signed-off-by: Ivan Hu Acked-by: Alex Hung --- src/tpm/tpmevlog/tpmevlog.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tpm/tpmevlog/tpmevlog.c b/src/tpm/tpmevlog/tpmevlog.c index 95406663..262160ed 100644 --- a/src/tpm/tpmevlog/tpmevlog.c +++ b/src/tpm/tpmevlog/tpmevlog.c @@ -77,8 +77,13 @@ static int tpmevlog_eventtype_check(fwts_framework *fw, const fwts_tpmlog_event_ case EV_EFI_ACTION: case EV_EFI_PLATFORM_FIRMWARE_BLOB: case EV_EFI_HANDOFF_TABLES: + case EV_EFI_PLATFORM_FIRMWARE_BLOB2: + case EV_EFI_HANDOFF_TABLES2: + case EV_EFI_VARIABLE_BOOT2: case EV_EFI_HCRTM_EVENT: case EV_EFI_VARIABLE_AUTHORITY: + case EV_EFI_SPDM_FIRMWARE_BLOB: + case EV_EFI_SPDM_FIRMWARE_CONFIG: return FWTS_OK; default: fwts_failed(fw, LOG_LEVEL_HIGH, "PCREventType",