From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753938AbbIKRIh (ORCPT ); Fri, 11 Sep 2015 13:08:37 -0400 Received: from out02.mta.xmission.com ([166.70.13.232]:53147 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753305AbbIKRIe (ORCPT ); Fri, 11 Sep 2015 13:08:34 -0400 From: ebiederm@xmission.com (Eric W. Biederman) To: Sean Fu Cc: Steven Rostedt , Andrew Morton , Austin S Hemmelgarn , Andrey Ryabinin , Ulrich Obergfell , Prarit Bhargava , Eric B Munson , "Paul E. McKenney" , Johannes Weiner , Thomas Gleixner , Don Zickus , Heinrich Schuchardt , David Rientjes , linux-kernel@vger.kernel.org References: <9CF68C3D-499C-4AFC-B890-BA5ECA284347@xmission.com> <20150825101507.4e3be4ca@gandalf.local.home> <55DCA705.8000903@gmail.com> <20150825150536.546a73e5@gandalf.local.home> <20150826163621.28d7990a@gandalf.local.home> <20150826223230.4348d936@grimm.local.home> <20150908111730.6a1ecca6@gandalf.local.home> <87si6oq3y5.fsf@x220.int.ebiederm.org> <20150908123616.09589bfe@gandalf.local.home> Date: Fri, 11 Sep 2015 12:01:22 -0500 In-Reply-To: (Sean Fu's message of "Fri, 11 Sep 2015 17:05:31 +0800") Message-ID: <87mvwsubz1.fsf@x220.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-AID: U2FsdGVkX196tlGTm8YFl9S2bx7CzOwbIe/nqAg4AxI= X-SA-Exim-Connect-IP: 67.3.201.231 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.7 XMSubLong Long Subject * 0.0 TVD_RCVD_IP Message was received from an IP address * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.4996] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa06 1397; Body=1 Fuz1=1 Fuz2=1] * 0.0 T_TooManySym_03 6+ unique symbols in subject * 0.0 T_TooManySym_02 5+ unique symbols in subject * 0.0 T_TooManySym_01 4+ unique symbols in subject X-Spam-DCC: XMission; sa06 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;Sean Fu X-Spam-Relay-Country: X-Spam-Timing: total 292 ms - load_scoreonly_sql: 0.05 (0.0%), signal_user_changed: 4.5 (1.5%), b_tie_ro: 3.3 (1.1%), parse: 1.04 (0.4%), extract_message_metadata: 2.6 (0.9%), get_uri_detail_list: 0.96 (0.3%), tests_pri_-1000: 4.1 (1.4%), tests_pri_-950: 1.25 (0.4%), tests_pri_-900: 1.11 (0.4%), tests_pri_-400: 23 (7.9%), check_bayes: 22 (7.5%), b_tokenize: 6 (2.2%), b_tok_get_all: 7 (2.4%), b_comp_prob: 2.6 (0.9%), b_tok_touch_all: 2.9 (1.0%), b_finish: 0.93 (0.3%), tests_pri_0: 238 (81.6%), tests_pri_500: 5 (1.8%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH] kernel/sysctl.c: If "count" including the terminating byte '\0' the write system call should retrun success. X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Wed, 24 Sep 2014 11:00:52 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sean Fu writes: >> Sounds like a reasonable compromise. Sean, can you make a patch that >> only affects the one proc file (comment it well in the code), and have >> it accept nothing past the '\0'. Even if someone passed in "1 \0 2", it >> would only see "1 " > The current code uses uniform handler (e.g. "proc_dointvec") for all > same type proc file. > So all integer type proc file are affected. No. I do not believe the proprietary binary application you are dealing with writes to all proc files that use the proc_dointvec handler. > In fact, The behavior of all integer type proc file should be changed. Not at all. The only files that we can possibly justify changing today are the files where an actual regression is being observed. Because quite frankly 5 years is way too long to wait to report a regression. By and large software is reasonable and treats proc files as text files where '\0' is an invalid character. Accepting a '\0' is not at all reasonable for a text interface. The application that does it is buggy. Eric