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 0B992C4321E for ; Mon, 28 Nov 2022 04:07:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229774AbiK1EHa (ORCPT ); Sun, 27 Nov 2022 23:07:30 -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-kernel@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