Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp183956ybi; Thu, 30 May 2019 23:11:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqzLn/QO1PvxBlLJqI8oc4rhVegqIf1T5vSWDnJR7OocXaVPe0w7aJSuC3Ya1DzW3R7wMPLb X-Received: by 2002:a63:c508:: with SMTP id f8mr7385629pgd.48.1559283087847; Thu, 30 May 2019 23:11:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559283087; cv=none; d=google.com; s=arc-20160816; b=y1x+5OaXKF1en+z+Zz6tJpJ1W6uhPs6n4NMRLrulNYn7XbGnZiu1sQfZ+9nDjZeDNw YYZisAc8C04VyYrAkZXSuzEQbCNpa8TMg5o16YfCgx0QHV9Sguo5Oy6Zi6nIGWcRjCrO pvq5cynBCklOAsAKxWTXBlwi01L4TKT4kOgwwR5MhVY5DWr0uh1qtuE5aGrhrt55oOgP Sh6MNMKw/sua+0c9av11XWCgqs/xHOArqAClpJ+WWm5l+st7yEqL3DM3NVjYO0pJscvW NGyzyncNfUDm4Yoy7iKkPjEFSTS31qKpO56RTXXhT75Nc/NtitGosA6gnAaesLrv6C5o iLUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:references:message-id:date :thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=zTTZ5HuvNK3CLAOjmlrh81Bo2CFMoMn4a80T1nEW6Kw=; b=r7wu6EtcJhNRfg/ph230KXKPh8I738GbRTUV+eNGwa51tWDgymR4yJddq0lPeurnJH p98A0bGFC7O6hzz7Fwvstzvgnx6MjHH68HC+3rVQrN1wqMJxkgHYq2+GB/2oZvwladsD K5WE27dReyzfvFrZ2GRmSqwZQ+roleJJy3B/1ZkfHYOzlvx/oXCTBlEE1IWQqMrLVNCy /wBjXdfZnqgXj6x5/wmSf8zIgjLzKJ04u+HAUdyR0eMmcKOwYOQTgoOLDLbQlhKdNp/8 FxFgtSypcm9FNozJsrlgVLuMqNLE/m1efmyiCEUK1/cQVBUAIhhAXpfrSuvpozFiQdkx cdww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=gU1c8T3U; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e5si5068167pgs.463.2019.05.30.23.11.11; Thu, 30 May 2019 23:11:27 -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; dkim=pass header.i=@nxp.com header.s=selector2 header.b=gU1c8T3U; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726275AbfEaGKy (ORCPT + 99 others); Fri, 31 May 2019 02:10:54 -0400 Received: from mail-eopbgr20052.outbound.protection.outlook.com ([40.107.2.52]:30784 "EHLO EUR02-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726158AbfEaGKy (ORCPT ); Fri, 31 May 2019 02:10:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zTTZ5HuvNK3CLAOjmlrh81Bo2CFMoMn4a80T1nEW6Kw=; b=gU1c8T3U23cKrSD/g9P7hn0buHwOAg1Tv1D4CaEcgmq9dEAdSsUYosukde7baQErP7+952i4/PcIujPgTuj7Gqk71V+suYetNNMR1t6q7J/Ga8Ik9Xw9mtLGpEBX7uW9TIy8EiequTN6s8bvi+H/SgUVX1O6R658h3R8wmSUrQM= Received: from VI1PR0402MB3485.eurprd04.prod.outlook.com (52.134.3.153) by VI1PR0402MB3950.eurprd04.prod.outlook.com (52.134.17.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1922.18; Fri, 31 May 2019 06:10:51 +0000 Received: from VI1PR0402MB3485.eurprd04.prod.outlook.com ([fe80::ccaf:f4a1:704a:e745]) by VI1PR0402MB3485.eurprd04.prod.outlook.com ([fe80::ccaf:f4a1:704a:e745%4]) with mapi id 15.20.1922.021; Fri, 31 May 2019 06:10:51 +0000 From: Horia Geanta To: Herbert Xu 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 Thread-Topic: [PATCH] crypto: gcm - fix cacheline sharing Thread-Index: AQHVFkF+dOvdDzZqYUSH856vNqfARw== Date: Fri, 31 May 2019 06:10:51 +0000 Message-ID: References: <1559149856-7938-1-git-send-email-iuliana.prodan@nxp.com> <20190529202728.GA35103@gmail.com> <20190530053421.keesqb54yu5w7hgk@gondor.apana.org.au> <20190530132623.4h3y2bymv4uvfnms@gondor.apana.org.au> <20190531054250.p2bc3igiu4s7dmvk@gondor.apana.org.au> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=horia.geanta@nxp.com; x-originating-ip: [212.146.100.6] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3ebea888-bb1f-4255-3f36-08d6e58ebbaa x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020);SRVR:VI1PR0402MB3950; x-ms-traffictypediagnostic: VI1PR0402MB3950: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 00540983E2 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39860400002)(396003)(366004)(346002)(376002)(136003)(199004)(189003)(4744005)(55016002)(54906003)(66446008)(66556008)(186003)(73956011)(316002)(64756008)(102836004)(476003)(478600001)(26005)(71200400001)(52536014)(305945005)(6436002)(5660300002)(71190400001)(7736002)(6916009)(256004)(76116006)(66476007)(3846002)(76176011)(229853002)(9686003)(53936002)(6506007)(6116002)(33656002)(68736007)(486006)(74316002)(53546011)(6246003)(25786009)(8676002)(66066001)(4326008)(2906002)(14454004)(8936002)(7696005)(81166006)(81156014)(44832011)(446003)(86362001)(66946007)(99286004);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR0402MB3950;H:VI1PR0402MB3485.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: e2IkReiYeH0FxDR5iMepgOIzPp2jrRxUtSNNSB5b+fFmAx6qGnJ1Cc3gdhGy6Qj8ADy0sGuX5JA03OCT5dhNUlgtRE2rE9WwXrbSPU4c3hueyu8NRW6eTm7BZZCAznhN93KaT+RcrJZdlPCbsVdiUc99TRFj9nYsraMMfGPQ+mdVXB2hvU8NzW/QxiToO0PUjsF1SDaCQe9Fld1zKAjznOtICJEFLzHEexRwAjigISDty3icD+vg6pBzG5FxV9zCI9deJQhYpzWrurzpgRRp7hDnwcZhSCmqdXWvI+g6v5JfQo6IcJy3M2AEWIJJdTIdZ6Zp8Tp9sN1nMVfP4ZGSiYiFrhmz4VcQU0eugId/p/i5GZplABW/H3Z+LuwIe/yH9j0LfLx4vSzChjO7vqFJSDTwzVZqpIVBdLqjqAG3AW8= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3ebea888-bb1f-4255-3f36-08d6e58ebbaa X-MS-Exchange-CrossTenant-originalarrivaltime: 31 May 2019 06:10:51.5097 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: horia.geanta@nxp.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB3950 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On 5/31/2019 8:43 AM, Herbert Xu wrote:=0A= > On Fri, May 31, 2019 at 05:22:50AM +0000, Horia Geanta wrote:=0A= >>=0A= >> Unless it's clearly defined *which* virtual addresses mustn't be accesse= d,=0A= >> things won't work properly.=0A= >> In theory, any two objects could share a cache line. We can't just stop = all=0A= >> memory accesses from CPU while a peripheral is busy.=0A= > =0A= > The user obviously can't touch the memory areas potentially under=0A= > DMA. But in this case it's not the user that's doing it, it's=0A= > the driver.=0A= > =0A= > So the driver must not touch any virtual pointers given to it=0A= > as input/output while the DMA areas are mapped.=0A= > =0A= Driver is not touching the DMA mapped areas, the DMA API conventions are=0A= carefully followed.=0A= It's touching a virtual pointer that is not DMA mapped, that just happens t= o be=0A= on the same cache line with a DMA mapped buffer.=0A= =0A= Thanks,=0A= Horia=0A=