Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3862794rwl; Mon, 10 Apr 2023 02:12:14 -0700 (PDT) X-Google-Smtp-Source: AKy350ZzFp9fvk/3OcUIpkTLutloma9HbNyi+CmDVsAxqwkhTJ1mHpweaisKkz0EUcJf0kay4bca X-Received: by 2002:a17:906:19c:b0:947:bff2:1c2d with SMTP id 28-20020a170906019c00b00947bff21c2dmr6200948ejb.3.1681117934257; Mon, 10 Apr 2023 02:12:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681117934; cv=none; d=google.com; s=arc-20160816; b=KGn6rrjaViUIck4HwAXMMYyIV8D6vRXwJk7VqsvYcO1tZ4fJj7/V8uXcsHJBCuhBSU RwRyh5QyCAEiZI7TXzcIdVfYMRWR8vDP2ouoMIqOmdeFUyxfiPcp6FkNRfxouXr7knL0 pS0q2tekZgbg3GH0FGw0MLqbdOygZwjlhyXATMvQy5qrQJTKHwcySaZBQY2euLpc2xE+ rTCK080/9ii/bx0EVG8aayEmuOCwX9LccUSAEUYTs4Zvr+AawYWbc3GUNf22EOr82GCn kG0pPhjhy5Wg2Wp1ESUmJKVlXMb+P9clNRr6tkv1VmdtJMEj+6tc/B+IaoL28UmpVpND 3m0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=qYOSaPTX8YU6JKqDBPVJB41rZaIfJp+qox9pqnpp9t8=; b=FccnTbBVJp3PVFQmz0Rlrv9Xyt4tiTRfgTW6T8qcn2J7fncwKKxvn2LOmHGPoKz8DP OrAVnUI2UZQFtN7MhGhSFJcCOwmawzp0fCtsyUna/GxbB+eeSPL2A3BCXqiE2GJF0zjO fz0KFCcSViJ+fvNYQWrBwxZ4gE1G/MfPJUT+NICxZs+Sp24kggX2VIwjGVLsvYWjAmeb +IUBX9mSRSKA3KaEzzeoCI4Xx84asNfddAfcR7H1S5LM4vIRboUQhbYQiNQ9sObpIdHV iEh3ypYt7dLaEuURS80kn5eq/StIaKlBLWlflkWiKOyiuqcAgq5cVicJ77cIruz+fnAE V+ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iVF6eZh5; 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 wy12-20020a170906fe0c00b009256ac76f98si11434306ejb.676.2023.04.10.02.11.48; Mon, 10 Apr 2023 02:12:14 -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=iVF6eZh5; 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 S229818AbjDJJKy (ORCPT + 99 others); Mon, 10 Apr 2023 05:10:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229785AbjDJJKZ (ORCPT ); Mon, 10 Apr 2023 05:10:25 -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 B26D33AA7 for ; Mon, 10 Apr 2023 02:10:24 -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 4D1E360EAB for ; Mon, 10 Apr 2023 09:10:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B40B2C4339C for ; Mon, 10 Apr 2023 09:10:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681117823; bh=EnS4Za9wWGQUDLP6ZUsyP+vM/Yrl2QXc/bQ4IWvbCuY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=iVF6eZh5N9u9+FtOTYoV70kKks1IFjl3juU3kbDgbm2QaGXUV62X9L5aVb5+jK1yK 85NbDXTIZiPnp9JpNhlbMlO10N6guh4iVriRcqx8OPg2dECZ3oRP9HcN8DhVRCIJnR UaHJTsyil+3plUmpGMX9wujqnh+igYCXD6ZyBp7Z2xoWdE/w0gsv/MvP8XYxm/TuUs uMxYoUHsYfeh3wUhNC4e7MjRXCk9TG13Nz+RGFC66PwxPQcdd5jkgoewu4DHmxPqQl fXw2+P9VJSf5vhQ5lRyyL8Ops6t/6G/CqizL9DE1x+V0Jq7Hzdk3ukk24e1uUNzN/C 7Fxrx0U6HAV/Q== Received: by mail-lf1-f51.google.com with SMTP id r27so5680245lfe.0 for ; Mon, 10 Apr 2023 02:10:23 -0700 (PDT) X-Gm-Message-State: AAQBX9ewZdravQNCpez7SDLvUoemc62z1oUhlvinOeOFMXn06x70Fyjo H3cD+DNZieN7zZUimMwxfaN6BGCa+PhnGlZME9k= X-Received: by 2002:ac2:4908:0:b0:4db:1c2a:a96e with SMTP id n8-20020ac24908000000b004db1c2aa96emr1761537lfi.9.1681117821725; Mon, 10 Apr 2023 02:10:21 -0700 (PDT) MIME-Version: 1.0 References: <20230408152722.3975985-1-ardb@kernel.org> In-Reply-To: From: Ard Biesheuvel Date: Mon, 10 Apr 2023 11:10:10 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 00/10] crypto: x86 - avoid absolute references To: linux-crypto@vger.kernel.org Cc: Herbert Xu , Eric Biggers , Kees Cook Content-Type: text/plain; charset="UTF-8" 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 On Sat, 8 Apr 2023 at 17:32, Ard Biesheuvel wrote: > > On Sat, 8 Apr 2023 at 17:27, Ard Biesheuvel wrote: > > > > This is preparatory work for allowing the kernel to be built as a PIE > > executable, which relies mostly on RIP-relative symbol references from > > code, which don't need to be updated when a binary is loaded at an > > address different from its link time address. > > > > Most changes are quite straight-forward, i.e., just adding a (%rip) > > suffix is enough in many cases. However, some are slightly trickier, and > > need some minor reshuffling of the asm code to get rid of the absolute > > references in the code. > > > > Tested with CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y on a x86 CPU that > > implements AVX, AVX2 and AVX512. > > > > Cc: Herbert Xu > > Cc: Eric Biggers > > Cc: Kees Cook > > > > Ard Biesheuvel (10): > > > crypto: x86/camellia - Use RIP-relative addressing > > crypto: x86/cast5 - Use RIP-relative addressing > > crypto: x86/cast6 - Use RIP-relative addressing > > crypto: x86/des3 - Use RIP-relative addressing > > Note: the patches above are > > Co-developed-by: Thomas Garnier > Signed-off-by: Thomas Garnier > > but this got lost inadvertently - apologies. > > Herbert: will patchwork pick those up if I put them in a reply to each > of those individual patches? > Never mind, I'll be sending out a v2 in any case.