From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id D2A7EAC09E5 for ; Thu, 30 Nov 2023 02:46:23 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=WQEIPsClK47jGr2pp76z3Qx5HMzPYvvfW6pIqzkOSII=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1701312382; v=1; b=fi6Wek85RVwPyYWHGzR+raGCr9GopPJ4jcCPzQSI18b30ub5qXvviHYGhJtS2fB1W28aoEc2 1zXuypPNjFZEmIXmfyBJc+zxfUg8K7XH8pcECbemw7NRfak99x5WH++z4Llc0U8MLurNTx0eQs8 8uVd8/XEeP8bOBvZbLgX8pAE= X-Received: by 127.0.0.2 with SMTP id whTeYY7687511xsvlFKGa9c7; Wed, 29 Nov 2023 18:46:22 -0800 X-Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by mx.groups.io with SMTP id smtpd.web10.63599.1701312381484339658 for ; Wed, 29 Nov 2023 18:46:21 -0800 X-Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-40b4e35ecf1so3554305e9.1 for ; Wed, 29 Nov 2023 18:46:21 -0800 (PST) X-Gm-Message-State: DXSbdvZjTjCnJFBej6ktYNVJx7686176AA= X-Google-Smtp-Source: AGHT+IFR7XvvaqyGhQlxNWwtpmgEb4j+E/KvchtoJ105wN5my+Wwg5QxM3VlSLhkyooOo0Jybb0M1w== X-Received: by 2002:a05:600c:1987:b0:409:5bd2:aa03 with SMTP id t7-20020a05600c198700b004095bd2aa03mr15946421wmq.9.1701312379263; Wed, 29 Nov 2023 18:46:19 -0800 (PST) X-Received: from PC-PEDRO-ARCH.lan ([2001:8a0:7280:5801:9441:3dce:686c:bfc7]) by smtp.gmail.com with ESMTPSA id b19-20020a05600c4e1300b0040648217f4fsm3986232wmq.39.2023.11.29.18.46.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 18:46:16 -0800 (PST) From: "Pedro Falcato" To: devel@edk2.groups.io Cc: Savva Mitrofanov , Pedro Falcato Subject: [edk2-devel] [PATCH 0/2] MdePkg: Fix CRC16-ANSI calculation Date: Thu, 30 Nov 2023 02:46:09 +0000 Message-ID: <20231130024611.67135-1-pedro.falcato@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pedro.falcato@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=fi6Wek85; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4609 CalculateCrc16Ansi is currently miscalculating all checksums and causing ext4 mount failures on older (~13 year old) filesystems. This patchset: 1) Fixes CalculateCrc16Ansi to properly calculate checksums This is a breaking change. 2) Adds google test tests for BaseLib. They were immensely helpful in making sure things were correct, while iterating quickly. Boot tested on a freshly baked "old filesystem" using a script[1], and tested for further correctness using unit tests. [1] https://gist.github.com/heatd/6adaae8288e270897975d9321c5e8f41 Pedro Falcato (2): MdePkg/BaseLib: Fix CRC16-ANSI calculation MdePkg/Test: Add google tests for BaseLib MdePkg/Include/Library/BaseLib.h | 5 ++ MdePkg/Library/BaseLib/CheckSum.c | 4 +- .../Library/BaseLib/GoogleTestBaseLib.inf | 31 +++++++++ .../Library/BaseLib/TestBaseLibMain.cpp | 23 +++++++ .../Library/BaseLib/TestCheckSum.cpp | 64 +++++++++++++++++++ .../SafeIntLibUintnIntnUnitTests64.cpp | 4 +- MdePkg/Test/MdePkgHostTest.dsc | 5 ++ 7 files changed, 132 insertions(+), 4 deletions(-) create mode 100644 MdePkg/Test/GoogleTest/Library/BaseLib/GoogleTestBaseLib.inf create mode 100644 MdePkg/Test/GoogleTest/Library/BaseLib/TestBaseLibMain.cpp create mode 100644 MdePkg/Test/GoogleTest/Library/BaseLib/TestCheckSum.cpp -- 2.43.0 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#111883): https://edk2.groups.io/g/devel/message/111883 Mute This Topic: https://groups.io/mt/102886792/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-