Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1033771pxb; Fri, 15 Apr 2022 19:03:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRLxUeTeULa+abPHtDIKIjzWAumCfB8EhkLfwhQzUf0qojblz/xmS/UblJ+bFvvkxemJd8 X-Received: by 2002:a17:902:c215:b0:14f:f1c2:9fe3 with SMTP id 21-20020a170902c21500b0014ff1c29fe3mr1467107pll.145.1650074634310; Fri, 15 Apr 2022 19:03:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650074634; cv=none; d=google.com; s=arc-20160816; b=GBJcmtdG3UQ8hPTQAP5uVBQm55DWBT1ZZPNT2bAfOhEMl2j8RGkciN/zw8vkh8/mEy qg2XJIA1aO9UEwzQKlCv8yaO5LKdY8VshxUky6t8x5CSkifgiy1jjGl2YsefnUxg7LRr +UWR2YFEfI9qvb14tOTVhJ7sy6da5eF00ASXThlRUnNhCAZmjQ2dHaL1ToEuJ23jAJrB hIShDnG72kMGhcEYqL61hQym8G7yQgt56xHsI+eEqg05hSqXacJ0TT/OeXAKyXs4Qf/7 HQQ3rDltSI+L59mSyAYqvYa6EMJii2ExnsQIqrxwirPWyddsEUBPVeFkSRAof9bo2XTf LxNg== 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=TfMWh2+ZuWGhhP5dea+Jfs1ZS9Z+UkxFG4gVrbj2rfY=; b=O5z6JirkYG47XJ4qczCIILQ5Ws9EYVq3+PJQHFVcYVxbpyk86SW+7/ARHMr5uLsPRw eJBtw7ahDc7ASRh7yMWnzYijzRIORWnPV6/1pnhWjDthVr2dWV8DgfKIZK+aaeuEgFYK QlseUVxSba1polfhI6ywbtcmuo8yikOWGiBS8pm/n/z4rCBWSNRSZwjLmDvrtnrcEuuC hIar6SGbJyh1HyIkqUY9Vbds9uTa9at5dXe8iRxK7th+1zkg627V7iEIVn72M5xZUIoj 25Kwe6k5QSOHiD5BTTADIma+1K4w6Gc/zcKHPn79H7B5+9DmYl5F9djqdr8WRkX8Y88h Yhjg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id m11-20020a170902bb8b00b001571cc04889si2672191pls.106.2022.04.15.19.03.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 19:03:54 -0700 (PDT) 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; 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3EFAA1D66DD; Fri, 15 Apr 2022 18:23:13 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350379AbiDOGyT (ORCPT + 99 others); Fri, 15 Apr 2022 02:54:19 -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: 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 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