lkml.org 
[lkml]   [2015]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH] kernel/sysctl.c: If "count" including the terminating byte '\0' the write system call should retrun success.
    Sean Fu <fxinrong@gmail.com> 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


    \
     
     \ /
      Last update: 2015-09-11 19:41    [W:5.641 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site