[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFy4b8ir1mg2ToGfYyLh_GLa+07iYcx0m+_cXkgTbh-sYg@mail.gmail.com>
Date: Fri, 7 Apr 2017 09:49:25 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Liping Zhang <zlpnobody@....com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...nel.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
David Miller <davem@...emloft.net>,
Subash Abhinov Kasiviswanathan <subashab@...eaurora.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Liping Zhang <zlpnobody@...il.com>
Subject: Re: [PATCH 3/3] sysctl: report EINVAL if value is larger than
UINT_MAX for proc_douintvec
On Fri, Apr 7, 2017 at 8:51 AM, Liping Zhang <zlpnobody@....com> wrote:
> From: Liping Zhang <zlpnobody@...il.com>
>
> Currently, inputting the following command will succeed but actually the
> value will be truncated:
> # echo 0x12ffffffff > /proc/sys/net/ipv4/tcp_notsent_lowat
>
> This is not friendly to the user, so instead, we should report error
> when the value is larger than UINT_MAX.
I applied the two other patches, but I didn't apply this one.
It's entirely possible that people end up doing something like
echo -1 > /proc/sys/some_random_uint
because that's a fairly normal thing to do to set all bits. Making
that an error seems wrong.
Linus
Powered by blists - more mailing lists