Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2139707rwl; Sat, 8 Apr 2023 08:29:03 -0700 (PDT) X-Google-Smtp-Source: AKy350bhSlj+4L8YH+othlo3L5vwnth61tY9DJ9s7rfAKUOhBSB8ea7PHneiXcU1ITZxrW0W/doa X-Received: by 2002:a17:906:49:b0:931:4285:ea1d with SMTP id 9-20020a170906004900b009314285ea1dmr2919736ejg.5.1680967743400; Sat, 08 Apr 2023 08:29:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680967743; cv=none; d=google.com; s=arc-20160816; b=J0nvBB/j3LmBFEu9n6NKEONiHG+w/0ypDOEXcxzKj5BXB80FL1dLx5JJ/kuZA9Paek mL8lNfiYgbo2nRwpKjxl8Z+qu8b7DfSYewzUxlK/XDr/C2Sox0J8+SDxtHcJaTwc9E7O tZmIF/1crRVaar9JZrAPfgvhtI9tzdJKuEJjpAh4JhWdsV78gk/5IShIsFJ2L075RVXC msRcHEKccmvz6R0FtU4Z2Sx4Sv3Cf61EhWlszKYxAQFk+9en6sg0X6byd1qrfzrs3PXf Y3LYqA2khoQR+dXd1k6spabLJi+bzfWlPFvEdTmeNZG1fE2b7V1KuI6nWs1x7E0kaCVV wkZg== 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=sD9/Ir2fOcorD7otOebihleyCUS6XsmLS11CsQ8vJS8NMtFCIuwRFKSbXKaVNVwNX1 DyUWJZ/2kKYz7M2NxjzsEez51VR47N3tIlj48SpZlp+eDYCyvP5lfF17CxMvJpoeg9ZG tPc3LnK3J5qnda4z/j4qVagtMPmr8RVgtWN7pzqwVT8pDhYOzfwN6nDukT+jOlsUBNLz d0FOVfkfbiJME8zd9uKyGxFdL1ti/0Afi362YrYrfDJVBIPOBL5NHUplqVU0bKDosmqf hDktL/e2CDC/Qzfwa1HAlZnZ0RsmfcU3ARJBSMmzYFeGt5ADN2flfAUimNlxqqna7XZ8 ho6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dofKYlGN; 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 s19-20020a170906169300b0094a56c588a8si296106ejd.478.2023.04.08.08.28.28; Sat, 08 Apr 2023 08:29:03 -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=dofKYlGN; 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 S229817AbjDHP1l (ORCPT + 99 others); Sat, 8 Apr 2023 11:27:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjDHP1l (ORCPT ); Sat, 8 Apr 2023 11:27:41 -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 8C3F02728 for ; Sat, 8 Apr 2023 08:27:40 -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 2ADF0601D6 for ; Sat, 8 Apr 2023 15:27:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 683ADC433D2; Sat, 8 Apr 2023 15:27:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680967659; bh=VyfOUC2SaMgU8pz1GST90q6y2SQtV0uyViPVyABOX3E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dofKYlGN2hqY7Y5mSNYSdHmF+0wEh+TtC7zbvUerAfAN5nTY3YibKmbAb4f6rDm4X UZRtn8zNguim0Rpeep20f7a91DFNqfDtnv7qzqfaaMwVs0SBSToaSGbocbExmz430V nTpPng0ycgLotGsqoRI5ZXuAPAXycT14M58D2tTBIBUwm33yt/+3jn6aFsOb34SrNl 0GLP9LRw+mR8z099+jU+jL/GM1LfwrOpjcSxThoWw+pG4MuMp63cXhj9+6GVbrel/3 EbBmiQAOY4qguoYYXGrBgorcfLrKeCyarlC8UFqKYNjSVXcXtmkZmeStzQB7GlPmL+ StUxHCm6dWBGQ== From: Ard Biesheuvel To: linux-crypto@vger.kernel.org Cc: Ard Biesheuvel , Herbert Xu , Eric Biggers , Kees Cook Subject: [PATCH 01/10] crypto: x86/aegis128 - Use RIP-relative addressing Date: Sat, 8 Apr 2023 17:27:13 +0200 Message-Id: <20230408152722.3975985-2-ardb@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230408152722.3975985-1-ardb@kernel.org> References: <20230408152722.3975985-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=owGbwMvMwCFmkMcZplerG8N4Wi2JIcWw/bwM0+S3Sj+Zpqvvmrk8eOKK14Z3JjItMre+77bC5 O/dl/tcOkpZGMQ4GGTFFFkEZv99t/P0RKla51myMHNYmUCGMHBxCsBETvIz/A/rMlYJjr28XpR/ ddjB4+mXlv5rizLrm7l2wfuHrSXnS8sYGV435O3//8H36FXOLk+lx2e452+bvWPh+nf2cUvTJ7U 23GMGAA== X-Developer-Key: i=ardb@kernel.org; a=openpgp; fpr=F43D03328115A198C90016883D200E9CA6329909 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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