From: Wang Shilong Subject: Re: [PATCH v3 1/3] ext4: fix setattr project check upon fssetxattr ioctl Date: Sun, 16 Sep 2018 12:25:52 +0000 Message-ID: <9A6D2B35-2355-4061-9E0C-4A1883FC3547@ddn.com> References: <1536710238-16858-1-git-send-email-wshilong1991@gmail.com> <20180916035529.GG8652@thunk.org> <75832A38-2476-4504-A03C-15B40053A565@ddn.com> <20180916122034.GA5915@thunk.org> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Cc: "adilger@dilger.ca" , "linux-ext4@vger.kernel.org" , Wang Shilong , "dchinner@redhat.com" , "linux-f2fs-devel@lists.sourceforge.net" To: Theodore Ts'o Return-path: In-Reply-To: <20180916122034.GA5915@thunk.org> Content-Language: en-US Content-ID: <657411204763D54CA47F443341C34708@ddn.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net List-Id: linux-ext4.vger.kernel.org DQoNCj4g5ZyoIDIwMTjlubQ55pyIMTbml6XvvIzkuIvljYg4OjIw77yMVGhlb2RvcmUgWS4gVHMn byA8dHl0c29AbWl0LmVkdT4g5YaZ6YGT77yaDQo+IA0KPiBPbiBTdW4sIFNlcCAxNiwgMjAxOCBh dCAwNDowMjo1MkFNICswMDAwLCBXYW5nIFNoaWxvbmcgd3JvdGU6DQo+PiANCj4+IA0KPj4+IOWc qCAyMDE45bm0OeaciDE25pel77yM5LiK5Y2IMTE6NTXvvIxUaGVvZG9yZSBZLiBUcydvIDx0eXRz b0BtaXQuZWR1PiDlhpnpgZPvvJoNCj4+PiANCj4+PiBPbiBXZWQsIFNlcCAxMiwgMjAxOCBhdCAw ODo1NzoxNkFNICswOTAwLCBXYW5nIFNoaWxvbmcgd3JvdGU6DQo+Pj4+IGRpZmYgLS1naXQgYS9m cy9leHQ0L2lvY3RsLmMgYi9mcy9leHQ0L2lvY3RsLmMNCj4+Pj4gaW5kZXggYTcwNzQxMTVkNmY2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oxMDQ4ICAgICAgICAgICAgICAgICAgICAgICAgICAoZmxhZ3MgJiBFWFQ0X0ZMX1hGTEFHX1ZJ U0lCTEUpOw0KMTA0OSAgICAgICAgICAgICAgICAgZXJyID0gZXh0NF9pb2N0bF9zZXRmbGFncyhp bm9kZSwgZmxhZ3MpOw0KMTA1MCAgICAgICAgICAgICAgICAgaWYgKGVycikNCjEwNTEgICAgICAg ICAgICAgICAgICAgICAgICAgZ290byBvdXQ7DQoxMDUyICAgICAgICAgICAgICAgICBlcnIgPSBl eHQ0X2lvY3RsX3NldHByb2plY3QoZmlscCwgZmEuZnN4X3Byb2ppZCk7DQoxMDUzIG91dDoNCjEw NTQgICAgICAgICAgICAgICAgIGlub2RlX3VubG9jayhpbm9kZSk7DQoxMDU1ICAgICAgICAgICAg ICAgICBtbnRfZHJvcF93cml0ZV9maWxlKGZpbHApOyAgICAgICAgICDigJTigJTigJTigJTigJTi gJTigJTigJQ+ZHJvcHBlZCBoZXJlLg0KMTA1NiAgICAgICAgICAgICAgICAgcmV0dXJuIGVycjsg DQoxMDU3ICAgICAgICAgfQ0KDQpUaGFua3MsDQpTaGlsb25nDQoNCj4gDQo+IFRoYW5rcywNCj4g DQo+IAkJCQkJCS0gVGVkDQoNCgpfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fXwpMaW51eC1mMmZzLWRldmVsIG1haWxpbmcgbGlzdApMaW51eC1mMmZzLWRldmVs QGxpc3RzLnNvdXJjZWZvcmdlLm5ldApodHRwczovL2xpc3RzLnNvdXJjZWZvcmdlLm5ldC9saXN0 cy9saXN0aW5mby9saW51eC1mMmZzLWRldmVsCg==