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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20B5DC433EF for ; Tue, 12 Apr 2022 10:19:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6B4606B0078; Tue, 12 Apr 2022 06:19:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 664266B007B; Tue, 12 Apr 2022 06:19:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 57A136B0080; Tue, 12 Apr 2022 06:19:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.a.hostedemail.com [64.99.140.24]) by kanga.kvack.org (Postfix) with ESMTP id 4CA8E6B0078 for ; Tue, 12 Apr 2022 06:19:03 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 108CB622AD for ; Tue, 12 Apr 2022 10:19:03 +0000 (UTC) X-FDA: 79347828966.12.1B3749D Received: from fornost.hmeau.com (helcar.hmeau.com [216.24.177.18]) by imf21.hostedemail.com (Postfix) with ESMTP id D35861C0005 for ; Tue, 12 Apr 2022 10:19:01 +0000 (UTC) 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 1neDbi-001uO8-2v; Tue, 12 Apr 2022 20:18:47 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Tue, 12 Apr 2022 18:18:46 +0800 Date: Tue, 12 Apr 2022 18:18:46 +0800 From: Herbert Xu To: Catalin Marinas Cc: Ard Biesheuvel , 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: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Stat-Signature: i1gb3jjsho85f5j6hdwkj8ixqetymahn Authentication-Results: imf21.hostedemail.com; dkim=none; spf=pass (imf21.hostedemail.com: domain of herbert@gondor.apana.org.au designates 216.24.177.18 as permitted sender) smtp.mailfrom=herbert@gondor.apana.org.au; dmarc=none X-Rspam-User: X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: D35861C0005 X-HE-Tag: 1649758741-265557 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Apr 12, 2022 at 11:02:54AM +0100, Catalin Marinas wrote: > > This series does not penalise any architecture. It doesn't even make > arm64 any worse than it currently is. Right, the patch as it stands doesn't change anything. However, it is also broken as it stands. As I said before, CRYPTO_MINALIGN is not something that is guaranteed by the Crypto API, it is simply a statement of whatever kmalloc returns. So if kmalloc is no longer returning CRYPTO_MINALIGN-aligned memory, then those drivers that need this alignment for DMA will break anyway. If you want the Crypto API to guarantee alignment over and above that returned by kmalloc, the correct way is to use cra_alignmask. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt