Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1618974
| From | Linus Torvalds <torvalds@linux-foundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/3] sysctl: report EINVAL if value is larger than UINT_MAX for proc_douintvec |
| Date | 2017-04-07 19:00 +0200 |
| Message-ID | <ttFoT-1r2-45@gated-at.bofh.it> (permalink) |
| References | <ttEsN-K9-5@gated-at.bofh.it> <ttEsN-K9-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Apr 7, 2017 at 8:51 AM, Liping Zhang <zlpnobody@163.com> wrote:
> From: Liping Zhang <zlpnobody@gmail.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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 3/3] sysctl: report EINVAL if value is larger than UINT_MAX for proc_douintvec Liping Zhang <zlpnobody@163.com> - 2017-04-07 18:00 +0200
Re: [PATCH 3/3] sysctl: report EINVAL if value is larger than UINT_MAX for proc_douintvec Linus Torvalds <torvalds@linux-foundation.org> - 2017-04-07 19:00 +0200
Re: [PATCH 3/3] sysctl: report EINVAL if value is larger than UINT_MAX for proc_douintvec ebiederm@xmission.com (Eric W. Biederman) - 2017-04-07 23:10 +0200
Re: [PATCH 3/3] sysctl: report EINVAL if value is larger than UINT_MAX for proc_douintvec Linus Torvalds <torvalds@linux-foundation.org> - 2017-04-08 19:30 +0200
csiph-web