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 8445CC433F5 for ; Fri, 15 Apr 2022 06:51:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350755AbiDOGyU (ORCPT ); Fri, 15 Apr 2022 02:54:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241069AbiDOGyS (ORCPT ); Fri, 15 Apr 2022 02:54:18 -0400 Received: from fornost.hmeau.com (helcar.hmeau.com [216.24.177.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FA9BAC041 for ; Thu, 14 Apr 2022 23:51:50 -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 1nfFng-003DBN-J4; Fri, 15 Apr 2022 16:51:26 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Fri, 15 Apr 2022 14:51:24 +0800 Date: Fri, 15 Apr 2022 14:51:24 +0800 From: Herbert Xu To: Catalin Marinas Cc: Ard Biesheuvel , Will Deacon , Marc Zyngier , Arnd Bergmann , Greg Kroah-Hartman , Andrew Morton , Linus Torvalds , Linux Memory Management List , Linux ARM , Linux Kernel Mailing List , "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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 13, 2022 at 09:47:29AM +0100, Catalin Marinas wrote: > > With my series, there is no change to the value of CRYPTO_MINALIGN for > arm64 or any other architecture, so point 3 is unaffected. The series > does change the kmalloc() alignment and that may be smaller than > CRYPTO_MINALIGN but neither of points 1 or 2 above are affected since > (a) we still have a sufficiently large ARCH_KMALLOC_MINALIGN of 64 and > (b) the kmalloc'ed buffers are safe for non-coherent DMA. > > Herbert, Ard, if I missed anything please let me know but based on my > understanding, this series is safe for the crypto code. Sorry, but you can't change CRYPTO_MINALIGN to a value greater than the minimum alignment returned by kmalloc. That simply doesn't work. There is no magic in the Crypto API that makes this work. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt