Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756001AbbHYReR (ORCPT ); Tue, 25 Aug 2015 13:34:17 -0400 Received: from mail-ig0-f182.google.com ([209.85.213.182]:37549 "EHLO mail-ig0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755922AbbHYReK (ORCPT ); Tue, 25 Aug 2015 13:34:10 -0400 Subject: Re: [PATCH] kernel/sysctl.c: If "count" including the terminating byte '\0' the write system call should retrun success. To: Sean Fu , Steven Rostedt References: <20150824125902.4ba11ec6@gandalf.local.home> <9CF68C3D-499C-4AFC-B890-BA5ECA284347@xmission.com> <20150825101507.4e3be4ca@gandalf.local.home> Cc: "Eric W. Biederman" , Andrey Ryabinin , Ulrich Obergfell , Prarit Bhargava , Eric B Munson , "Paul E. McKenney" , Johannes Weiner , Andrew Morton , Thomas Gleixner , Don Zickus , Heinrich Schuchardt , David Rientjes , linux-kernel@vger.kernel.org From: Austin S Hemmelgarn Message-ID: <55DCA705.8000903@gmail.com> Date: Tue, 25 Aug 2015 13:33:57 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-512; boundary="------------ms080109040307010401000401" X-Antivirus: avast! (VPS 150825-0, 2015-08-25), Outbound message X-Antivirus-Status: Clean Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 7908 Lines: 163 This is a cryptographically signed message in MIME format. --------------ms080109040307010401000401 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable On 2015-08-25 12:44, Sean Fu wrote: > On Tue, Aug 25, 2015 at 10:15 PM, Steven Rostedt = wrote: >> On Tue, 25 Aug 2015 15:50:18 +0800 >> Sean Fu wrote: >> >>> On Tue, Aug 25, 2015 at 10:24 AM, Eric W. Biederman >>> wrote: >>>> >>>> >>>> On August 24, 2015 6:57:57 PM MDT, Sean Fu wrot= e: >>>>> An application from HuaWei which works fine on 2.6 encounters this >>>>> issue on 3.0 or later kernel. >>>> >>>> My sympathies. Being stuck with a 3rd party application you can bar= ely talk about that has been broken for 5years and no one reported it. >>>> >>>> Ordinarily we would fix a regression like this. As it has been 5year= s the challenge now is how do we tell if there are applications that depe= nd on the current behavior. >>>> >>>> Before we can change the behavior back we need a convincing argument= that we won't cause a regression in another application by making the ch= ange. >>>> >>>> I do not see how such an argument can be made. So you have my sympa= thies but I do not see how we can help you. >>> We should consider this patch basing on my following arguments. >>> 1 Different version kernel should keep consistent on this behavior. >> >> The thing is, the above argument is against the patch. The behavior >> changed 2 years ago, and nobody noticed. Changing it back only causes >> more inconsistent behavior. > It is impossible to cause more inconsistent behavior. > it just enhance compatibility(support "xx...x\0"). > This patch just modify "proc_wspace_sep" array. and "proc_wspace_sep" i= s static. > Only "proc_get_long" used this array, "proc_get_long" is also static. > There are only 4 place to call "proc_get_long" in kernel/sysctl.c. > I will prove that these 4 callers have no bad impact later. Except that it is userspace we're worrying about here, not stuff=20 internal to the kernel. > >> >> >>> 2 This writting behavior on proc file should be same with writting on= >>> regular file as possible as we can. >> >> Writing to a proc file causes kernel actions. Writing to a regular fil= e >> just saves data. That's not an argument here. >> >>> 3 This patch does not have any potential compatibility risk with 3rd >>> party application. >> >> How do you know that? > I will prove that all other write usage is not impacted later. Except that you can only really do this for programs that you have=20 access to, and by definition you can not have access to every program=20 ever written that writes to /proc. If you were going to do this, it would need to be itself controlled by=20 another sysctl to toggle the behavior, which would need to default to=20 the current behavior. > > Thanks for all reply. > > Sean >> >> -- Steve >> >>> 4 Support writting "1...\0" to proc file. >>> >>>> >>>> Eric >>>> >> > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel"= in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > --------------ms080109040307010401000401 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgMFADCABgkqhkiG9w0BBwEAAKCC Brgwgga0MIIEnKADAgECAgMQblUwDQYJKoZIhvcNAQENBQAweTEQMA4GA1UEChMHUm9vdCBD QTEeMBwGA1UECxMVaHR0cDovL3d3dy5jYWNlcnQub3JnMSIwIAYDVQQDExlDQSBDZXJ0IFNp Z25pbmcgQXV0aG9yaXR5MSEwHwYJKoZIhvcNAQkBFhJzdXBwb3J0QGNhY2VydC5vcmcwHhcN MTUwMzI1MTkzNDM4WhcNMTUwOTIxMTkzNDM4WjBjMRgwFgYDVQQDEw9DQWNlcnQgV29UIFVz ZXIxIzAhBgkqhkiG9w0BCQEWFGFoZmVycm9pbjdAZ21haWwuY29tMSIwIAYJKoZIhvcNAQkB FhNhaGVtbWVsZ0BvaGlvZ3QuY29tMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA nQ/81tq0QBQi5w316VsVNfjg6kVVIMx760TuwA1MUaNQgQ3NyUl+UyFtjhpkNwwChjgAqfGd LIMTHAdObcwGfzO5uI2o1a8MHVQna8FRsU3QGouysIOGQlX8jFYXMKPEdnlt0GoQcd+BtESr pivbGWUEkPs1CwM6WOrs+09bAJP3qzKIr0VxervFrzrC5Dg9Rf18r9WXHElBuWHg4GYHNJ2V Ab8iKc10h44FnqxZK8RDN8ts/xX93i9bIBmHnFfyNRfiOUtNVeynJbf6kVtdHP+CRBkXCNRZ qyQT7gbTGD24P92PS2UTmDfplSBcWcTn65o3xWfesbf02jF6PL3BCrVnDRI4RgYxG3zFBJuG qvMoEODLhHKSXPAyQhwZINigZNdw5G1NqjXqUw+lIqdQvoPijK9J3eijiakh9u2bjWOMaleI SMRR6XsdM2O5qun1dqOrCgRkM0XSNtBQ2JjY7CycIx+qifJWsR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cmcCAxBuVTCBkwYLKoZIhvcNAQkQAgsxgYOggYAweTEQMA4GA1UEChMHUm9vdCBDQTEe MBwGA1UECxMVaHR0cDovL3d3dy5jYWNlcnQub3JnMSIwIAYDVQQDExlDQSBDZXJ0IFNpZ25p bmcgQXV0aG9yaXR5MSEwHwYJKoZIhvcNAQkBFhJzdXBwb3J0QGNhY2VydC5vcmcCAxBuVTAN BgkqhkiG9w0BAQEFAASCAgCIRzvfqkcv7Jh57nSWnFJFLk4gPb78nQn/MjA/tAUHAo22/Q/2 oQlDF+/KZRMbgkgNJAOufc3r8xRpG4ro9ixc/DZYcO3Pxveli5/zR+jcuGbhnLiHxPw1iHxJ N4lWXGXSD7ord+sJGaN2k5jMZP0LU9l9m0Uvh1Pi9G9eiF22aZxvzasKLQn+nHUlZXHi5ucD JSrzZxX58ujk71ZssSzyzTF07HYIYmakwQYiDDEyL2tHJ9rASVDPk6feUbt07mdjAsPi9SdC A8so7dFcAlvl/cFWpvT6vnbHmV5cYt6yquPf3O3G4YjTCqlYe6WGav0gzueq3aIgwEre2tQv EWeGil064Ps35yOOhQjIva0zXxhNNIZufzz3+wSrOLtHiSwWz+q1M2Afu+SI6LqP/lnSIYO8 FT7SWft/d8xNS55YP0+qi3dluys6u1vk4WyUxHz+d7oLHv5KN8i2clIs4MA+zpl0VFOb/uAH MRVEPB8Ee44vdNKsHuExqvnNE9pgfWfGq2mEf8ZkjXzV6EgkywOkXapGDltc299Dw4PVMZ8/ 2TraSgbhcfiiz5eAV16tPwskZXJ68Ik3W4XAswBv77a10+TFXx1PRCS/AD03q/HYUcb6DW2z JKvFGvkNIn0XD73v9KwroZrIIDx2RQOtAbd0TEvEAMMeGBbPsjIH5qvfcQAAAAAAAA== --------------ms080109040307010401000401-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/