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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id ADC77C433FE for ; Mon, 7 Nov 2022 09:13:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 11AA36B0072; Mon, 7 Nov 2022 04:13:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0CAB16B0073; Mon, 7 Nov 2022 04:13:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ED5F56B0074; Mon, 7 Nov 2022 04:13:25 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id DE5286B0072 for ; Mon, 7 Nov 2022 04:13:25 -0500 (EST) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 5E12980CC8 for ; Mon, 7 Nov 2022 09:13:25 +0000 (UTC) X-FDA: 80106082770.15.F110CBC Received: from formenos.hmeau.com (helcar.hmeau.com [216.24.177.18]) by imf22.hostedemail.com (Postfix) with ESMTP id 70601C0006 for ; Mon, 7 Nov 2022 09:13:24 +0000 (UTC) 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 1oryAz-00AywG-AF; Mon, 07 Nov 2022 17:12:54 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Mon, 07 Nov 2022 17:12:53 +0800 Date: Mon, 7 Nov 2022 17:12:53 +0800 From: Herbert Xu To: Catalin Marinas Cc: Linus Torvalds , Arnd Bergmann , Christoph Hellwig , Greg Kroah-Hartman , Will Deacon , Marc Zyngier , Andrew Morton , Ard Biesheuvel , Isaac Manjarres , Saravana Kannan , Alasdair Kergon , Daniel Vetter , Joerg Roedel , Mark Brown , Mike Snitzer , "Rafael J. Wysocki" , Robin Murphy , linux-mm@kvack.org, iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v3 11/13] crypto: Use ARCH_DMA_MINALIGN instead of ARCH_KMALLOC_MINALIGN Message-ID: References: <20221106220143.2129263-1-catalin.marinas@arm.com> <20221106220143.2129263-12-catalin.marinas@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1667812405; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0eXtZC9V4CUHQZkd48oP96N5FIc/TWv1p3XFqRAe/Lc=; b=yqIcR4XK9ACbuHATR663nFPT4KV5y0/VL9VHhwVwAqu5QKQuvIRJmOuCLBwhGuM+idnhFy MS2LJU0fe2EYhyv6ISl5p3lIcC2Tjz8FRZGUSVH/9L1cpVkBiKzoKGDkEGZ7ZlyVLQ+OcZ mcX59bEXYJJtN+KPrUHYVC9Ye7h7gcM= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=none; spf=pass (imf22.hostedemail.com: domain of herbert@gondor.apana.org.au designates 216.24.177.18 as permitted sender) smtp.mailfrom=herbert@gondor.apana.org.au; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1667812405; a=rsa-sha256; cv=none; b=PI14Vz76OiGaIevS9Gt0oKo/vINlNxDo/9OQy/ZOd5vSqyJw1pvK+1KWfCy53FLrsG+avq u0cHEO2R+G9BN8IU/+xmi7lKBSH9kYoKuBLMlt1qL8mDzPxMeWt1R6yjDou1IlXgqCzx1J Fb8d0/EF7gp+FLjlLPQCGwywWviBd+c= X-Rspam-User: X-Stat-Signature: aya93mdtjsjizjmc5e58hucaaqisnqwc X-Rspamd-Queue-Id: 70601C0006 Authentication-Results: imf22.hostedemail.com; dkim=none; spf=pass (imf22.hostedemail.com: domain of herbert@gondor.apana.org.au designates 216.24.177.18 as permitted sender) smtp.mailfrom=herbert@gondor.apana.org.au; dmarc=none X-Rspamd-Server: rspam07 X-HE-Tag: 1667812404-725915 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Nov 07, 2022 at 09:05:04AM +0000, Catalin Marinas wrote: > > Well, it does ensure that the __alignof__ and sizeof structures like > crypto_alg and aead_request is still 128 after this change. A kmalloc() > of a size multiple of 128 returns a 128-byte aligned object. So the aim > is just to keep the current binary layout/alignment to 128 on arm64. In > theory, no functional change. Changing CRYPTO_MINALIGN to 128 does not cause structures that are smaller than 128 bytes to magically become larger than 128 bytes. All it does is declare to the compiler that it may assume that these pointers are 128-byte aligned (which is obviously untrue if kmalloc does not guarantee that). So I don't see how this changes anything in practice. Buffers that required bouncing prior to your change will still require bouncing. If you're set on doing it this way then I can proceed with the original patch-set to change the drivers. I've just been putting it off because it seems that you guys weren't quite decided on which way to go. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt