Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp123945ybi; Tue, 2 Jul 2019 17:29:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqxGdyuMgg+Tzxg3m/yWR35vVW6DubU1An7o17UIxivZCPQgx6kNnthF7yZFO/8CfXLuhu/o X-Received: by 2002:a63:2364:: with SMTP id u36mr24775262pgm.449.1562113793669; Tue, 02 Jul 2019 17:29:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562113793; cv=none; d=google.com; s=arc-20160816; b=DMhYhV9P+s4BqR+uyf8a2A5cxlGKA7OsKIYmYcCXq7qS52KFtCC//8NrTvCVc5Iozr KYXhEaVFUrEQVH/zDkLOZW92lAYwhTKWPhk0x0YruMZAmbuimNE3DRU/66N9VbzEUX2l CQVdyjWdogcjbdnVgo/s8hBKP+dvH2yV6uLG3OsR9auSLDfIYSWd2yfqNCUR4bgSdvu5 jZJITIEsFjnYbY0EjuAogbpLveIHU1Zj7vb8PWWWZQuyq8UcX+aBvqt15ittXYg//NQ3 DvX58OhYTUCi/ID83Hyu60f8F1YTlhTG9goBmC6nlBeXJclxEN9MsXZwARQTSMaggc5c Hw3A== 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-id:user-agent:content-language:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:subject:cc:to :from:dkim-signature; bh=bXV5m5/kWL0UTx0rffDnbnfr99W18VuHp36gZ6xXldk=; b=O1d4M+hXzhsiz+k55ftYiE/IsX/S2wJOiF9hSRKznb8Iae7Z4aZqRgHEqsP81PKvLj 0OBlowMFCViL/edowDjcIfXIrMUV3wBpGON+l7hoPhiaeGCj6QgYuwx7a521VCLkANPD nGZAokl34kB9nusWy1GWDW3QD7z0gn8HmLWH0i7gsg0i0wfR8GzG8BILKeNUieofV6uc 9rrsgckPH1ziTQuLPludXCptmAEgEhOA+zDVk/eGkSyeY5ENTJtB93+dUmA2HGlqDQcX I8ofI86nCKbq7cfG0EE++S9xwoWGOy9wGPKfJDXToAVbcF+NlfJLRK9Ns21JqoFmnu5k JQ3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amdcloud-onmicrosoft-com header.b=I2VmR7Ga; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 g7si377486plb.29.2019.07.02.17.29.37; Tue, 02 Jul 2019 17:29:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@amdcloud.onmicrosoft.com header.s=selector1-amdcloud-onmicrosoft-com header.b=I2VmR7Ga; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727248AbfGCA2i (ORCPT + 99 others); Tue, 2 Jul 2019 20:28:38 -0400 Received: from mail-eopbgr800084.outbound.protection.outlook.com ([40.107.80.84]:26748 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727164AbfGCA2h (ORCPT ); Tue, 2 Jul 2019 20:28:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bXV5m5/kWL0UTx0rffDnbnfr99W18VuHp36gZ6xXldk=; b=I2VmR7GaVUgrTx3BAhLw9gTSGN99h0fegBzuNaGRakfcNLzWWMVvDPwiH25Ed6kRRZWK7jwJ+Wkc4HAEgy8qCeSHo1hnjGfVCHF47S6AH5knIs8Ze4jaK4tAhax64gSold0HYRVowbsRYACwaMYkwtOCo1sS+MjODN0yChOyxGE= Received: from DM6PR12MB3947.namprd12.prod.outlook.com (10.255.174.156) by DM6PR12MB3227.namprd12.prod.outlook.com (20.179.105.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2032.20; Tue, 2 Jul 2019 21:43:58 +0000 Received: from DM6PR12MB3947.namprd12.prod.outlook.com ([fe80::91a2:f9e7:8c86:f927]) by DM6PR12MB3947.namprd12.prod.outlook.com ([fe80::91a2:f9e7:8c86:f927%7]) with mapi id 15.20.2032.019; Tue, 2 Jul 2019 21:43:58 +0000 From: "Kuehling, Felix" To: Christoph Hellwig , Dan Williams , =?utf-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Jason Gunthorpe , Ben Skeggs , "Yang, Philip" CC: Ira Weiny , "linux-mm@kvack.org" , "nouveau@lists.freedesktop.org" , "dri-devel@lists.freedesktop.org" , "linux-nvdimm@lists.01.org" , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 19/22] mm: always return EBUSY for invalid ranges in hmm_range_{fault,snapshot} Thread-Topic: [PATCH 19/22] mm: always return EBUSY for invalid ranges in hmm_range_{fault,snapshot} Thread-Index: AQHVL9U3BN0CaVdL806tAThCwvVuZKa33tOA Date: Tue, 2 Jul 2019 21:43:58 +0000 Message-ID: References: <20190701062020.19239-1-hch@lst.de> <20190701062020.19239-20-hch@lst.de> In-Reply-To: <20190701062020.19239-20-hch@lst.de> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [165.204.55.251] user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 x-clientproxiedby: YTOPR0101CA0031.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b00:15::44) To DM6PR12MB3947.namprd12.prod.outlook.com (2603:10b6:5:1cb::28) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Felix.Kuehling@amd.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 13f473c3-5730-48c1-f95f-08d6ff366354 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:DM6PR12MB3227; x-ms-traffictypediagnostic: DM6PR12MB3227: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 008663486A x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(366004)(39860400002)(346002)(396003)(136003)(376002)(189003)(199004)(6116002)(3846002)(68736007)(476003)(2616005)(486006)(6486002)(36756003)(72206003)(478600001)(66066001)(64126003)(64756008)(66446008)(66946007)(66476007)(73956011)(14444005)(256004)(66556008)(8676002)(65956001)(65806001)(102836004)(86362001)(71200400001)(53936002)(229853002)(8936002)(110136005)(316002)(6436002)(6506007)(81166006)(5660300002)(53546011)(31696002)(65826007)(58126008)(305945005)(186003)(71190400001)(54906003)(7416002)(386003)(14454004)(6512007)(99286004)(7736002)(11346002)(4326008)(25786009)(6636002)(2906002)(76176011)(31686004)(52116002)(446003)(26005)(81156014)(6246003)(142933001);DIR:OUT;SFP:1101;SCL:1;SRVR:DM6PR12MB3227;H:DM6PR12MB3947.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: sMk9L56Wb8xff3fa0UYNwsl9h+hrIYZNmWjZ2sZDOyWhgc5H+orKgzntdXV+43yWl4Lr3U4nKoyq+847Jyb1LO7jtF/utnCV/yhFNbUpoClgimWeyEW1AfwIxb1AbfTDFJ81dfCLN7d1C6JKhszrqEz69czVaywl62W2iiv2ZsBx1M78T3Kk8/Q3H8WtxPPbof/9Ll5wm58jel7AN2JeO8FBGM7JoD3HVlg6nqebp3T6ukDzHKWAKGVT7ItJfD/8XTkhqmPwRzGOd7AxvfYipQ9hPwAzZfdrFp7OCGSLNKDF/CC9Kp+yDd6w1rGGvYppl2NucncmXRzCmiFh9ivHN47pfj9UgYWZNbJcnc6XVH1bOnlXWAqOSDvoSm9qrF0zVD8TRE8BtixlMseu5AYRmAhTf7vXX2h43mFy4AgGm1c= Content-Type: text/plain; charset="utf-8" Content-ID: <30B65ABE32E43E43B44DF7426B589C07@namprd12.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 13f473c3-5730-48c1-f95f-08d6ff366354 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Jul 2019 21:43:58.3251 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: fkuehlin@amd.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3227 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gMjAxOS0wNy0wMSAyOjIwIGEubS4sIENocmlzdG9waCBIZWxsd2lnIHdyb3RlOg0KPiBXZSBz aG91bGQgbm90IGhhdmUgdHdvIGRpZmZlcmVudCBlcnJvciBjb2RlcyBmb3IgdGhlIHNhbWUgY29u ZGl0aW9uLiAgSW4NCj4gYWRkaXRpb24gdGhpcyByZWFsbHkgY29tcGxpY2F0ZXMgdGhlIGNvZGU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