Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp776047pxb; Tue, 12 Apr 2022 13:09:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkO3mwQdW978wiAr4P4W2Dxhkss/3+Pku1x5KAEqwoEtSjQdm+xp/W7lNED049D/VUmJ1L X-Received: by 2002:a05:6a00:1304:b0:4e1:2338:f11e with SMTP id j4-20020a056a00130400b004e12338f11emr39742586pfu.24.1649794148641; Tue, 12 Apr 2022 13:09:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649794148; cv=none; d=google.com; s=arc-20160816; b=ghfiZjFDMMpew2C7ud5wyBH/o0gT1+ziIMg9gLL0QCF9h5N3lzE2tpJ2xJx3D3Ijo4 9BEA54sGloYSoD06afwbHwE/XxvLdeOIWBjuKOcFtg4IYZxw37zcg/+1cZ9Obr7N5TB4 EnLuCCN4aB6VaLVkKg1PGT5kDx0CdJEA7s19LCc0GvMssN7TEV6T0GDkn8pzTC6TQfBP TdTBvhhRhFQECDKxFAHPsAILtWznjqxn3JWPo+i+NxhgKnYs5T2ZCVnT+sR7JjBAhFZ2 sHGGaAmMA8ee8XMEYmKtpkX498GGe3RyLMfacgbwt1ChS5KW7fYNFXrXRUJNaN86i511 QbfQ== 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=mTA91Mbq7iW3Oaid2BHdUTESoXNQGx7elLzeBJvNYZg=; b=B761ObrrefDussr2ckbshlHV9SiI9VmW2HaSQcjiX/3ooS2+dlfrCEM254n3TwveLI t1ZweNW4G5J49j5zQ+Os/iu1ZQiVc4w8vDSInxLaGN1BXukX8ZX2jyFts60rAJK9jw3R UaN95dF04dktPJMgz6JKKlqD8amNDPM/osZEFlNQ7aDwbPvQeG2yFCeCH4PLPweV6ykD WaLtdzsOAddY5hmd5n1+SgvTXb3BIfch3BQUpvywaWRlhS0Ah08FlOQe9wiUiSPpq8cx vPN/tU7qU45pYc4LPvswYeX4UEB3rji9PReGCkWVPst9bsuzJAzXxDizJFhAfuU4NBBZ 8OJw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q18-20020a170902c75200b001581fe7543fsi8553996plq.521.2022.04.12.13.09.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 13:09:08 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2BDB76C909; Tue, 12 Apr 2022 12:57:30 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239433AbiDLLku (ORCPT + 99 others); Tue, 12 Apr 2022 07:40:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355644AbiDLLj0 (ORCPT ); Tue, 12 Apr 2022 07:39:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E097949925 for ; Tue, 12 Apr 2022 03:20:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EEACD618BB for ; Tue, 12 Apr 2022 10:20:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 40E7EC385A5; Tue, 12 Apr 2022 10:20:12 +0000 (UTC) Date: Tue, 12 Apr 2022 11:20:08 +0100 From: Catalin Marinas To: Herbert Xu 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: > On Tue, Apr 12, 2022 at 05:40:58PM +0800, Herbert Xu wrote: > > I think if CRYPTO_MINALIGN makes those drivers work then so > > should cra_alignmask. And that would be a relatively easy > > patch to do. > > Yes, the patch would be simple, subject to figuring out which drivers > and what alignment they actually need (any help appreciated). > > There are already arm64 vendor kernels that change ARCH_DMA_MINALIGN to > 64, hence ARCH_KMALLOC_MINALIGN and CRYPTO_MINALIGN become 64. We also > discussed a Kconfig option for this in the past. Would that have broken > any crypto drivers that rely on a strict 128 byte alignment? Actually, I think with a cra_alignmask of 127 (the arm64 CRYPTO_MINALIGN-1), crypto_check_alg() will fail since MAX_ALGAPI_ALIGNMASK is 63. -- Catalin