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 1C0B6C4321E for ; Mon, 28 Nov 2022 04:07:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229793AbiK1EHS (ORCPT ); Sun, 27 Nov 2022 23:07:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229682AbiK1EGs (ORCPT ); Sun, 27 Nov 2022 23:06:48 -0500 Received: from formenos.hmeau.com (helcar.hmeau.com [216.24.177.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEA671097; Sun, 27 Nov 2022 20:06:46 -0800 (PST) Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1ozVPc-001OkT-0q; Mon, 28 Nov 2022 12:06:33 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Mon, 28 Nov 2022 12:06:32 +0800 Date: Mon, 28 Nov 2022 12:06:32 +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" , Linux Crypto Mailing List Subject: Re: [v2 PATCH 3/9] crypto: aead - Add ctx helpers with DMA alignment 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-crypto@vger.kernel.org On Fri, Nov 25, 2022 at 12:24:31PM +0000, Catalin Marinas wrote: > > I wonder, if drivers end up calling this, isn't it easier to do the > alignment in crypto_aead_ctx() directly? There are over 300 callers (not > sure about the padding though, it may need still driver changes unless > we can add it to something like crypto_tfm_alg_alignmask()). Or is the > expectation that not all drivers need a DMA alignment? I'm only changing the specific drivers that map things from the ctx structures for DMA. So it's not as bad as a simple grep would suggest. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 582B0C4321E for ; Mon, 28 Nov 2022 04:07:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OWy5ukltfhjPLLZyo6LXptfb+S/lP442/tNe7ScXlKw=; b=NrdgrjFA6y7f71 LHpbg+i1Uha87AOKG7h1hK1Ho5Dn9saQamT3wlrDKE3PRWmvqrpUmgqaganQOKu4WoU/AVMf+OR6Y nx86yDVCg/4Az0GWkQquY1ubt5/Hadg2cjApy1R6aZCQ12MD2xuQV9R1hDHskDcpUM+RZAL82Jm4l f0NI4Kj/DJaz6/7M/yru9wwrqbdT0jANFf/Hjt5X2rUPNHsundDZsNY3Oqu6jigI5YI4zGHjTHKu0 6PQiXKTQsPDFSWQxwiMSYmewlcNmxlazFt4jkq8MyCImtFrjCaY54xGiKre9OhXycTCDxq4nTAeTf W76AjEPCXcKaHq6+4o6g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ozVPr-00FmHd-5L; Mon, 28 Nov 2022 04:06:47 +0000 Received: from helcar.hmeau.com ([216.24.177.18] helo=formenos.hmeau.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ozVPn-00FmFj-T3 for linux-arm-kernel@lists.infradead.org; Mon, 28 Nov 2022 04:06:45 +0000 Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1ozVPc-001OkT-0q; Mon, 28 Nov 2022 12:06:33 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Mon, 28 Nov 2022 12:06:32 +0800 Date: Mon, 28 Nov 2022 12:06:32 +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" , Linux Crypto Mailing List Subject: Re: [v2 PATCH 3/9] crypto: aead - Add ctx helpers with DMA alignment Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221127_200643_975528_39DC2EC2 X-CRM114-Status: GOOD ( 11.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Nov 25, 2022 at 12:24:31PM +0000, Catalin Marinas wrote: > > I wonder, if drivers end up calling this, isn't it easier to do the > alignment in crypto_aead_ctx() directly? There are over 300 callers (not > sure about the padding though, it may need still driver changes unless > we can add it to something like crypto_tfm_alg_alignmask()). Or is the > expectation that not all drivers need a DMA alignment? I'm only changing the specific drivers that map things from the ctx structures for DMA. So it's not as bad as a simple grep would suggest. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel