Skip to content

Commit 4b93e3e

Browse files
authored
Merge pull request #9381 from douzzer/20251104-fixes
20251104-fixes
2 parents d47108c + abec842 commit 4b93e3e

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

linuxkm/linuxkm_wc_port.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1398,7 +1398,7 @@
13981398
return 0;
13991399
}
14001400

1401-
static inline int wc_LockMutex(wolfSSL_Mutex* m)
1401+
static __must_check inline int wc_LockMutex(wolfSSL_Mutex* m)
14021402
{
14031403
if (in_nmi() || hardirq_count() || in_softirq())
14041404
return -1;
@@ -1443,14 +1443,14 @@
14431443
/* wc_lkm_LockMutex() can't be used inline in __PIE__ objects, due to
14441444
* direct access to pv_ops.
14451445
*/
1446-
static __always_inline int wc_LockMutex(wolfSSL_Mutex *m)
1446+
static __must_check __always_inline int wc_LockMutex(wolfSSL_Mutex *m)
14471447
{
14481448
return WC_PIE_INDIRECT_SYM(wc_lkm_LockMutex)(m);
14491449
}
14501450

14511451
#else /* !__PIE__ */
14521452

1453-
static __always_inline int wc_LockMutex(wolfSSL_Mutex *m)
1453+
static __must_check __always_inline int wc_LockMutex(wolfSSL_Mutex *m)
14541454
{
14551455
return wc_lkm_LockMutex(m);
14561456
}

linuxkm/module_hooks.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,14 @@ int wc_lkm_LockMutex(wolfSSL_Mutex* m)
172172
}
173173
else {
174174
for (;;) {
175+
int sig_ret = wc_linuxkm_check_for_intr_signals();
176+
if (sig_ret)
177+
return sig_ret;
178+
cond_resched();
175179
if (spin_trylock_irqsave(&m->lock, irq_flags)) {
176180
m->irq_flags = irq_flags;
177181
return 0;
178182
}
179-
cond_resched();
180183
}
181184
}
182185
__builtin_unreachable();

wolfcrypt/src/asn.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13510,7 +13510,11 @@ int wc_Ed25519PublicKeyToDer(const ed25519_key* key, byte* output, word32 inLen,
1351013510
return BAD_FUNC_ARG;
1351113511
}
1351213512

13513+
#if defined(HAVE_FIPS) && FIPS_VERSION3_LT(7,0,0)
13514+
ret = wc_ed25519_export_public((ed25519_key *)key, pubKey, &pubKeyLen);
13515+
#else
1351313516
ret = wc_ed25519_export_public(key, pubKey, &pubKeyLen);
13517+
#endif
1351413518
if (ret == 0) {
1351513519
ret = SetAsymKeyDerPublic(pubKey, pubKeyLen, output, inLen,
1351613520
ED25519k, withAlg);

0 commit comments

Comments
 (0)