Skip to content

Commit

Permalink
AES-NI CPUID check: Avoid potential thread safety (non-?)issue
Browse files Browse the repository at this point in the history
  • Loading branch information
solardiz committed Dec 11, 2024
1 parent 0ab4262 commit 2d70dc9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/mbedtls/aesni.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,11 @@ int mbedtls_aesni_has_support(unsigned int what)
:
: "eax", "ebx", "edx");
#endif /* MBEDTLS_AESNI_HAVE_CODE */
asm ("" ::: "memory");
done = 1;
}

asm ("" ::: "memory");
return (c & what) != 0;
}
#endif /* !MBEDTLS_AES_USE_HARDWARE_ONLY */
Expand Down

0 comments on commit 2d70dc9

Please sign in to comment.