LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] kernel: sysctl: change ipfrag_high/low_thresh to CTL_ULONG
@ 2019-05-24 14:38 Kefeng Wang
2019-05-24 15:00 ` Eric Dumazet
0 siblings, 1 reply; 3+ messages in thread
From: Kefeng Wang @ 2019-05-24 14:38 UTC (permalink / raw)
To: linux-kernel; +Cc: Kefeng Wang, Andrew Morton, David S. Miller, Eric Dumazet
3e67f106f619 ("inet: frags: break the 2GB limit for frags storage"),
changes ipfrag_high/low_thread 'type' from int to long, using CTL_ULONG
instead of CTL_INT to keep consistent.
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
kernel/sysctl_binary.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/sysctl_binary.c b/kernel/sysctl_binary.c
index 73c132095a7b..ef0687f40f87 100644
--- a/kernel/sysctl_binary.c
+++ b/kernel/sysctl_binary.c
@@ -410,8 +410,8 @@ static const struct bin_table bin_net_ipv4_table[] = {
{ CTL_INT, NET_IPV4_ICMP_RATELIMIT, "icmp_ratelimit" },
{ CTL_INT, NET_IPV4_ICMP_RATEMASK, "icmp_ratemask" },
- { CTL_INT, NET_IPV4_IPFRAG_HIGH_THRESH, "ipfrag_high_thresh" },
- { CTL_INT, NET_IPV4_IPFRAG_LOW_THRESH, "ipfrag_low_thresh" },
+ { CTL_ULONG, NET_IPV4_IPFRAG_HIGH_THRESH, "ipfrag_high_thresh" },
+ { CTL_ULONG, NET_IPV4_IPFRAG_LOW_THRESH, "ipfrag_low_thresh" },
{ CTL_INT, NET_IPV4_IPFRAG_TIME, "ipfrag_time" },
{ CTL_INT, NET_IPV4_IPFRAG_SECRET_INTERVAL, "ipfrag_secret_interval" },
--
2.20.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] kernel: sysctl: change ipfrag_high/low_thresh to CTL_ULONG
2019-05-24 14:38 [PATCH] kernel: sysctl: change ipfrag_high/low_thresh to CTL_ULONG Kefeng Wang
@ 2019-05-24 15:00 ` Eric Dumazet
2019-05-25 9:00 ` Kefeng Wang
0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2019-05-24 15:00 UTC (permalink / raw)
To: Kefeng Wang; +Cc: LKML, Andrew Morton, David S. Miller
On Fri, May 24, 2019 at 7:30 AM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>
> 3e67f106f619 ("inet: frags: break the 2GB limit for frags storage"),
> changes ipfrag_high/low_thread 'type' from int to long, using CTL_ULONG
> instead of CTL_INT to keep consistent.
What about compatibility with existing applications ?
Will there sysctl() fail if they provide 32bit variable ?
/proc/sys/net files are text files, but sysctl() system call has been
discouraged for more than a decade.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] kernel: sysctl: change ipfrag_high/low_thresh to CTL_ULONG
2019-05-24 15:00 ` Eric Dumazet
@ 2019-05-25 9:00 ` Kefeng Wang
0 siblings, 0 replies; 3+ messages in thread
From: Kefeng Wang @ 2019-05-25 9:00 UTC (permalink / raw)
To: Eric Dumazet; +Cc: LKML, Andrew Morton, David S. Miller
On 2019/5/24 23:00, Eric Dumazet wrote:
> On Fri, May 24, 2019 at 7:30 AM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>> 3e67f106f619 ("inet: frags: break the 2GB limit for frags storage"),
>> changes ipfrag_high/low_thread 'type' from int to long, using CTL_ULONG
>> instead of CTL_INT to keep consistent.
>
> What about compatibility with existing applications ?
> Will there sysctl() fail if they provide 32bit variable ?
>
> /proc/sys/net files are text files, but sysctl() system call has been
> discouraged for more than a decade.
The sysctl() system call is deprecated, so the main purpose of this patch is to keep consistent,
but it does set wrong value(eg, set 16000000000 to ipfrag_high_thresh) when use sysctl().
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-05-25 9:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-24 14:38 [PATCH] kernel: sysctl: change ipfrag_high/low_thresh to CTL_ULONG Kefeng Wang
2019-05-24 15:00 ` Eric Dumazet
2019-05-25 9:00 ` Kefeng Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).