Re: [PATCH v15 17/28] x86: Add early SHA-1 support for Secure Launch early measurements

ross.philipson
2025-12-17T18:11:52Z

On 12/15/25 4:21 PM, Eric Biggers wrote:
> On Mon, Dec 15, 2025 at 03:33:05PM -0800, Ross Philipson wrote:
>> diff --git a/arch/x86/boot/compressed/sha1.c b/arch/x86/boot/compressed/sha1.c
>> new file mode 100644
>> index 000000000000..dd1b4cf5caf5
>> --- /dev/null
>> +++ b/arch/x86/boot/compressed/sha1.c
>> @@ -0,0 +1,7 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +/*
>> + * Copyright (c) 2025 Apertus Solutions, LLC.
>> + */
>> +
>> +#undef CONFIG_CRYPTO_LIB_SHA1_ARCH
>> +#include "../../../../lib/crypto/sha1.c"
>
> CONFIG_* options shouldn't be undefined like this. It seems that you're
> trying to build the SHA-1 code into a pre-boot environment. This
> problem was already solved in the SHA-256 code, by making
> lib/crypto/sha256.c aware of __DISABLE_EXPORTS. The SHA-1 code should
> use the same solution.
>
> - Eric

That makes perfects sense, we will address that.

Thank you,
Ross