Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2323250pxb; Sun, 17 Apr 2022 18:45:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3RxIgD7VnlVP/bUuGOKxnXbEHDyfN+8hkgCjB8nfiLnBnnOuOiSppWdjxxywmN+iPzZNg X-Received: by 2002:a05:6402:294e:b0:41c:c191:64bc with SMTP id ed14-20020a056402294e00b0041cc19164bcmr10212730edb.166.1650246307632; Sun, 17 Apr 2022 18:45:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650246307; cv=none; d=google.com; s=arc-20160816; b=p5aLw+0pTndbk0XYA7Q4fThCAWdcxIdeNFxdMls6f/wqGrWbTF+hCiGjX/KEgHPu4p pC9MTNVgHBtJa1u+Ki7BcBepOD5DKhW9yzibAjZrcz/0T13z/W04qWv7djyPuiL5PAjA saYnLw+yTMRVHAHbSomoEASmNfyq6liVc5PoLa+jV3DaWVIkiDcPgO/2yDkXMXUrrzFj VpWtltVOS1iT4LLpajGFodH8jIeoX/4rTKV27U3/QUAZHb5JFahq8UbFAM7Jy4b9f9nU gzcDNeJRB5E36zJdI+1eWyQhoGdbKBRWDlVZvI2UfRSo49RuGSY97juCywFrka+HnKRz dyjw== 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=iB0dg7IeIu774k/afVytWMNKWIm1OhGW2FaM94vAxG4=; b=r+D88yj61rifz7bxnNLkgMD+0AZ7QqmibYufETy7bSNbm8WNTdZBAvHw25mhyflFZ1 +4Y3KVnZwx9nnB0yvJnT74DwH9K0R+ICw6C0QUOTIOuVofloWdqCq492pi31AxfoW17I 7+xeTRP4k2MjwiyfLBZKVpu5ZyOTkJMyX+OtKBmlx0ZqLnYaG5RusYAxNGVr9iDWn4ok CfdiUjusyRzgNGn4Sr1JhWNngu035rZxkNVXzXclpeaxSZJ+pd7SmG25cKQKLBVdcGry 4EvsMmJJyGOWrtV7Y1Ukyz4RtkkhquoahEt1g1Htt4TA4bW0s/Q1zkD+qadtLsLdX85W imNw== 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:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u10-20020a1709061daa00b006d5fd1f95b6si5449301ejh.2.2022.04.17.18.44.43; Sun, 17 Apr 2022 18:45:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233745AbiDQJBV (ORCPT + 99 others); Sun, 17 Apr 2022 05:01:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231579AbiDQJBT (ORCPT ); Sun, 17 Apr 2022 05:01:19 -0400 Received: from fornost.hmeau.com (helcar.hmeau.com [216.24.177.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE63512A86 for ; Sun, 17 Apr 2022 01:58:44 -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 1ng0jk-003jh6-NN; Sun, 17 Apr 2022 18:58:30 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Sun, 17 Apr 2022 16:58:29 +0800 Date: Sun, 17 Apr 2022 16:58:29 +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,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Sun, Apr 17, 2022 at 09:50:50AM +0100, Catalin Marinas wrote: > > Right, if that's what you prefer. Something like: > > diff --git a/include/linux/crypto.h b/include/linux/crypto.h > index 2324ab6f1846..bb645b2f2718 100644 > --- a/include/linux/crypto.h > +++ b/include/linux/crypto.h > @@ -645,7 +645,7 @@ struct crypto_tfm { > > struct crypto_alg *__crt_alg; > > - void *__crt_ctx[] CRYPTO_MINALIGN_ATTR; > + void *__crt_ctx[] __aligned(ARCH_DMA_MINALIGN); > }; > > But once we do that, are there any other CRYPTO_MINALIGN left around? This is still implying the whole structure is aligned to the given value, which it is not. Please just add the padding as needed. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt