All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ardb@kernel.org>
To: linux-crypto@vger.kernel.org
Cc: Ard Biesheuvel <ardb@kernel.org>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Eric Biggers <ebiggers@kernel.org>,
	Kees Cook <keescook@chromium.org>
Subject: [PATCH 01/10] crypto: x86/aegis128 - Use RIP-relative addressing
Date: Sat,  8 Apr 2023 17:27:13 +0200	[thread overview]
Message-ID: <20230408152722.3975985-2-ardb@kernel.org> (raw)
In-Reply-To: <20230408152722.3975985-1-ardb@kernel.org>

Prefer RIP-relative addressing where possible, which removes the need
for boot time relocation fixups.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
 arch/x86/crypto/aegis128-aesni-asm.S | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/crypto/aegis128-aesni-asm.S b/arch/x86/crypto/aegis128-aesni-asm.S
index cdf3215ec272ced2..ad7f4c89162568b0 100644
--- a/arch/x86/crypto/aegis128-aesni-asm.S
+++ b/arch/x86/crypto/aegis128-aesni-asm.S
@@ -201,8 +201,8 @@ SYM_FUNC_START(crypto_aegis128_aesni_init)
 	movdqa KEY, STATE4
 
 	/* load the constants: */
-	movdqa .Laegis128_const_0, STATE2
-	movdqa .Laegis128_const_1, STATE1
+	movdqa .Laegis128_const_0(%rip), STATE2
+	movdqa .Laegis128_const_1(%rip), STATE1
 	pxor STATE2, STATE3
 	pxor STATE1, STATE4
 
@@ -682,7 +682,7 @@ SYM_TYPED_FUNC_START(crypto_aegis128_aesni_dec_tail)
 	punpcklbw T0, T0
 	punpcklbw T0, T0
 	punpcklbw T0, T0
-	movdqa .Laegis128_counter, T1
+	movdqa .Laegis128_counter(%rip), T1
 	pcmpgtb T1, T0
 	pand T0, MSG
 
-- 
2.39.2


  reply	other threads:[~2023-04-08 15:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-08 15:27 [PATCH 00/10] crypto: x86 - avoid absolute references Ard Biesheuvel
2023-04-08 15:27 ` Ard Biesheuvel [this message]
2023-04-08 15:27 ` [PATCH 02/10] crypto: x86/aesni - Use RIP-relative addressing Ard Biesheuvel
2023-04-08 15:27 ` [PATCH 03/10] crypto: x86/aria " Ard Biesheuvel
2023-04-08 15:27 ` [PATCH 04/10] crypto: x86/camellia " Ard Biesheuvel
2023-04-08 15:27 ` [PATCH 05/10] crypto: x86/cast5 " Ard Biesheuvel
2023-04-08 15:27 ` [PATCH 06/10] crypto: x86/cast6 " Ard Biesheuvel
2023-04-08 15:27 ` [PATCH 07/10] crypto: x86/crc32c " Ard Biesheuvel
2023-04-08 15:27 ` [PATCH 08/10] crypto: x86/des3 " Ard Biesheuvel
2023-04-08 15:27 ` [PATCH 09/10] crypto: x86/ghash " Ard Biesheuvel
2023-04-08 15:27 ` [PATCH 10/10] crypto: x86/sha256 " Ard Biesheuvel
2023-04-08 15:32 ` [PATCH 00/10] crypto: x86 - avoid absolute references Ard Biesheuvel
2023-04-10  9:10   ` Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230408152722.3975985-2-ardb@kernel.org \
    --to=ardb@kernel.org \
    --cc=ebiggers@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=keescook@chromium.org \
    --cc=linux-crypto@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.