From 4ad27aa47ef1db7815980bece810489dc029c6c9 Mon Sep 17 00:00:00 2001 From: Solar Designer Date: Sun, 8 Dec 2024 18:55:53 +0100 Subject: [PATCH] Specify previously missed XMM register clobbers in AES-NI asm blocks Noticed by Gilles Peskine Co-authored-by: Gilles Peskine Signed-off-by: Solar Designer --- library/aesni.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/aesni.c b/library/aesni.c index 3bfc8d0578b..7491f8d980b 100644 --- a/library/aesni.c +++ b/library/aesni.c @@ -648,7 +648,7 @@ static void aesni_setkey_enc_128(unsigned char *rk, AESKEYGENA(xmm0_xmm1, "0x36") "call 1b \n\t" : : "r" (rk), "r" (key) - : "memory", "cc", "0"); + : "memory", "cc", "xmm0", "xmm1", "0"); } /* @@ -705,7 +705,7 @@ static void aesni_setkey_enc_192(unsigned char *rk, : : "r" (rk), "r" (key) - : "memory", "cc", "0"); + : "memory", "cc", "xmm0", "xmm1", "xmm2", "0"); } /* @@ -771,7 +771,7 @@ static void aesni_setkey_enc_256(unsigned char *rk, AESKEYGENA(xmm1_xmm2, "0x40") "call 1b \n\t" : : "r" (rk), "r" (key) - : "memory", "cc", "0"); + : "memory", "cc", "xmm0", "xmm1", "xmm2", "0"); } #endif /* MBEDTLS_AESNI_HAVE_CODE */