Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp974358pxb; Wed, 6 Apr 2022 05:46:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYvNviX1+TrthzP5wcpy5kni17vnZ9JrnHeP0m7TnuTRLLZBBKvV1GZGC0ZGXOknP5C5wR X-Received: by 2002:a65:57ca:0:b0:381:ea8d:4d1f with SMTP id q10-20020a6557ca000000b00381ea8d4d1fmr7132352pgr.143.1649249211202; Wed, 06 Apr 2022 05:46:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649249211; cv=none; d=google.com; s=arc-20160816; b=bw57PgUdd1iN1jEgXL9Zge0fM9J9Yr5A10zFQJZ/xH7wFQxzvJnGNmRN1OTL0aa/7+ orhkelwZdhTN/icFaA/d99gvI4KrthtZF+S38XCEWCLcCnvx4iBvwZpIjhOsirLZpV9u I4I1RZ0n6GlCx1vcf6mESD9OwGwUyfqyNZIjXFp7L8yB4V54ZzYHPb6/sHcQTabao868 VaGKeeq+hjyXM5Ffgwge7IyvAf+hZE7TBOGZyNNe0F4gsPhQkEmfZyAVEixN9V8IaG78 zGq1UGbWcB+Qbsy50MpFD1R9obXYQiTJsOqQKYqS1Bre1YG5FIAUObgNCnm3SIpKr3Le 7G/g== 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; bh=7KRpa6RY4QfMUse7AVO733PUftqzwQeG9wccys5vDng=; b=FZXM7CIONNwPexCTVZ8uiGyxzx10oKztMMFa84/eH9nXaag95MCZXWRmzB4pK3yunz ZNdsW44A9tr+a2MeKL2GhmdeaG19WhpRtHCBFCumbbEFGpiypA5LYdHbsYYkooS0HgfA 6oLzVMhq3WkmblDZNU41jH8/u3FufHBiaUiLt/kuWWlTDbdOu6w3rdQdIVP/HHl/1k+x l6iCpDZuNQ9ZlcUD9mYoxouAPNHbSem4UqZZwTwD5hv7IRCMPHXidc6AIfu08VaaDYkc QAR7t71xuXk7xy5II0rUTNOaoU04dWGZoreoAnwIfOo5iNJ3Ji2MzHx0L4tpNL75bwG+ muNQ== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id pc5-20020a17090b3b8500b001cac43b54c3si5259071pjb.150.2022.04.06.05.46.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 05:46:51 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C29B35CEE18; Wed, 6 Apr 2022 02:31:16 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1850676AbiDFCyZ (ORCPT + 99 others); Tue, 5 Apr 2022 22:54:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1449305AbiDFAyL (ORCPT ); Tue, 5 Apr 2022 20:54:11 -0400 Received: from fornost.hmeau.com (helcar.hmeau.com [216.24.177.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1C6919E3AB for ; Tue, 5 Apr 2022 15:57:28 -0700 (PDT) Received: from gwarestrin.arnor.me.apana.org.au ([192.168.103.7]) by fornost.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1nbs6h-000qES-8W; Wed, 06 Apr 2022 08:57:04 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Wed, 06 Apr 2022 08:57:03 +1000 Date: Wed, 6 Apr 2022 08:57:03 +1000 From: Herbert Xu To: Catalin Marinas , Ard Biesheuvel Cc: Will Deacon , Marc Zyngier , Arnd Bergmann , Greg Kroah-Hartman , Andrew Morton , Linus Torvalds , linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, "David S. Miller" Subject: Re: [PATCH 07/10] crypto: Use ARCH_DMA_MINALIGN instead of ARCH_KMALLOC_MINALIGN Message-ID: References: <20220405135758.774016-1-catalin.marinas@arm.com> <20220405135758.774016-8-catalin.marinas@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220405135758.774016-8-catalin.marinas@arm.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Tue, Apr 05, 2022 at 02:57:55PM +0100, Catalin Marinas wrote: > ARCH_DMA_MINALIGN represents the minimum (static) alignment for safe DMA > operations while ARCH_KMALLOC_MINALIGN is the minimum kmalloc() objects > alignment. > > Signed-off-by: Catalin Marinas > Cc: Herbert Xu > Cc: "David S. Miller" > --- > include/linux/crypto.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/crypto.h b/include/linux/crypto.h > index 2324ab6f1846..654b9c355575 100644 > --- a/include/linux/crypto.h > +++ b/include/linux/crypto.h > @@ -167,7 +167,7 @@ > * maintenance for non-coherent DMA (cache invalidation in particular) does not > * affect data that may be accessed by the CPU concurrently. > */ > -#define CRYPTO_MINALIGN ARCH_KMALLOC_MINALIGN > +#define CRYPTO_MINALIGN ARCH_DMA_MINALIGN I think this should remain as ARCH_KMALLOC_MINALIGN with the comment above modified. The reason is that we assume memory returned by kmalloc is already aligned to this value. Ard, you added the comment regarding the DMA requirement, so does anything actually rely on this? If they do, they now need to do their own alignment. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt