From 5e6c424cac5703a232f84e14ae360fae9cd166f1 Mon Sep 17 00:00:00 2001 From: Julien Olivain Date: Fri, 6 Mar 2026 13:34:07 +0100 Subject: [PATCH 1/3] package/edk2-platforms: fix package patch newline characters Commit [1] was applied without fixing the edk2-platform patch newlines which are changed by the mailing list. As a result, the patch fails to apply. This commit fixes the issue. [1] https://gitlab.com/buildroot.org/buildroot/-/commit/21baec5ef57077cc7b4ce98dbd863c5f5a6d8380 Signed-off-by: Julien Olivain --- ...Marvell-fix-SMBIOS-type-7-structures.patch | 80 +++++++++---------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/package/edk2-platforms/0001-Silicon-Marvell-fix-SMBIOS-type-7-structures.patch b/package/edk2-platforms/0001-Silicon-Marvell-fix-SMBIOS-type-7-structures.patch index 9a12580a69b0..533b325796ce 100644 --- a/package/edk2-platforms/0001-Silicon-Marvell-fix-SMBIOS-type-7-structures.patch +++ b/package/edk2-platforms/0001-Silicon-Marvell-fix-SMBIOS-type-7-structures.patch @@ -32,49 +32,49 @@ index 16fe05a46c..d348bbb458 100644 --- a/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c +++ b/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c @@ -227,8 +227,8 @@ STATIC SMBIOS_TABLE_TYPE7 mArmadaDefaultType7_a72_l1i = { - CacheTypeInstruction, //instruction cache - CacheAssociativityOther, //three way - // SMBIOS 3.1.0 fields -- 48, //48k I-cache max -- 48, //48k installed -+ {48,0},//48k I-cache max -+ {48,0},//48k installed - }; - - STATIC SMBIOS_TABLE_TYPE7 mArmadaDefaultType7_a72_l1d = { + CacheTypeInstruction, //instruction cache + CacheAssociativityOther, //three way + // SMBIOS 3.1.0 fields +- 48, //48k I-cache max +- 48, //48k installed ++ {48,0},//48k I-cache max ++ {48,0},//48k installed + }; + + STATIC SMBIOS_TABLE_TYPE7 mArmadaDefaultType7_a72_l1d = { @@ -248,8 +248,8 @@ STATIC SMBIOS_TABLE_TYPE7 mArmadaDefaultType7_a72_l1d = { - CacheTypeData, //data cache - CacheAssociativity2Way, //two way - // SMBIOS 3.1.0 fields -- 32, //32k D-cache max -- 32, //32k installed -+ {32,0},//32k D-cache max -+ {32,0},//32k installed - }; - - STATIC SMBIOS_TABLE_TYPE7 mArmadaDefaultType7_a72_l2 = { + CacheTypeData, //data cache + CacheAssociativity2Way, //two way + // SMBIOS 3.1.0 fields +- 32, //32k D-cache max +- 32, //32k installed ++ {32,0},//32k D-cache max ++ {32,0},//32k installed + }; + + STATIC SMBIOS_TABLE_TYPE7 mArmadaDefaultType7_a72_l2 = { @@ -269,8 +269,8 @@ STATIC SMBIOS_TABLE_TYPE7 mArmadaDefaultType7_a72_l2 = { - CacheTypeUnified, //instruction cache - CacheAssociativity16Way, //16 way associative - // SMBIOS 3.1.0 fields -- 512, //512k D-cache max -- 512, //512k installed -+ {512,0},//512k D-cache max -+ {512,0},//512k installed - }; - - STATIC SMBIOS_TABLE_TYPE7 mArmadaDefaultType7_l3 = { + CacheTypeUnified, //instruction cache + CacheAssociativity16Way, //16 way associative + // SMBIOS 3.1.0 fields +- 512, //512k D-cache max +- 512, //512k installed ++ {512,0},//512k D-cache max ++ {512,0},//512k installed + }; + + STATIC SMBIOS_TABLE_TYPE7 mArmadaDefaultType7_l3 = { @@ -290,8 +290,8 @@ STATIC SMBIOS_TABLE_TYPE7 mArmadaDefaultType7_l3 = { - CacheTypeUnified, //instruction cache - CacheAssociativity8Way, //8 way associative - // SMBIOS 3.1.0 fields -- 1024, //1M cache max -- 1024, //1M installed -+ {1024,0},//1M cache max -+ {1024,0},//1M installed - }; - - STATIC CONST CHAR8 *mArmadaDefaultType7Strings[] = { + CacheTypeUnified, //instruction cache + CacheAssociativity8Way, //8 way associative + // SMBIOS 3.1.0 fields +- 1024, //1M cache max +- 1024, //1M installed ++ {1024,0},//1M cache max ++ {1024,0},//1M installed + }; + + STATIC CONST CHAR8 *mArmadaDefaultType7Strings[] = { -- 2.52.0 From f773fd6787491af3c98ae30f5683b8d7a431b0e5 Mon Sep 17 00:00:00 2001 From: Bernd Kuhls Date: Fri, 6 Mar 2026 08:41:05 +0100 Subject: [PATCH 2/3] package/libtpms: fix build with host gcc >= 15.x, glibc >= 2.43 Fixes: https://autobuild.buildroot.net/results/7a6/7a6ea7c513e8f1dcc32d868108bfb2a907d6fe85/ The previous change to src/tpm_library.c dates back to 2024: https://github.com/stefanberger/libtpms/commits/master/src/tpm_library.c so a backport to buildroot LTS branches should be considered. Signed-off-by: Bernd Kuhls [Julien: reword title to mention glibc 2.43] Signed-off-by: Julien Olivain --- ...ilation-error-in-TPMLIB_GetPlaintext.patch | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 package/libtpms/0001-Fix-a-compilation-error-in-TPMLIB_GetPlaintext.patch diff --git a/package/libtpms/0001-Fix-a-compilation-error-in-TPMLIB_GetPlaintext.patch b/package/libtpms/0001-Fix-a-compilation-error-in-TPMLIB_GetPlaintext.patch new file mode 100644 index 000000000000..02c4df9668ad --- /dev/null +++ b/package/libtpms/0001-Fix-a-compilation-error-in-TPMLIB_GetPlaintext.patch @@ -0,0 +1,40 @@ +From fc8820cfaa8b5e17328f731df93911f6ab92443b Mon Sep 17 00:00:00 2001 +From: Stefan Berger +Date: Fri, 2 Jan 2026 11:37:31 -0500 +Subject: [PATCH] Fix a compilation error in TPMLIB_GetPlaintext + +Fix a compilation error that newer gcc versions may complain about: + +tpm_library.c: In function 'TPMLIB_GetPlaintext': +tpm_library.c:441:11: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] + 441 | start = strstr(stream, starttag); + | ^ +At top level: +cc1: note: unrecognized command-line option '-Wno-self-assign' may have been intended to silence earlier diagnostics +cc1: all warnings being treated as errors + +Signed-off-by: Stefan Berger + +Upstream: https://github.com/stefanberger/libtpms/commit/fc8820cfaa8b5e17328f731df93911f6ab92443b + +Signed-off-by: Bernd Kuhls +--- + src/tpm_library.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/tpm_library.c b/src/tpm_library.c +index f48f4fd3..7b2ea687 100644 +--- a/src/tpm_library.c ++++ b/src/tpm_library.c +@@ -435,7 +435,7 @@ static unsigned char *TPMLIB_GetPlaintext(const char *stream, + const char *endtag, + size_t *length) + { +- char *start, *end; ++ const char *start, *end; + unsigned char *plaintext = NULL; + + start = strstr(stream, starttag); +-- +2.47.3 + From b1c4276c2d0fb266ccf08c03b8d50961b8f7553b Mon Sep 17 00:00:00 2001 From: Bernd Kuhls Date: Fri, 6 Mar 2026 08:41:06 +0100 Subject: [PATCH 3/3] package/libtpms: security bump version to 0.10.2 https://github.com/stefanberger/libtpms/blob/v0.10.2/CHANGES Fixes CVE-2026-21444. Added comment to hash file about locally computed hashes. Signed-off-by: Bernd Kuhls Signed-off-by: Julien Olivain --- package/libtpms/libtpms.hash | 3 ++- package/libtpms/libtpms.mk | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package/libtpms/libtpms.hash b/package/libtpms/libtpms.hash index f10364f36e79..175e6e3af69a 100644 --- a/package/libtpms/libtpms.hash +++ b/package/libtpms/libtpms.hash @@ -1,2 +1,3 @@ -sha256 ebc24f3191d90f6cf0b4d4200cd876db4bd224b3c565708bbea0a82ee275e0fb libtpms-0.10.1.tar.gz +# Locally computed +sha256 edac03680f8a4a1c5c1d609a10e3f41e1a129e38ff5158f0c8deaedc719fb127 libtpms-0.10.2.tar.gz sha256 82f1e6bae374bb6a9d4f4596767fd33e499718d560de140fd9f3d402cc5e41fb LICENSE diff --git a/package/libtpms/libtpms.mk b/package/libtpms/libtpms.mk index 6e5708202ee7..7bc69a50d65d 100644 --- a/package/libtpms/libtpms.mk +++ b/package/libtpms/libtpms.mk @@ -4,7 +4,7 @@ # ################################################################################ -LIBTPMS_VERSION = 0.10.1 +LIBTPMS_VERSION = 0.10.2 LIBTPMS_SITE = $(call github,stefanberger,libtpms,v$(LIBTPMS_VERSION)) LIBTPMS_LICENSE = BSD-4-Clause LIBTPMS_LICENSE_FILES = LICENSE