Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp772229rwl; Wed, 12 Apr 2023 04:03:25 -0700 (PDT) X-Google-Smtp-Source: AKy350ZrICOL/b/1M37ZnlCsMMOYUNyOpIVKI8FtRFZLKwu75o2IPRgnhN2ZmPhRPhwEbwFRrbP0 X-Received: by 2002:a05:6a20:431f:b0:eb:7d41:a713 with SMTP id h31-20020a056a20431f00b000eb7d41a713mr2612045pzk.1.1681297405418; Wed, 12 Apr 2023 04:03:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681297405; cv=none; d=google.com; s=arc-20160816; b=DFTXZbUtVtTK+t9Re+Z5mCyrmeNeYY7kApVEutEpJNgvymG91NlYne4tgcXWAYnbvx 3KG1H+dxLr/x29iZhGLaJp6+a0ERHOpXlNlMBvw1a6XC+bp/e1rqsJuKo2qcF2Lw7Qlo 6tUFL0Tr+UnFiR+N3Ebc4N7MqF4i/dTnebswpvaMNEsYPdOEXRwj8vmQVDpbZtSSKebS HZdyWpL5hVJwMUpR/ZhFiiUpPNW3SAcLn7Ffe6lrjL0AwiVeJct2rXjQyHz7y0qT6krL 2aXOMZzA1DoWN0NIbiSRcP7u0NZ9poogJ5OCt5SOrWvHPBDUoX59fEzA8r2Hv++GIyUv NLBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=rS9lpFEyDYef1FhGsgWLuZi9mLT+5M1SmmdZk+ex/DI=; b=lawH8OEtuNWV9yw4xscHx4Hqxn90dc5+l9VfPCQh6E7pLFJKAGGTyLXP0zH609CnHX o4GJEmZEoqTYsEPntwepy85l2olv3EYUtyjm+SF/ef/xlLZusZR+UwfSMsL/ZuprOsB8 1JAtoVhybhqPc3PbPlxN/MCXxLOQ8AgvAiUHno1bNT8qG7VTpr6m5uYuyeV63sGKmw0q vL1gryYXSX/eHiasDgqOxVzZ6xEfuNCm5vtrtTX0H+LperBNBPgx+BADXYl8JedUggrk J5S3x/GFhzQSBe6hVB7qFwc0Z0XLdRafsoecusBcVXaz6jHrKADzOlPeNzdbGnyyNza1 rYDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=umjmB07Q; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 7-20020a631147000000b0050fae6024f8si15323576pgr.792.2023.04.12.04.03.06; Wed, 12 Apr 2023 04:03:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=umjmB07Q; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229555AbjDLLAv (ORCPT + 99 others); Wed, 12 Apr 2023 07:00:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229559AbjDLLAu (ORCPT ); Wed, 12 Apr 2023 07:00:50 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2DFE6583 for ; Wed, 12 Apr 2023 04:00:49 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 61E1A62889 for ; Wed, 12 Apr 2023 11:00:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A7D0EC4339C; Wed, 12 Apr 2023 11:00:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681297248; bh=VyfOUC2SaMgU8pz1GST90q6y2SQtV0uyViPVyABOX3E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=umjmB07QxbRqVZROTjokkPRvAlTrVYwziXenh4tiFebx6Ce5vdqAQ6ppwBCF6MNGi 35WBz0eSfsCQmBza84L1848Pc4WipotdE2NzVzvFxcagQHEsKCganATyNIDS57Vu8Y LzTmhhtvn+AKrIzGyTxYkUuenGFNnd6Iq0ZHrh8ACCOYmn0wscdGnXum6C2KzZZ5sJ 6xP+OJj2JAzDBzxl26phxgqFdJIbPHTiwlIo7r5XYUMXP8FZgc1kKlCaR3tIk4tm1P s6tFw1RaIMQuNVFQRNuAu1D6VnJxgt+GtA4Fz7oQKUIIGNaUD2EkbeQ/tU+bO+U5/q SyGdK/M5F6Rcg== From: Ard Biesheuvel To: linux-crypto@vger.kernel.org Cc: Ard Biesheuvel , Herbert Xu , Eric Biggers , Kees Cook Subject: [PATCH v2 01/13] crypto: x86/aegis128 - Use RIP-relative addressing Date: Wed, 12 Apr 2023 13:00:23 +0200 Message-Id: <20230412110035.361447-2-ardb@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230412110035.361447-1-ardb@kernel.org> References: <20230412110035.361447-1-ardb@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1073; i=ardb@kernel.org; h=from:subject; bh=VyfOUC2SaMgU8pz1GST90q6y2SQtV0uyViPVyABOX3E=; b=owGbwMvMwCFmkMcZplerG8N4Wi2JIcWs31mGafJbpZ9M09V3zVwePHHFa8M7E5kWmVvfd1th8 vfuy30uHaUsDGIcDLJiiiwCs/++23l6olSt8yxZmDmsTCBDGLg4BWAiho8ZGU6aGFaVNAnlLbik 5WywbGeK7fe/N04vzNf7M8W6VPbTu0BGhosfVNd2mOU3bz10wanV5CtTopL/kz0r94f7r9Vo1Sn x5wcA X-Developer-Key: i=ardb@kernel.org; a=openpgp; fpr=F43D03328115A198C90016883D200E9CA6329909 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Prefer RIP-relative addressing where possible, which removes the need for boot time relocation fixups. Signed-off-by: Ard Biesheuvel --- 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