Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966107AbdIYUT0 (ORCPT ); Mon, 25 Sep 2017 16:19:26 -0400 Received: from mail-by2nam01on0121.outbound.protection.outlook.com ([104.47.34.121]:52670 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S966091AbdIYUTX (ORCPT ); Mon, 25 Sep 2017 16:19:23 -0400 From: Casey Leedom To: David Woodhouse , Herbert Xu , "Harsh Jain" CC: "joro@8bytes.org" , "linux-crypto@vger.kernel.org" , "iommu@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" , Michael Werner Subject: Re: DMA error when sg->offset value is greater than PAGE_SIZE in Intel IOMMU Thread-Topic: DMA error when sg->offset value is greater than PAGE_SIZE in Intel IOMMU Thread-Index: AQHTLrKuCX/YGlya50aETYTEmnILyqK9cAoAgAiPfYCAABjHBA== Date: Mon, 25 Sep 2017 20:19:21 +0000 Message-ID: References: <20170920080151.GA3348@gondor.apana.org.au>,<1506365131.5294.37.camel@infradead.org> In-Reply-To: <1506365131.5294.37.camel@infradead.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [12.32.117.8] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;MWHPR12MB1949;6:36GvGJcZhPjJsWS1pg4+2LhqmBK1+RdF+BFq9ydD019q6xURVzkHPgmCAxjdizLEHFhpUn5+rI0nTPMpNV3S/UoN7LT9uAHjJyG5NBvPI4xT6uPyALfy65qheLHBJx2fxEKZuxNt7TBUcCFomhWdTsaxCb3DAYikG+Gs1UPJVKW8i1GCvIP+gO2n1envkbrq8pR7jFuXoMux5WVRN40dX41JBns+OGc0K38zZ9pUTxoQ6eM9+eEqqFpP/qKdcTg+L8CI+ueqNTM4RpLWZ6ZAT8rIhvdxVipTyJVAkQg1pE4Z2dVxh2ZSrsxCh+0N8hZZWq/YJb9esho+7XhFVMkYlw==;5:xqV8je6LSa4Co+e8dCLud9s6vevVYK3bQvB9tyb8X2RLJpNCm+vzpHY60ooA9i8UHP6s06Fv1NwYKtbz345JdpJVkt/LAhvnrJRzfxf4NYZ6e5Awvjpfss8JcRjDY9bzZKP2HsO2+xCDq42ROQTD8g==;24:gjhDU3A6K4rOxltKi3UohizTe5eMY81xwReYQTCQiw3i7lja05aI4Mh/+01LgB7f2gy6bmBLmqvEIj85n8fh0mYzDBehHEw9XviZvsl01tU=;7:FISLKeGGmjvqVx6I7Z8GJS+QUdVB70Udru9HYBFAs8FQQdFPATj/7KdlGFKlT86BTXL8c8gM+ax8Y1HLxWfOFDuP+QOMlm55mnhLJghvZ25QkNNK8ntsuspTYNKmehEGVDE0K/hmUeYeR9N6i4DUFiffvj8eoXqsyEDMhb3ArFty12e06SLfpOoqo4ywRdtggEFEyEkzg+ep+2LXeBixGpUBh1kMwC6zAYXbaapKwjk= x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-forefront-antispam-report: SFV:SKI;SCL:-1;SFV:NSPM;SFS:(10019020)(6009001)(376002)(346002)(24454002)(377454003)(189002)(377424004)(199003)(110136005)(68736007)(81156014)(8676002)(6116002)(81166006)(8936002)(102836003)(101416001)(3846002)(33656002)(7736002)(53936002)(2900100001)(14454004)(99286003)(74316002)(9686003)(6246003)(76176999)(4326008)(305945005)(25786009)(77096006)(478600001)(229853002)(6506006)(6436002)(2950100002)(66066001)(3280700002)(50986999)(316002)(2906002)(54906003)(97736004)(5660300001)(86362001)(7696004)(54356999)(189998001)(107886003)(3660700001)(55016002)(105586002)(106356001)(6636002);DIR:OUT;SFP:1102;SCL:1;SRVR:MWHPR12MB1949;H:MWHPR12MB1600.namprd12.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; x-ms-office365-filtering-correlation-id: 3b8224f8-f19f-4b87-17f5-08d50452b535 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254152)(2017082002075)(2017052603199)(201703131423075)(201702281549075);SRVR:MWHPR12MB1949; x-ms-traffictypediagnostic: MWHPR12MB1949: authentication-results: spf=none (sender IP is ) smtp.mailfrom=leedom@chelsio.com; x-exchange-antispam-report-test: UriScan:; x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(100000703101)(100105400095)(3002001)(10201501046)(6041248)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(2016111802025)(20161123564025)(20161123560025)(20161123558100)(20161123555025)(6043046)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:MWHPR12MB1949;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:MWHPR12MB1949; x-forefront-prvs: 04410E544A spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 X-OriginatorOrg: chelsio.com X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Sep 2017 20:19:21.5528 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 065db76d-a7ae-4c60-b78a-501e8fc17095 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1949 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v8PKK5bY002951 Content-Length: 1063 Lines: 26 | From: David Woodhouse | Sent: Monday, September 25, 2017 11:45 AM | | On Wed, 2017-09-20 at 16:01 +0800, Herbert Xu wrote: | > Harsh Jain wrote: | > > | > > While debugging DMA mapping error in chelsio crypto driver we | > observed that when scatter/gather list received by driver has some | > entry with page->offset > 4096 (PAGE_SIZE). It starts giving DMA | > error. Without IOMMU it works fine. | > | > This is not a bug. The network stack can and will feed us such | > SG lists. | | Hm? Under what circumstances is the offset permitted to be > | PAGE_SIZE? As I noted earlier, this is an area of the kernel with which I'm not super familiar. Both Herbert Xu and our local VM Expert have said that having Scatter/Gather Lists with Offsets greater than Page Size is not a bug ... I'm mostly trying to help out keeping focus on this because Harsh is in India (presumable enjoying a good night's sleep while we look at this. Hopefully we'll have a present of a bug fix for him when he wakes up ... :-) Casey