From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A53E3C433EF for ; Wed, 2 Mar 2022 22:42:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229570AbiCBWn3 (ORCPT ); Wed, 2 Mar 2022 17:43:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229499AbiCBWnW (ORCPT ); Wed, 2 Mar 2022 17:43:22 -0500 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31DF010DA55; Wed, 2 Mar 2022 14:42:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646260958; x=1677796958; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=rbbW6zgJhdL9jTUIjV0Xlnv2OOGVQA6qbG62TLxohm0=; b=FsO4is93K045DnGK93t7T/oX5D6QUNugPwidN75HJ74ld5rRPF5sZPxN pjRPwjfcgbNou1ZLQKVIZ+62hDEp7itStJGeAmbvpG0tzsMncWp+svOLO AFn2OvB9it9e59gV7Ocs/k3bSxrHLO6vcOg7syiZ5+/lpjrAAxlcGW+xK ebVKkM3BoRjwF9EuVoQTDZaZ1O/RMCZ6y02dfY1BDvp/4PHAQeT7LMkPp kTspu1vlIyki4Y3sxLBdOJ38Ay3+sYx0DlEz98TajHfKrMqOgMqz+ZroH jTyPW7ADLV2TRuZqi2EaHzq386NVCcqkW1oxmqbRj/GiMqbgBjZTlv5eC w==; X-IronPort-AV: E=McAfee;i="6200,9189,10274"; a="314240759" X-IronPort-AV: E=Sophos;i="5.90,150,1643702400"; d="scan'208";a="314240759" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2022 14:42:37 -0800 X-IronPort-AV: E=Sophos;i="5.90,150,1643702400"; d="scan'208";a="508365588" Received: from silpixa00400314.ir.intel.com (HELO silpixa00400314) ([10.237.222.76]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2022 14:42:35 -0800 Date: Wed, 2 Mar 2022 22:42:20 +0000 From: Giovanni Cabiddu To: Herbert Xu Cc: Greg KH , Linus Torvalds , Kyle Sanderson , Dave Chinner , qat-linux@intel.com, Linux-Kernal , linux-xfs , Linux Crypto Mailing List , device-mapper development Subject: Re: Intel QAT on A2SDi-8C-HLN4F causes massive data corruption with dm-crypt + xfs Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Research and Development Ireland Ltd - Co. Reg. #308263 - Collinstown Industrial Park, Leixlip, County Kildare - Ireland Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, Mar 03, 2022 at 10:27:47AM +1200, Herbert Xu wrote: > On Wed, Mar 02, 2022 at 03:56:36PM +0100, Greg KH wrote: > > > > > If not, then these are the patches that should be backported: > > > 7bcb2c99f8ed crypto: algapi - use common mechanism for inheriting flags > > > 2eb27c11937e crypto: algapi - add NEED_FALLBACK to INHERITED_FLAGS > > > fbb6cda44190 crypto: algapi - introduce the flag CRYPTO_ALG_ALLOCATES_MEMORY > > > b8aa7dc5c753 crypto: drivers - set the flag CRYPTO_ALG_ALLOCATES_MEMORY > > > cd74693870fb dm crypt: don't use drivers that have CRYPTO_ALG_ALLOCATES_MEMORY > > > Herbert, correct me if I'm wrong here. > > > > These need to be manually backported as they do not apply cleanly. Can > > you provide such a set? Or should I just disable a specific driver here > > instead which would be easier overall? > > I think the safest thing is to disable qat in stable (possibly only > when DM_CRYPT is enabled/modular). The patches in question while > good may have too wide an effect for the stable kernel series. > > Giovanni, could you send Greg a Kconfig patch to do that? I was thinking, as an alternative, to lower the cra_priority in the QAT driver for the algorithms used by dm-crypt so they are not used by default. Is that a viable option? Sure, I can provide a patch for either the cra_priority or the Kconfig option for the stable kernels that don't have the patches above. -- Giovanni