Received: by 2002:a05:6512:3d0e:0:0:0:0 with SMTP id d14csp50334lfv; Tue, 12 Apr 2022 16:53:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwczK2WZYdXa6z3xV1uDlNg+K1BTqyDrQJeeDQmL1ZVFzs3Tdtm4keZhqsrn9ciIHx0nQcx X-Received: by 2002:a17:902:7247:b0:156:9d3d:756d with SMTP id c7-20020a170902724700b001569d3d756dmr40155999pll.6.1649807580145; Tue, 12 Apr 2022 16:53:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649807580; cv=none; d=google.com; s=arc-20160816; b=FzfWLEItsLIU4POjh7SlWUXa0kVjnfkfvgkG+cOZ4RItSQR0Je9oeuvEdVMAt+h8PI fVU1e2cVDZXRzHPwK1ebqQeqqegZCrL4wAcSNU6X2zEr3MEjz1VzpTKTlbOvdB2Min6J FFDBpWkYjkj6NO0f5XivP9mQeth2GKaVaix4Zs8pVkS6CP0kBzElvAg6siXtCji9KoI9 GezZO4Q/gKsNBR2uX+WWaZQAq191pkiJgSpVaVuUWFK8j98iYh4XtFIhjuFjLncX2+vI niZfqCjVSYdeac7nbJTEE6N+dRGJdaT100cbqTS1oPi2nTfEbnThC43A6EW+4tvnipAf xZ+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=Vyj4nla6YNRM/R6UpEhcsOcpHljaR9DXAKNiuaO6lJk=; b=Lg20ztYAl4BP9qb2QT2txeeWYYjv3bOYnCq1Q5y5Oooto07ZzvfMGNdP4/XIWwLjyT hllw+S+m1g3RU8LfTU6K+j4nuA1EspBWG2693YMc3HfcTsuNaa5g46ViO0jhCLP4KpHK lMiCqqgh+EcnHyveX9KybPme4meh6z9/sQhFjq9baQAW8kZC0zWDtSuNrQ4ztw5tDCR9 lzwGx9/Op5KjsMwqYQ+ECVAPtv/Vnb0arqJTD7fCTgpCYC+wK7cEVZQEOthhfJCRGEkG Y/ucifiI8fhXjGs2LQAnJo2zm8iMwdBJM4oL1PmzbZGhnuTPDvp/RpgZ18H6eUYkUlpb sarA== 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 o11-20020a170903300b00b00156a405c568si11418547pla.231.2022.04.12.16.52.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 16:52:58 -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 818D11EDA06; Tue, 12 Apr 2022 14:47:15 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352378AbiDLLmo (ORCPT + 99 others); Tue, 12 Apr 2022 07:42:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353328AbiDLLiK (ORCPT ); Tue, 12 Apr 2022 07:38:10 -0400 Received: from fornost.hmeau.com (helcar.hmeau.com [216.24.177.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C78AC2AEC for ; Tue, 12 Apr 2022 03:19:04 -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 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-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 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