Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752248AbdI0QbL (ORCPT ); Wed, 27 Sep 2017 12:31:11 -0400 Received: from mail-co1nam03on0118.outbound.protection.outlook.com ([104.47.40.118]:6816 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751692AbdI0QbI (ORCPT ); Wed, 27 Sep 2017 12:31:08 -0400 From: Casey Leedom To: Dan Williams CC: Robin Murphy , "Harsh Jain" , "Raj, Ashok" , Herbert Xu , David Woodhouse , "linux-kernel@vger.kernel.org" , "iommu@lists.linux-foundation.org" , "linux-crypto@vger.kernel.org" , "dwmw2@infradead.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/YGlya50aETYTEmnILyqK9cAoAgAAkZQCACFcnkv//5CkAgAAvAguAAJgAAIAAj7QAgAAh/4CAABrJ6IAAA2oAgAGW6yY= Date: Wed, 27 Sep 2017 16:31:04 +0000 Message-ID: References: <20170920080151.GA3348@gondor.apana.org.au> <26992a1e-edb3-ed78-ce8e-31e0739d75f4@arm.com> <20170925155430.GB131920@otc-nc-03> <6d2af675-7b97-6eaf-4daa-d7bf80a05923@chelsio.com> <437a9bd8-d4d6-22ca-1a64-1a3e73f1101a@arm.com> , In-Reply-To: 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=leedom@chelsio.com; x-originating-ip: [12.32.117.8] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;MWHPR12MB1952;6:/i2dVzPRhNeQhYqtAWmEh7k7RSH9aVSu2b9pCFeGrystlnxuQKSjmVqTVVH2iGgw1jOy4TT20HHR35AI3frhbRB0/6oEErsCBPc8yY/Q8UbTuNEPfrNCALBHC6U9lq7E7DaAtYJ4UvWFO3A+/Pg157p9fdHxbskaLpDUUlcZ0u5KH20GtyI4DHcTl/rwLtWQR5zmaSuPtf9BOSY1NOwBabg7/rukICh/hJaN8aZ2kvbrsVtNO174MS5vKGmKv/CNndSEqyaeLi47Tly+FqqZtp2sgMX36z0io/k0DsO/J5IuVkHts1qQ9XyH5Os3yRfEX1w+UJyjH1bBs8D880J3AQ==;5:9zW77sDaIrAAaLXjFN+miAFseJMFFeSwEM4udTE9YsW/zkvbDoUwr1WlA99UAEPqbKhe8IGQaWurAsWRJqnk0wWK+1GpeNCnrSpWFNN6CW+RzgfDdtoXCR8KC61uz0UVKsZdEGIPZTcBdvkU4y/daw==;24:dcTr3/zB7ZFPX1BOqeYgVB0RNq9uz7dVzpS+DWR+JJSbdz9EuhkOsxpWzfmS6JWdXJAlR3HspAaWn0AcXHlLDvi1BW0zftz3itjrwSqUbfI=;7:WyoIhrRvEgzKqdg4k9+wRkg6mRhUJK+mHMuJUH//Qbmu6ZAircu3SIIQvY5YRrO8fUwSMJ+u5GmmqoCfgGxh+lOAKVeIdEk99fyMBzRI/LBEXD1NqS4X3f2gcN9duY98ZXnvL68kx/V320vmKXdR+VDG1YQxqEUXzkilyCUVv05CeH2yd8qxtmGbBMwHyBHEp/QVlG9OM9pQz3qnvhdDH/fOARbV0YnVmwNKQA5Nqp8= x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-forefront-antispam-report: SFV:SKI;SCL:-1;SFV:NSPM;SFS:(10019020)(6009001)(376002)(39830400002)(346002)(24454002)(377454003)(189002)(199003)(54906003)(6916009)(2950100002)(33656002)(74316002)(3846002)(97736004)(6116002)(102836003)(7696004)(305945005)(107886003)(7736002)(77096006)(6506006)(6436002)(5660300001)(229853002)(105586002)(93886005)(66066001)(478600001)(106356001)(53546010)(14454004)(81166006)(25786009)(99286003)(55016002)(8936002)(86362001)(50986999)(54356999)(8676002)(81156014)(2900100001)(2906002)(4326008)(101416001)(76176999)(3280700002)(189998001)(3660700001)(53936002)(68736007)(9686003)(6246003)(316002);DIR:OUT;SFP:1102;SCL:1;SRVR:MWHPR12MB1952;H:MWHPR12MB1600.namprd12.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; x-ms-office365-filtering-correlation-id: fb1869d6-1278-4806-b0cd-08d505c525c1 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254152)(2017082002075)(2017052603199)(201703131423075)(201702281549075);SRVR:MWHPR12MB1952; x-ms-traffictypediagnostic: MWHPR12MB1952: x-exchange-antispam-report-test: UriScan:(180628864354917)(228905959029699); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(3002001)(10201501046)(93006095)(93001095)(6041248)(20161123564025)(20161123555025)(20161123558100)(2016111802025)(20161123562025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6043046)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:MWHPR12MB1952;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:MWHPR12MB1952; x-forefront-prvs: 04433051BF 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: 27 Sep 2017 16:31:04.0752 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 065db76d-a7ae-4c60-b78a-501e8fc17095 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1952 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 v8RGVHc9000395 Content-Length: 1075 Lines: 23 | From: Dan Williams | Sent: Tuesday, September 26, 2017 9:10 AM | | On Tue, Sep 26, 2017 at 9:06 AM, Casey Leedom wrote: | > | From: Robin Murphy | > | Sent: Tuesday, September 26, 2017 7:22 AM | > |... | > ... | > Regardless, it seems that you agree that there's an issue with the Intel | > I/O MMU support code with regard to the legal values which a (struct | > scatterlist) can take on? I still can't find any documentation for this | > and, personally, I'm a bit baffled by a Page-oriented Scatter/Gather List | > representation where [Offset, Offset+Length) can reside outside the Page. | | Consider the case where the page represents a huge page, then an | offset greater than PAGE_SIZE (up to HPAGE_SIZE) makes sense. Okay, but whatever the underlaying Page Size is, should [Offset, Offset+Length) completely reside within the referenced Page? I'm just trying to understand the Invariance Conditions which are assumed by all of the code which processes Scatter/gather Lists ... Casey