Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp35862rdb; Fri, 29 Sep 2023 15:47:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHuJWDv5nqeQIlu5gqISQ1FVMGvfgmizeQ2zPtGFbYYB19WvZTXFP2PgH2Wn/InSXzyEosW X-Received: by 2002:a05:6a00:1506:b0:690:2818:a4ce with SMTP id q6-20020a056a00150600b006902818a4cemr6519589pfu.7.1696027641750; Fri, 29 Sep 2023 15:47:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696027641; cv=none; d=google.com; s=arc-20160816; b=j4SzeI6wbY/Mpl8Al8lKdHSsIIXsOjeVBaKAllUTb5a2xWunSQcgeum2zPLSkRPG+z XOFU9bpyc5qdKSgvFI6UkIR9nPEx3KeHlZoi8GQCLucWmygQK7nBoVq/BtD3Zxkl9mQR R1ay+p2CKuxqN7A2xZR7rCz63CGFYea2NgoP6TZJArHy6QcG5jzGoGSf7QuIjvOsU0pD WEj6CbInbpwVR6drh2SL/dlHvbKFBILDugaU2iQ75ugwrKL6QFGEszD0z9TDikbeBgP0 7seJ4+quHCc8xlfAyYvGtl8xi0563h4ogfzNjD0WoR0AqAnBwFvJyhZhOCi5C3+G7PWV KFGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=hDSARk/WGzFrB9b7VhKoTBIhnSjRNDaqdLiP6yIPYzw=; fh=Xlssc+1vZC/xNIgyFW6FfAaBUrUacvC7ncVndmSy24c=; b=yAsTd6XZelSRW0/7fqc+Ki7w/Hk2jO3po3sg+Ob551aM+a82h34t3yhhrIRhF1PY7k 9KbvEuzSMIgBmodBir+T1G9BTQnG1wE4BRiN4meT6iedsTxHGCeDiZUrbxtTEqQnUj42 pqGw1u1HaQXF+rEIyxAr2hfnjte+ouvRr1+kj3Enbezv/dtn1NWqQ10N825WV9SUvNNE rxTN02qOemERIxdXwi5ghPCQ37Y+bQzIjvAmilQ4whQvNwiwNkwBK6TJJFA7hWsujbO0 vXbiuE1nIVrVQhurGL5n5p9NJOk8gBq/cIThNvKD7SJUDirK85tJB/ObQwGWczyUWp+P +QjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZrUibAlV; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id b22-20020a639316000000b00584d3c90592si11284466pge.411.2023.09.29.15.47.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 15:47:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZrUibAlV; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id D10758077986; Fri, 29 Sep 2023 15:44:53 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233885AbjI2Wnb (ORCPT + 99 others); Fri, 29 Sep 2023 18:43:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233865AbjI2Wnb (ORCPT ); Fri, 29 Sep 2023 18:43:31 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5762D1A5 for ; Fri, 29 Sep 2023 15:43:29 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4C37C433C8; Fri, 29 Sep 2023 22:43:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696027408; bh=UYc7qcXwIPN8R+5u/B3YnekPh2cUVdEgNsXWyhg6OR8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZrUibAlV4Q4kEEnJGVockzjSmIcXxeZnRM9kpZnb8BoZ65fYHiMcjlwm4IZ3XT2vQ NS8mwJIFDRyV2x2Ka8HjAgNuCnwkqqPnsScJpvG/sFTEmxrMe0IoYwSthX9WUqDTO3 5rl1HC7ZLX9zttFLu7ZOtp2ETKHkO22Hk6hx6PjFDcT9GnY2A8l8yQnJw1DJy1PrDf t37Pu+oLy/urZEncbDdXysWWu/wrLDm9e5FhWLZAOF2Chz4Zbmxz+JTozbbkUQ0Apq /8bCzHnaHfzzueQm2UZCkejsfhGtoABQn/V8TO+0pS7Iloz51dOgRCoT4rw8lVmSRG n0EreCRz32Xkw== Date: Fri, 29 Sep 2023 22:43:27 +0000 From: Eric Biggers To: Yureka Cc: linux-crypto@vger.kernel.org, regressions@lists.linux.dev, Mikulas Patocka , dm-devel@redhat.com, Boris Brezillon , Arnaud Ebalard , Srujana Challa Subject: Re: [REGRESSION] dm_crypt essiv ciphers do not use async driver mv-aes-cbc anymore Message-ID: <20230929224327.GA11839@google.com> References: <53f57de2-ef58-4855-bb3c-f0d54472dc4d@yuka.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53f57de2-ef58-4855-bb3c-f0d54472dc4d@yuka.dev> 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 29 Sep 2023 15:44:54 -0700 (PDT) Hi Yureka, On Fri, Sep 29, 2023 at 11:08:55PM +0200, Yureka wrote: > #regzbot introduced: 7bcb2c99f8ed > > I am running the NixOS distribution cross-compiled from x86_64 to a Marvell > Armada 388 armv7 SoC. > > I am not getting expected speeds when reading/writing on my encrypted hard > drive with 6.5.5, while it is fast on 5.4.257. Volume is formatted like this: > `cryptsetup luksFormat -c aes-cbc-essiv:sha256 /dev/sda`. > > Specifically, I tracked this down to the changes to crypto/essiv.c from > 7bcb2c99f8ed mentioned above. Reverting those changes on top of a 6.5.5 kernel > provides working (see applicable diff further below). > > I'm *guessing* that this is related to the mv-aes-cbc crypto driver (from the > marvell-cesa module) being registered as async (according to /proc/crypto), > and I *suspect* that async drivers are not being used anymore by essiv or > dm_crypt. Going by the commit description, which sounds more like a refactor, > this does not seem intentional. This is actually from commit b8aa7dc5c753 ("crypto: drivers - set the flag CRYPTO_ALG_ALLOCATES_MEMORY"), which set CRYPTO_ALG_ALLOCATES_MEMORY in marvell-cesa. 7bcb2c99f8ed is just one of the prerequisite commits. I understand that the dm-crypt developers did this as an intentional bug fix in order to prevent dm-crypt from using crypto drivers that are known to cause deadlocks due to allocating memory during requests. If you are interested in still being able to use marvell-cesa with dm-crypt, I believe it would need to be fixed to meet the requirements for not needing CRYPTO_ALG_ALLOCATES_MEMORY. I've Cc'ed the maintainers of that driver. #regzbot introduced: b8aa7dc5c753 - Eric