Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2670160pxb; Sat, 28 Aug 2021 23:36:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz480i2EOgD5UnW6rYCh93Czn6nfugZUpscFPQ4fwDY3ucsg4U6VyMTC6DubIPGptI4YSqC X-Received: by 2002:a6b:3c16:: with SMTP id k22mr14066686iob.130.1630218995181; Sat, 28 Aug 2021 23:36:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630218995; cv=none; d=google.com; s=arc-20160816; b=rNXMMsMB6z0mGkAe4mT1v7w7BbvEOjDT8lu9kqLUIQhm3UXhOxMUtvdywns8QkqZ7w u9MczmTx0HsUFTvvQuODRdGA6zQHP0tu5ONNZdM6okE++cHC4n+GR80EgtxYs1Y5YXw5 5mgFhXM6LIjUchVSlTbJ+Hf14siIpDXMeYyN8MZE62V6n7EhRfkiFnlF/79xVBOPr0dj b/lBfzbkhghz3WzWfv8H7px7fWEW+f8Nbf7PR3xDSEfflWZKT4U0vOszEgJnb4F+VOw5 puUXyeTs7aFInBaGydNn52WNuOZmfUj9QCCmPzHSV5/iG162BNKXSDbvrCGcOcGc9E3C 8ujQ== 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=v7OL7CW4hl/PsRFxXEU9waahK2ZaSu5n/YgIU8v40qo=; b=FLmIPid7rgpteQhhEfokuqj+PJVDVIpV8aOAR37wWs4IRb2Xoxa67JNDjBmooMldrh gW5RXUUBmIN8YzWJoGLRR4p+cVT3jVtj1gwK4A8TC6/o7kUX25zOkxU3nin6mchPSHNI tMMHCUhksM5RfXqjPIm1qHA4h/OvEhsJNnNVnTd/6+VsGASGbByKse58M1BNKy9vhaXD wn1c5j3xqgqG0ar0VZyNtTMT3YdscOdyQhF1779V9mZRumjTyB1h009RxEobm6WN71xR I+/oVwpkXQ4piB44wjc41UssSKS7JIkA5JqdVrdv1ZjkPaCHSKMFZG/xbVCj8aotpSne 1Hlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MDNvM6+p; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d4si10766779jak.4.2021.08.28.23.36.09; Sat, 28 Aug 2021 23:36:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MDNvM6+p; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 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 S234468AbhH2Ggl (ORCPT + 99 others); Sun, 29 Aug 2021 02:36:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:45018 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229889AbhH2Ggk (ORCPT ); Sun, 29 Aug 2021 02:36:40 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5013A60F3A for ; Sun, 29 Aug 2021 06:35:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1630218949; bh=gouh2jUKjraaXw/3WQe6g+nWymHOqcJ2u0l1N3+mCqA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=MDNvM6+paTOLNzq+9xma1UkaN1M6PBfyOA/SZyuXPrMjNI8f3+kkJxYQcuXPylPpw iogXU4l0QBcq1jo2Kk+ku4nFgMd6mvAk6RgmUmcXA5QtWkJ+0R6AI/T5SIygAmJWL1 0dhEINtpfWMZq42Iy5ec8JUZ1hoe2jX4mFE5rEStuy/PAg9SYOPEYT5lhXVBL436bT l33oSruzE5zNfA2SYOcjrCuPy4fwPzb5zCrcZ6LeP/yKVYQEgAZMALuzgR7ihksyrG hi6H3gwNtF/V41Z713YwxOwY6QA18zBdOMxUj8eSHFvTO8xeCTf51kNyltDyWnHKQ/ n6KOEzQ9Gu9Vg== Received: by mail-ot1-f54.google.com with SMTP id m7-20020a9d4c87000000b0051875f56b95so13911919otf.6 for ; Sat, 28 Aug 2021 23:35:49 -0700 (PDT) X-Gm-Message-State: AOAM532CUBmAIMyf9ariJhy3vz8hl4VnvmhG1hI1HjztJq2TTTeCZMpy wgyFwyxLk6BKcBhc/qiscVHvqhFL+BfeMEQkpRU= X-Received: by 2002:a05:6830:444:: with SMTP id d4mr14670303otc.108.1630218948588; Sat, 28 Aug 2021 23:35:48 -0700 (PDT) MIME-Version: 1.0 References: <20210827070342.218276-1-ardb@kernel.org> In-Reply-To: <20210827070342.218276-1-ardb@kernel.org> From: Ard Biesheuvel Date: Sun, 29 Aug 2021 08:35:37 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v7 0/7] running kernel mode SIMD with softirqs disabled To: Linux Crypto Mailing List Cc: Linux ARM , Herbert Xu , Eric Biggers Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Fri, 27 Aug 2021 at 09:03, Ard Biesheuvel wrote: > > This is a follow-up to [0], but given that the arm64 architectural > pieces have been merged for arm64, the only remaining changes are crypto > specific. Therefore, the audience has been reduced to those people who > are somewhat more likely to care about these specifics. > > The AEAD and skcipher APIs may only be called from task or softirq > context. This permits the arm64 AEAD and skcipher code to get rid of all > scalar fallbacks, given that on this architecture, softirqs are now no > longer served while the SIMD unit is being used in kernel mode, which > means that the scalar fallbacks are never needed. These are removed in > this series. > > Changes since v6: > - add patch to yield the NEON every 4k of input when processing the AAD > - add some more acks from Eric > > Changes since v5: > - add Eric's R-b to patches #1 to #3 > - split CCM changes into 3 separate patches > > Changes since v4: > - drop skcipher_walk layer change to deal with zero sized walks > - drop aead/skcipher layer sanity checks on invocations from hardirq > context > - add patch to clean up CCM a bit more after removing the SIMD code path > > Changes since v3: > - clarify the nature of the issue addressed by patch #1, and apply the > same fix to the skcipher walker > - update patches #2 and #3 so that the failures can be observed by the > crypto stats code > > [0] https://lore.kernel.org/linux-arm-kernel/20210302090118.30666-1-ardb@kernel.org/ > > Ard Biesheuvel (7): > crypto: arm64/gcm-aes-ce - remove non-SIMD fallback path > crypto: arm64/aes-neonbs - stop using SIMD helper for skciphers > crypto: arm64/aes-ce - stop using SIMD helper for skciphers > crypto: arm64/aes-ccm - yield NEON when processing auth-only data > crypto: arm64/aes-ccm - remove non-SIMD fallback path > crypto: arm64/aes-ccm - reduce NEON begin/end calls for common case > crypto: arm64/aes-ccm - avoid by-ref argument for ce_aes_ccm_auth_data > Herbert, Any chance we could get this queued for v5.15? If it's too late, please consider taking only the first three patches as an alternative, and I will resend the CCM ones for v5.16 once they have all been reviewed. Thanks, Ard. > arch/arm64/crypto/Kconfig | 6 - > arch/arm64/crypto/aes-ce-ccm-core.S | 24 +-- > arch/arm64/crypto/aes-ce-ccm-glue.c | 203 ++++++------------- > arch/arm64/crypto/aes-glue.c | 102 ++-------- > arch/arm64/crypto/aes-neonbs-glue.c | 122 +----------- > arch/arm64/crypto/ghash-ce-glue.c | 209 +++++--------------- > 6 files changed, 148 insertions(+), 518 deletions(-) > > -- > 2.30.2 >