Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp329397pxm; Wed, 2 Mar 2022 16:32:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJxSfB98XFjOCEkxPEIhXrcrz9YkLzRqq4yFpcuDy5x1zIZUQekLHpKZ6CGI9uTRFnUZm6is X-Received: by 2002:a63:cf0f:0:b0:376:48b:45e5 with SMTP id j15-20020a63cf0f000000b00376048b45e5mr25410351pgg.230.1646267538024; Wed, 02 Mar 2022 16:32:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646267538; cv=none; d=google.com; s=arc-20160816; b=jYZXva4LDy8aMNYYxBnm3axPtPHqRd7msESOWvub4Q3XNeERngJnFQeMZ6org8A9Kk TklULqfD39veZqXzxNLfI2LVRaAGsP9RlPkQIUYzz5g0EYL7FOuJHC8KgX/BUW9kv8ug wLKWJTtg0fF9cP0m6T1pS8swg00cO6tbhMIf1KLrctjEnlI8xHLWKvhHm//MHu4+1rQK /p780pXlNypamiwxLqdbtTVIlyQE+6Mr6A+977cUa4TmnmCq5XYPBLjpSTkDGW1DIiTD +tLawTwuRsdh1zUOqW6Hvlsp70Xi9AWjQuqqXu3Zzv+amrfw+UZ+fLbtS1y3l5twvtIx Ou9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=nXs0e4Rq284XHxvd5GsjyZ3hbSIobxBGOtlxGvp0Zjc=; b=EKC1pOv+9yWRWxkPeg5BdQy5h/lRj342QAeZ8EVjq8dJPsEXTGY+/F0p8CA4IivIM2 Got9yamXJtIulwiuZr/2x3Z3acWmmGX2SnJrV+3SMaqGyS3cNYob+mk2ynYzYyql6gp3 acP3Dc8EqP0Wjte35S3gwqdtqD9Mf7SSWG8O4G/YWlrHRNmZVqu87CHo/HX5C370Dgj4 8oY5f2s1v6eQOWULQ7UYXHtfOp0JxNYXDVn7fA3fj5XwdE7gcYOFp1myPueBgiBbv7F/ eZ0WycawWuI06/ceEugHKWccjEQJD+LWW1u3EBZWkKZdlumwyZZKn4TrG0IBaETSiVjV PfQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FsO4is93; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q7-20020a656a87000000b00378d9d69e5csi598729pgu.655.2022.03.02.16.32.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 16:32:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FsO4is93; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BA3C7238923; Wed, 2 Mar 2022 15:43:30 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229834AbiCBWnb (ORCPT + 99 others); Wed, 2 Mar 2022 17:43:31 -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 X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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-kernel@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