Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp765020ybi; Thu, 30 May 2019 06:26:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqz7CVY6Xo5k4X9ymC75i/peftpRPF6hBPfQrL4/NXDHbei38SwZdAnU6+oQ9Y6tsAHWE/Dk X-Received: by 2002:a63:454e:: with SMTP id u14mr3590166pgk.377.1559222808887; Thu, 30 May 2019 06:26:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559222808; cv=none; d=google.com; s=arc-20160816; b=jaf7FMTJmpn+avQb/ro9QdjCBM/DnbVi/M4yzpoQAB5V3hCoPidt5dnVstdRDRLaj3 +Rvke1mym1uswaF4ZEpLbOJnkrj67lW66/SDgzZk89KU7oVxaon7mXH3BUtyiwSMXqRK a99jrxMRcOZyqG7ESiRMmUCHRNZx6a/znWJ56qX+QZObZ13marNBXk7JT4GzKgtU91K4 kB8LcHUkB9vzJHnetqg9WcBjfvSNQ4Gm+zzHGj2CPjrepB9HM0BqRySEpfEXUw+C+q51 Z9NpVJTmp9izVblJ5wVOPvj2Dus+nn7I5nXM6YNxsjI6T15E96UPWE8a6D3aSj9aj/+V ArCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=EKSoGjeFl2FZI7KNNDxRB4w9ccU0+YtYy2aPvl51EHk=; b=DQLW6AuHFz/8CTk0kBwaCG4PRXxoMTu8GrQnO38uoQ9Of903PkvGDqHth9skpMG8fg xnl1OmEXL+jbOen06rlr3kLTUHRqcLp8WyvuyBlPXQI7o6fIEk0sVawpZFTL69x4UYqn W7Nlt8qM7zsJ8ze0C/XDQ5MTzZ9Jsio+1CCacXZYIZJlzhDSZP9wsBWFExjElSveqGm6 LK3Oxr/0Vn7rgH3Z4kdU/LsA5zRouIrQGXQB1p9U7zR/UA1MBrsoRScG/g7ZWoH9L/bn d8kB4hJ2uO0NL+HOovXZo//fY8EfEJHY+Vn7Z4AfJY9OyUmdcjsfqumjsLV0RyBJ6OEP gscg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v10si3405903pfe.87.2019.05.30.06.26.33; Thu, 30 May 2019 06:26:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726716AbfE3N0c (ORCPT + 99 others); Thu, 30 May 2019 09:26:32 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:37858 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726673AbfE3N0c (ORCPT ); Thu, 30 May 2019 09:26:32 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1hWL4d-0005CI-N1; Thu, 30 May 2019 21:26:27 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1hWL4Z-0003Xt-Fa; Thu, 30 May 2019 21:26:23 +0800 Date: Thu, 30 May 2019 21:26:23 +0800 From: Herbert Xu To: Horia Geanta Cc: Ard Biesheuvel , Eric Biggers , Iuliana Prodan , "David S. Miller" , Sascha Hauer , "linux-crypto@vger.kernel.org" , "linux-kernel@vger.kernel.org" , dl-linux-imx Subject: Re: [PATCH] crypto: gcm - fix cacheline sharing Message-ID: <20190530132623.4h3y2bymv4uvfnms@gondor.apana.org.au> References: <1559149856-7938-1-git-send-email-iuliana.prodan@nxp.com> <20190529202728.GA35103@gmail.com> <20190530053421.keesqb54yu5w7hgk@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, May 30, 2019 at 01:18:34PM +0000, Horia Geanta wrote: > > I guess there are only two options: > -either cache line sharing is avoided OR > -users need to be *aware* they are sharing the cache line and some rules / > assumptions are in place on how to safely work on the data No there is a third option and it's very simple: You must only access the virtual addresses given to you before DMA mapping or after DMA unmapping. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt