You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
acidanthera/audk@a955e88 "SecurePE: Replaced old PE loader with Secure one" breaks SecurityPkg hashing. In particular, OvmfPkg can no longer be compiled with -D TPM2_ENABLE.
For example:
build -p OvmfPkg/OvmfPkgIa32X64.dsc -b DEBUG -t XCODE5 -a IA32 -a X64 -D TPM2_ENABLE
fails with
/Users/mjsbeaton/OpenSource/audk/SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.c:119:3: error: incompatible function pointer types initializing 'HASH_INIT' (aka 'unsigned long long (*)(unsigned long long *)') with an expression of type 'BOOLEAN (void **)' (aka 'unsigned char (void **)') [-Werror,-Wincompatible-function-pointer-types]
Sm3HashInit,
^~~~~~~~~~~
/Users/mjsbeaton/OpenSource/audk/SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.c:120:3: error: incompatible function pointer types initializing 'HASH_UPDATE' (aka 'unsigned long long (*)(unsigned long long, void *, unsigned long long)') with an expression of type 'BOOLEAN (void *, const void *, UINTN)' (aka 'unsigned char (void *, const void *, unsigned long long)') [-Werror,-Wincompatible-function-pointer-types]
Sm3HashUpdate,
^~~~~~~~~~~~~
/Users/mjsbeaton/OpenSource/audk/SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.c:121:3: error: incompatible function pointer types initializing 'HASH_FINAL' (aka 'unsigned long long (*)(unsigned long long, TPML_DIGEST_VALUES *)') with an expression of type 'BOOLEAN (void *, TPML_DIGEST_VALUES *)' (aka 'unsigned char (void *, TPML_DIGEST_VALUES *)') [-Werror,-Wincompatible-function-pointer-types]
Sm3HashFinal,
^~~~~~~~~~~~
3 errors generated.
The error is correct. The commit has updated the methods in question to return BOOLEAN where they previously returned EFI_STATUS:
mikebeaton
changed the title
audk SecurityPkg hashing is broken by merge of new PE loader
audk SecurityPkg hashing is broken since merge of new PE loader
Sep 28, 2024
acidanthera/audk@a955e88 "SecurePE: Replaced old PE loader with Secure one" breaks SecurityPkg hashing. In particular, OvmfPkg can no longer be compiled with
-D TPM2_ENABLE
.For example:
fails with
The error is correct. The commit has updated the methods in question to return BOOLEAN where they previously returned EFI_STATUS:
acidanthera/audk@a955e88#diff-11a5b6c447f1dc018c114f8e2f769347c0ad8268f2310d77309eb2275c64a3d9 (takes a while to load)
But they are being assigned to an interface which still expects them to return EFI_STATUS:
https://github.com/acidanthera/audk/blob/a955e8811bc9e34d7d01ab373aefaecc5fde5a3c/SecurityPkg/Include/Library/HashLib.h#L90-L150
The text was updated successfully, but these errors were encountered: