crypto: x86/curve25519 - use in/out register constraints more precisely
authorJason A. Donenfeld <Jason@zx2c4.com>
Tue, 14 Dec 2021 16:01:46 +0000 (17:01 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 24 Dec 2021 03:18:22 +0000 (14:18 +1100)
commitacd93f8a4ca784d8eff303c6cae49f3bf7b3a499
tree5aa645a88f8bca17b98f3de4e71175cd14e5b015
parent38e9791a02090414d1e3433549001689cad71098
crypto: x86/curve25519 - use in/out register constraints more precisely

Rather than passing all variables as modified, pass ones that are only
read into that parameter. This helps with old gcc versions when
alternatives are additionally used, and lets gcc's codegen be a little
bit more efficient. This also syncs up with the latest Vale/EverCrypt
output.

Reported-by: Mathias Krause <minipli@grsecurity.net>
Cc: Aymeric Fromherz <aymeric.fromherz@inria.fr>
Link: https://lore.kernel.org/wireguard/1554725710.1290070.1639240504281.JavaMail.zimbra@inria.fr/
Link: https://github.com/project-everest/hacl-star/pull/501
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Mathias Krause <minipli@grsecurity.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/x86/crypto/curve25519-x86_64.c