Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4866pxk; Wed, 23 Sep 2020 20:12:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6GC3JjX6jlf/uojp+jf6vwOvNiYR1FCuXpgexmPavx0tSyZK/HqgA76rX+SID6WWIwpds X-Received: by 2002:a17:906:1f08:: with SMTP id w8mr2500177ejj.181.1600917155440; Wed, 23 Sep 2020 20:12:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600917155; cv=none; d=google.com; s=arc-20160816; b=mfLmC1zrv20CfhjfUZSn8x4C+6GqO7YUWc4hwmV26nTWcvt39V/vm3k0RTPE9s99B6 LtrmRGfe5mqD29ENiyWyqCpZWEnJ5Xu29S0ZAp2mOyzzLWhc63GHYUkl/th50J9Etlus 2dXreKEwELIuvReoHBeA6oe0whU5sJ30f22/u57r3o2PvsgA3ysoQk9V+OB0nQ0JFLIA 2zEbOaghwHvHTSwC8w/+MtYUvOtSe/r+gvwn0Ej8p3BxOssetw9wrm2MDyYspThshhjk QWvPzgfU7oGdgMGgqDH5v4jvKdoVHmXaySAo2e6l2K+FCFgR7WMT5AXTkIm2aUwo0nRZ pErw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=nRigylazu7jLQO9dyLuFBIrY2vfgE9lKRW48uZAraMI=; b=rCDo2WX6cxiq6gHiWcsps+T1LljSL9fG0kkpQWQDSIflO41LLW5ChWtbE1pP5jDUIi XxuLeUEp6J37aYhM0MZWYW40XoTh1sqtKZIfkktph2/LebJvUT00VzTD2o7OQfQIgoHX HoHNqFCWIHpGnPAHa2UvE9jVjhqLfcllv34HjlE8NWqKHAAwDC67y2tC5AIOAJ2Qh3qG IudXOf41OnWQlhILmep3VKly7K7APoroI8haYxW2Of3HL4YqqGOWe1tJg4caNOoF0pg1 H6mS34D3GxxNE2Ueiodm/H+9+LLXLzm62ioO2vgUtUtgK5rhdvaP3sjEGtOvNCmZydhP tYUg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f11si1217191edq.528.2020.09.23.20.12.06; Wed, 23 Sep 2020 20:12:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726348AbgIXDME (ORCPT + 99 others); Wed, 23 Sep 2020 23:12:04 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:48790 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726281AbgIXDME (ORCPT ); Wed, 23 Sep 2020 23:12:04 -0400 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.0.7]) by fornost.hmeau.com with smtp (Exim 4.92 #5 (Debian)) id 1kLHfm-0000kW-NC; Thu, 24 Sep 2020 13:11:55 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Thu, 24 Sep 2020 13:11:54 +1000 Date: Thu, 24 Sep 2020 13:11:54 +1000 From: Herbert Xu To: "Van Leeuwen, Pascal" Cc: "linux-crypto@vger.kernel.org" , "antoine.tenart@bootlin.com" , "davem@davemloft.net" , Ard Biesheuvel Subject: Re: [PATCH] crypto: inside-secure - Fix corruption on not fully coherent systems Message-ID: <20200924031154.GA8282@gondor.apana.org.au> References: <1599466784-23596-1-git-send-email-pvanleeuwen@rambus.com> <20200918065806.GA9698@gondor.apana.org.au> <20200918080127.GA24222@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Fri, Sep 18, 2020 at 08:21:44AM +0000, Van Leeuwen, Pascal wrote: > > > Can this alignment exceed ARCH_DMA_MINALIGN? If not then the > > macro CRYPTO_MINALIGN should cover it. > > I don't know. I'm not familiar with that macro and I have not been able to dig up any > clear description on what it should convey. I'm pretty sure it is because that's the reason kmalloc uses it as its minimum as otherwise memory returned by kmalloc may cross cache-lines. > In any case, aligning to the worst cache cacheline for a CPU architecture may mean > you end up wasting a lot of space on a system with a much smaller cacheline. It won't waste any memory because kmalloc is already using it as a minimum. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt