Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp276693pxk; Thu, 24 Sep 2020 05:36:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvSx0fjfyvTYa1TQMtROWFJm+etTyKVDLz50jiKCn31QtjWSCMKneRTR6y8+t+eXJBOHpz X-Received: by 2002:a17:906:f157:: with SMTP id gw23mr759165ejb.325.1600951002838; Thu, 24 Sep 2020 05:36:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600951002; cv=none; d=google.com; s=arc-20160816; b=Ef81qJCNnV60Q/t3hfcY+uNijuYq2+9F2T1x3S3BlBbV7tL3g7q3dLI4OTh+9N9o1S DSV6eUlDvFI1vqGSMEE7NRt2ZAAgIGJYPSu+K/mmjgi91wi25IVZmTg8HKjFTdjG7HdM aVRqcL3pnZ6NwO7YjPkkRPTnO5X3oHTaYsiRegs/CUTTuDsNZKvBxMTCt/Z8woMPyWwb zO8Dl9TvY7jAAkLp49HrMwbxep9l1Iznn7iAwq9ISHyQUjJEyKS91MtkR71VEzXyCt+d kEqVILVU0/SB95ryRAwe6LBqK38VsU+whG+IR/U/A1IUEjjdkSAztnX+QnuIxJUw2GVq LV5w== 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=QyN3Hn7iiHZ7WdNhUdTXRihzY/knpLBmrq0BeLXtghc=; b=tl8fs3k30QYSMS7A6XlZh15J4jwMQBXtzMr8Kkyr8Pa7baw4ATY1z/20gZBRsu9SOd 6RD/pp6dcis5gcPC2I6BD/qFCWYiBoPm3HYv4cdUI+q5wRFk1baZrq5enB7OukpoCJBe 0lmdalH/rjqnMYkjHzC7bNxZpOmbUqN8MmOwUM+Yza/xmyJaSs2WeDq1g1ZUYak+iGlQ 6dfFayafjASN0JVLUb+4JDbJe6Wrh2DksueOyqzH/2HeqspAD8Vrz7U3Rh6ExOeP3UoO lfD7eOSchvNSW6H9YyoLSsEkA25iwOcVNbTDQu15xd9HZ+X+JfFE86aa/GKqbXPBDmjE xjFQ== 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 g7si1937401edu.333.2020.09.24.05.36.09; Thu, 24 Sep 2020 05:36:42 -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 S1727683AbgIXMgH (ORCPT + 99 others); Thu, 24 Sep 2020 08:36:07 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:50050 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727561AbgIXMgH (ORCPT ); Thu, 24 Sep 2020 08:36:07 -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 1kLQTf-0002DJ-5p; Thu, 24 Sep 2020 22:36:00 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Thu, 24 Sep 2020 22:35:59 +1000 Date: Thu, 24 Sep 2020 22:35:59 +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: <20200924123559.GA10827@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> <20200924031154.GA8282@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 Thu, Sep 24, 2020 at 08:08:12AM +0000, Van Leeuwen, Pascal wrote: > > The fact that kmalloc uses it does _not_ rule out the fact that it wastes memory ... > And as long as you use kmalloc for fairly large data structures, it shouldn't matter much. > But here I need a couple of fairly small buffers. Those small buffers are embedded in a structure that's already aligned by kmalloc. So just put your buffers at the start of the struct to minimise holes. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt