Merge pull request #10344 from douzzer/20260416-linuxkm-fips-rodata-canonify

20260416-linuxkm-fips-rodata-canonify
This commit is contained in:
lealem47
2026-04-30 10:19:43 -06:00
committed by GitHub
16 changed files with 629 additions and 330 deletions
+3 -7
View File
@@ -10176,12 +10176,8 @@ void ge_tobytes(unsigned char *s,const ge_p2 *h)
s[31] ^= (unsigned char)((unsigned char)fe_isnegative(x) << 7);
}
#ifdef HAVE_ED25519_VERIFY
#ifndef CURVED25519_ASM_64BIT
#define fe_invert_nct fe_invert
#endif
/* ge tobytes */
#if defined(HAVE_ED25519_VERIFY) && defined(CURVED25519_ASM_64BIT)
/* ge tobytes_nct */
void ge_tobytes_nct(unsigned char *s,const ge_p2 *h)
{
ge recip;
@@ -10194,7 +10190,7 @@ void ge_tobytes_nct(unsigned char *s,const ge_p2 *h)
fe_tobytes(s,y);
s[31] ^= (unsigned char)((unsigned char)fe_isnegative(x) << 7);
}
#endif
#endif /* HAVE_ED25519_VERIFY && CURVED25519_ASM_64BIT */
#endif /* !ED25519_SMALL */
+6 -4
View File
@@ -2418,10 +2418,12 @@ static int wc_lms_treehash_update(LmsState* state, LmsPrivState* privState,
}
}
if (!useRoot && (ret == 0)) {
/* Copy stack back. */
XMEMCPY(stackCache->stack, stack, params->height * params->hash_len);
stackCache->offset = (word32)((size_t)sp - (size_t)stack);
if (ret == 0) {
if (!useRoot) {
/* Copy stack back. */
XMEMCPY(stackCache->stack, stack, params->height * params->hash_len);
stackCache->offset = (word32)((size_t)sp - (size_t)stack);
}
}
WC_FREE_VAR_EX(stack, NULL, DYNAMIC_TYPE_TMP_BUFFER);