netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 04/10] sysctl: Fix neighbour table sysctls.
       [not found]                 ` <m14pj89pmt.fsf_-_@ebiederm.dsl.xmission.com>
@ 2007-08-10  0:56                   ` Eric W. Biederman
  2007-08-10  0:57                     ` [PATCH 05/10] sysctl: ipv6 route flushing (kill binary path) Eric W. Biederman
                                       ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Eric W. Biederman @ 2007-08-10  0:56 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, devel, Alexey Dobriyan, netdev, David Miller


- In ipv6 ndisc_ifinfo_syctl_change so it doesn't depend on binary
  sysctl names for a function that works with proc.

- In neighbour.c reorder the table to put the possibly unused entries
  at the end so we can remove them by terminating the table early.

- In neighbour.c kill the entries with questionable binary sysctl
  handling behavior.

- In neighbour.c if we don't have a strategy routine remove the
  binary path.  So we don't the default sysctl strategy routine
  on data that is not ready for it.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 net/core/neighbour.c |   75 ++++++++++++++++++++++++++------------------------
 net/ipv6/ndisc.c     |   24 ++++++---------
 2 files changed, 49 insertions(+), 50 deletions(-)

diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index ca2a153..27c3f4e 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -2498,7 +2498,6 @@ static struct neigh_sysctl_table {
 			.proc_handler	= &proc_dointvec,
 		},
 		{
-			.ctl_name	= NET_NEIGH_RETRANS_TIME,
 			.procname	= "retrans_time",
 			.maxlen		= sizeof(int),
 			.mode		= 0644,
@@ -2543,27 +2542,40 @@ static struct neigh_sysctl_table {
 			.proc_handler	= &proc_dointvec,
 		},
 		{
-			.ctl_name	= NET_NEIGH_ANYCAST_DELAY,
 			.procname	= "anycast_delay",
 			.maxlen		= sizeof(int),
 			.mode		= 0644,
 			.proc_handler	= &proc_dointvec_userhz_jiffies,
 		},
 		{
-			.ctl_name	= NET_NEIGH_PROXY_DELAY,
 			.procname	= "proxy_delay",
 			.maxlen		= sizeof(int),
 			.mode		= 0644,
 			.proc_handler	= &proc_dointvec_userhz_jiffies,
 		},
 		{
-			.ctl_name	= NET_NEIGH_LOCKTIME,
 			.procname	= "locktime",
 			.maxlen		= sizeof(int),
 			.mode		= 0644,
 			.proc_handler	= &proc_dointvec_userhz_jiffies,
 		},
 		{
+			.ctl_name	= NET_NEIGH_RETRANS_TIME_MS,
+			.procname	= "retrans_time_ms",
+			.maxlen		= sizeof(int),
+			.mode		= 0644,
+			.proc_handler	= &proc_dointvec_ms_jiffies,
+			.strategy	= &sysctl_ms_jiffies,
+		},
+		{
+			.ctl_name	= NET_NEIGH_REACHABLE_TIME_MS,
+			.procname	= "base_reachable_time_ms",
+			.maxlen		= sizeof(int),
+			.mode		= 0644,
+			.proc_handler	= &proc_dointvec_ms_jiffies,
+			.strategy	= &sysctl_ms_jiffies,
+		},
+		{
 			.ctl_name	= NET_NEIGH_GC_INTERVAL,
 			.procname	= "gc_interval",
 			.maxlen		= sizeof(int),
@@ -2592,22 +2604,7 @@ static struct neigh_sysctl_table {
 			.mode		= 0644,
 			.proc_handler	= &proc_dointvec,
 		},
-		{
-			.ctl_name	= NET_NEIGH_RETRANS_TIME_MS,
-			.procname	= "retrans_time_ms",
-			.maxlen		= sizeof(int),
-			.mode		= 0644,
-			.proc_handler	= &proc_dointvec_ms_jiffies,
-			.strategy	= &sysctl_ms_jiffies,
-		},
-		{
-			.ctl_name	= NET_NEIGH_REACHABLE_TIME_MS,
-			.procname	= "base_reachable_time_ms",
-			.maxlen		= sizeof(int),
-			.mode		= 0644,
-			.proc_handler	= &proc_dointvec_ms_jiffies,
-			.strategy	= &sysctl_ms_jiffies,
-		},
+		{}
 	},
 	.neigh_dev = {
 		{
@@ -2660,42 +2657,48 @@ int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p,
 	t->neigh_vars[9].data  = &p->anycast_delay;
 	t->neigh_vars[10].data = &p->proxy_delay;
 	t->neigh_vars[11].data = &p->locktime;
+	t->neigh_vars[12].data  = &p->retrans_time;
+	t->neigh_vars[13].data  = &p->base_reachable_time;
 
 	if (dev) {
 		dev_name_source = dev->name;
 		t->neigh_dev[0].ctl_name = dev->ifindex;
-		t->neigh_vars[12].procname = NULL;
-		t->neigh_vars[13].procname = NULL;
-		t->neigh_vars[14].procname = NULL;
-		t->neigh_vars[15].procname = NULL;
+		/* Terminate the table early */
+		memset(&t->neigh_vars[14], 0, sizeof(t->neigh_vars[14]));
 	} else {
 		dev_name_source = t->neigh_dev[0].procname;
-		t->neigh_vars[12].data = (int *)(p + 1);
-		t->neigh_vars[13].data = (int *)(p + 1) + 1;
-		t->neigh_vars[14].data = (int *)(p + 1) + 2;
-		t->neigh_vars[15].data = (int *)(p + 1) + 3;
+		t->neigh_vars[14].data = (int *)(p + 1);
+		t->neigh_vars[15].data = (int *)(p + 1) + 1;
+		t->neigh_vars[16].data = (int *)(p + 1) + 2;
+		t->neigh_vars[17].data = (int *)(p + 1) + 3;
 	}
 
-	t->neigh_vars[16].data  = &p->retrans_time;
-	t->neigh_vars[17].data  = &p->base_reachable_time;
 
 	if (handler || strategy) {
 		/* RetransTime */
 		t->neigh_vars[3].proc_handler = handler;
 		t->neigh_vars[3].strategy = strategy;
 		t->neigh_vars[3].extra1 = dev;
+		if (!strategy)
+			t->neigh_vars[3].ctl_name = CTL_UNNUMBERED;
 		/* ReachableTime */
 		t->neigh_vars[4].proc_handler = handler;
 		t->neigh_vars[4].strategy = strategy;
 		t->neigh_vars[4].extra1 = dev;
+		if (!strategy)
+			t->neigh_vars[4].ctl_name = CTL_UNNUMBERED;
 		/* RetransTime (in milliseconds)*/
-		t->neigh_vars[16].proc_handler = handler;
-		t->neigh_vars[16].strategy = strategy;
-		t->neigh_vars[16].extra1 = dev;
+		t->neigh_vars[12].proc_handler = handler;
+		t->neigh_vars[12].strategy = strategy;
+		t->neigh_vars[12].extra1 = dev;
+		if (!strategy)
+			t->neigh_vars[12].ctl_name = CTL_UNNUMBERED;
 		/* ReachableTime (in milliseconds) */
-		t->neigh_vars[17].proc_handler = handler;
-		t->neigh_vars[17].strategy = strategy;
-		t->neigh_vars[17].extra1 = dev;
+		t->neigh_vars[13].proc_handler = handler;
+		t->neigh_vars[13].strategy = strategy;
+		t->neigh_vars[13].extra1 = dev;
+		if (!strategy)
+			t->neigh_vars[13].ctl_name = CTL_UNNUMBERED;
 	}
 
 	dev_name = kstrdup(dev_name_source, GFP_KERNEL);
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 0358e60..d388429 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -1570,30 +1570,26 @@ int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write, struct file * f
 	struct inet6_dev *idev;
 	int ret;
 
-	if (ctl->ctl_name == NET_NEIGH_RETRANS_TIME ||
-	    ctl->ctl_name == NET_NEIGH_REACHABLE_TIME)
+	if ((strcmp(ctl->procname, "retrans_time") == 0) ||
+	    (strcmp(ctl->procname, "base_reachable_time") == 0))
 		ndisc_warn_deprecated_sysctl(ctl, "syscall", dev ? dev->name : "default");
 
-	switch (ctl->ctl_name) {
-	case NET_NEIGH_RETRANS_TIME:
+	if (strcmp(ctl->procname, "retrans_time") == 0)
 		ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos);
-		break;
-	case NET_NEIGH_REACHABLE_TIME:
+
+	else if (strcmp(ctl->procname, "base_reachable_time") == 0)
 		ret = proc_dointvec_jiffies(ctl, write,
 					    filp, buffer, lenp, ppos);
-		break;
-	case NET_NEIGH_RETRANS_TIME_MS:
-	case NET_NEIGH_REACHABLE_TIME_MS:
+
+	else if ((strcmp(ctl->procname, "retrans_time_ms") == 0) ||
+		 (strcmp(ctl->procname, "base_reacable_time_ms") == 0))
 		ret = proc_dointvec_ms_jiffies(ctl, write,
 					       filp, buffer, lenp, ppos);
-		break;
-	default:
+	else
 		ret = -1;
-	}
 
 	if (write && ret == 0 && dev && (idev = in6_dev_get(dev)) != NULL) {
-		if (ctl->ctl_name == NET_NEIGH_REACHABLE_TIME ||
-		    ctl->ctl_name == NET_NEIGH_REACHABLE_TIME_MS)
+		if (ctl->data == &idev->nd_parms->base_reachable_time)
 			idev->nd_parms->reachable_time = neigh_rand_reach_time(idev->nd_parms->base_reachable_time);
 		idev->tstamp = jiffies;
 		inet6_ifinfo_notify(RTM_NEWLINK, idev);
-- 
1.5.1.1.181.g2de0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 05/10] sysctl: ipv6 route flushing (kill binary path)
  2007-08-10  0:56                   ` [PATCH 04/10] sysctl: Fix neighbour table sysctls Eric W. Biederman
@ 2007-08-10  0:57                     ` Eric W. Biederman
  2007-08-10  0:58                       ` [PATCH 06/10] sysctl: Remove broken sunrpc debug binary sysctls Eric W. Biederman
  2007-08-10  1:04                       ` [PATCH 06/10] sysctl: Remove broken sunrpc debug binary sysctls Eric W. Biederman
  2007-08-10  1:47                     ` [PATCH 04/10] sysctl: Fix neighbour table sysctls YOSHIFUJI Hideaki / 吉藤英明
  2007-08-10  2:22                     ` YOSHIFUJI Hideaki / 吉藤英明
  2 siblings, 2 replies; 14+ messages in thread
From: Eric W. Biederman @ 2007-08-10  0:57 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, Alexey Dobriyan, netdev, David Miller


We don't preoperly support the sysctl binary path for flushing
the ipv6 routes.  So remove support for a binary path.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 net/ipv6/route.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 55ea80f..0d23a46 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2458,7 +2458,6 @@ int ipv6_sysctl_rtcache_flush(ctl_table *ctl, int write, struct file * filp,
 
 ctl_table ipv6_route_table[] = {
 	{
-		.ctl_name	=	NET_IPV6_ROUTE_FLUSH,
 		.procname	=	"flush",
 		.data		=	&flush_delay,
 		.maxlen		=	sizeof(int),
-- 
1.5.1.1.181.g2de0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 06/10] sysctl: Remove broken sunrpc debug binary sysctls
  2007-08-10  0:57                     ` [PATCH 05/10] sysctl: ipv6 route flushing (kill binary path) Eric W. Biederman
@ 2007-08-10  0:58                       ` Eric W. Biederman
       [not found]                         ` <m1myx08arh.fsf_-_@ebiederm.dsl.xmission.com>
  2007-08-10  1:04                       ` [PATCH 06/10] sysctl: Remove broken sunrpc debug binary sysctls Eric W. Biederman
  1 sibling, 1 reply; 14+ messages in thread
From: Eric W. Biederman @ 2007-08-10  0:58 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-kernel, Alexey Dobriyan, netdev, David Miller,
	trond.myklebust

>From ddf280c9de903f1fb5d4ecf9c68df0c479d7c7d2 Mon Sep 17 00:00:00 2001
From: Eric W. Biederman <ebiederm@xmission.com>
Date: Thu, 9 Aug 2007 16:00:00 -0600
Subject: 

This is debug code so no need to support binary sysctl,
and the binary sysctls as they were written were not
consistent with what showed up in /proc so remove
the binary sysctl support.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 net/sunrpc/sysctl.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/net/sunrpc/sysctl.c b/net/sunrpc/sysctl.c
index 738db32..864b541 100644
--- a/net/sunrpc/sysctl.c
+++ b/net/sunrpc/sysctl.c
@@ -114,7 +114,6 @@ done:
 
 static ctl_table debug_table[] = {
 	{
-		.ctl_name	= CTL_RPCDEBUG,
 		.procname	= "rpc_debug",
 		.data		= &rpc_debug,
 		.maxlen		= sizeof(int),
@@ -122,7 +121,6 @@ static ctl_table debug_table[] = {
 		.proc_handler	= &proc_dodebug
 	},
 	{
-		.ctl_name	= CTL_NFSDEBUG,
 		.procname	= "nfs_debug",
 		.data		= &nfs_debug,
 		.maxlen		= sizeof(int),
@@ -130,7 +128,6 @@ static ctl_table debug_table[] = {
 		.proc_handler	= &proc_dodebug
 	},
 	{
-		.ctl_name	= CTL_NFSDDEBUG,
 		.procname	= "nfsd_debug",
 		.data		= &nfsd_debug,
 		.maxlen		= sizeof(int),
@@ -138,7 +135,6 @@ static ctl_table debug_table[] = {
 		.proc_handler	= &proc_dodebug
 	},
 	{
-		.ctl_name	= CTL_NLMDEBUG,
 		.procname	= "nlm_debug",
 		.data		= &nlm_debug,
 		.maxlen		= sizeof(int),
-- 
1.5.1.1.181.g2de0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 09/10] sysctl: ipv4 remove binary sysctl paths where they are broken.
       [not found]                           ` <m1ir7o8ap1.fsf_-_@ebiederm.dsl.xmission.com>
@ 2007-08-10  1:02                             ` Eric W. Biederman
  0 siblings, 0 replies; 14+ messages in thread
From: Eric W. Biederman @ 2007-08-10  1:02 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, Alexey Dobriyan, David Miller, netdev


Currently tcp_available_congestion_control does not even
attempt being read from sys_sysctl, and ipfrag_max_dist
while it works allows setting of invalid values using
sys_sysctl.

So just kill the binary sys_sysctl support for these
sysctls.  If the support is not important enough to
test and get right it probably isn't important enough
to keep.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 net/ipv4/sysctl_net_ipv4.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index 53ef0f4..282eb7e 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -672,7 +672,6 @@ ctl_table ipv4_table[] = {
 		.strategy	= &sysctl_jiffies
 	},
 	{
-		.ctl_name	= NET_IPV4_IPFRAG_MAX_DIST,
 		.procname	= "ipfrag_max_dist",
 		.data		= &sysctl_ipfrag_max_dist,
 		.maxlen		= sizeof(int),
@@ -797,7 +796,6 @@ ctl_table ipv4_table[] = {
 	},
 #endif /* CONFIG_NETLABEL */
 	{
-		.ctl_name	= NET_TCP_AVAIL_CONG_CONTROL,
 		.procname	= "tcp_available_congestion_control",
 		.maxlen		= TCP_CA_BUF_MAX,
 		.mode		= 0444,
-- 
1.5.1.1.181.g2de0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 06/10] sysctl: Remove broken sunrpc debug binary sysctls
  2007-08-10  0:57                     ` [PATCH 05/10] sysctl: ipv6 route flushing (kill binary path) Eric W. Biederman
  2007-08-10  0:58                       ` [PATCH 06/10] sysctl: Remove broken sunrpc debug binary sysctls Eric W. Biederman
@ 2007-08-10  1:04                       ` Eric W. Biederman
  1 sibling, 0 replies; 14+ messages in thread
From: Eric W. Biederman @ 2007-08-10  1:04 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-kernel, Alexey Dobriyan, netdev, David Miller,
	trond.myklebust


This is debug code so no need to support binary sysctl,
and the binary sysctls as they were written were not
consistent with what showed up in /proc so remove
the binary sysctl support.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 net/sunrpc/sysctl.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/net/sunrpc/sysctl.c b/net/sunrpc/sysctl.c
index 738db32..864b541 100644
--- a/net/sunrpc/sysctl.c
+++ b/net/sunrpc/sysctl.c
@@ -114,7 +114,6 @@ done:
 
 static ctl_table debug_table[] = {
 	{
-		.ctl_name	= CTL_RPCDEBUG,
 		.procname	= "rpc_debug",
 		.data		= &rpc_debug,
 		.maxlen		= sizeof(int),
@@ -122,7 +121,6 @@ static ctl_table debug_table[] = {
 		.proc_handler	= &proc_dodebug
 	},
 	{
-		.ctl_name	= CTL_NFSDEBUG,
 		.procname	= "nfs_debug",
 		.data		= &nfs_debug,
 		.maxlen		= sizeof(int),
@@ -130,7 +128,6 @@ static ctl_table debug_table[] = {
 		.proc_handler	= &proc_dodebug
 	},
 	{
-		.ctl_name	= CTL_NFSDDEBUG,
 		.procname	= "nfsd_debug",
 		.data		= &nfsd_debug,
 		.maxlen		= sizeof(int),
@@ -138,7 +135,6 @@ static ctl_table debug_table[] = {
 		.proc_handler	= &proc_dodebug
 	},
 	{
-		.ctl_name	= CTL_NLMDEBUG,
 		.procname	= "nlm_debug",
 		.data		= &nlm_debug,
 		.maxlen		= sizeof(int),
-- 
1.5.1.1.181.g2de0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 04/10] sysctl: Fix neighbour table sysctls.
  2007-08-10  0:56                   ` [PATCH 04/10] sysctl: Fix neighbour table sysctls Eric W. Biederman
  2007-08-10  0:57                     ` [PATCH 05/10] sysctl: ipv6 route flushing (kill binary path) Eric W. Biederman
@ 2007-08-10  1:47                     ` YOSHIFUJI Hideaki / 吉藤英明
  2007-08-10  1:49                       ` David Miller
  2007-08-10  1:55                       ` Andrew Morton
  2007-08-10  2:22                     ` YOSHIFUJI Hideaki / 吉藤英明
  2 siblings, 2 replies; 14+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2007-08-10  1:47 UTC (permalink / raw)
  To: ebiederm; +Cc: akpm, linux-kernel, devel, adobriyan, netdev, davem, yoshfuji

Hello.

In article <m1zm108axi.fsf_-_@ebiederm.dsl.xmission.com> (at Thu, 09 Aug 2007 18:56:09 -0600), ebiederm@xmission.com (Eric W. Biederman) says:

> 
> - In ipv6 ndisc_ifinfo_syctl_change so it doesn't depend on binary
>   sysctl names for a function that works with proc.
> 
> - In neighbour.c reorder the table to put the possibly unused entries
>   at the end so we can remove them by terminating the table early.
> 
> - In neighbour.c kill the entries with questionable binary sysctl
>   handling behavior.
> 
> - In neighbour.c if we don't have a strategy routine remove the
>   binary path.  So we don't the default sysctl strategy routine
>   on data that is not ready for it.
> 

I disagree.  It is bad to remove existing interface.
Ditto for other patches.

Regards,

--yoshfuji

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 04/10] sysctl: Fix neighbour table sysctls.
  2007-08-10  1:47                     ` [PATCH 04/10] sysctl: Fix neighbour table sysctls YOSHIFUJI Hideaki / 吉藤英明
@ 2007-08-10  1:49                       ` David Miller
  2007-08-10  2:14                         ` YOSHIFUJI Hideaki / 吉藤英明
  2007-08-10  1:55                       ` Andrew Morton
  1 sibling, 1 reply; 14+ messages in thread
From: David Miller @ 2007-08-10  1:49 UTC (permalink / raw)
  To: yoshfuji; +Cc: ebiederm, akpm, linux-kernel, devel, adobriyan, netdev

From: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>
Date: Fri, 10 Aug 2007 10:47:10 +0900 (JST)

> I disagree.  It is bad to remove existing interface.
> Ditto for other patches.

I think perhaps you misunderstand what Eric is doing.

sys_sysctl() isn't working properly for these cases and it is both a
deprecated interface and not worth the pain of adding support
in these cases.

The fact that nobody complains that none of this stuff works
via sys_sysctl() to me proves that it is never used.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 04/10] sysctl: Fix neighbour table sysctls.
  2007-08-10  1:47                     ` [PATCH 04/10] sysctl: Fix neighbour table sysctls YOSHIFUJI Hideaki / 吉藤英明
  2007-08-10  1:49                       ` David Miller
@ 2007-08-10  1:55                       ` Andrew Morton
  2007-08-10  2:12                         ` Eric W. Biederman
  1 sibling, 1 reply; 14+ messages in thread
From: Andrew Morton @ 2007-08-10  1:55 UTC (permalink / raw)
  To: YOSHIFUJI Hideaki / 吉藤英明
  Cc: ebiederm, linux-kernel, devel, adobriyan, netdev, davem

On Fri, 10 Aug 2007 10:47:10 +0900 (JST) YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org> wrote:

> Hello.
> 
> In article <m1zm108axi.fsf_-_@ebiederm.dsl.xmission.com> (at Thu, 09 Aug 2007 18:56:09 -0600), ebiederm@xmission.com (Eric W. Biederman) says:
> 
> > 
> > - In ipv6 ndisc_ifinfo_syctl_change so it doesn't depend on binary
> >   sysctl names for a function that works with proc.
> > 
> > - In neighbour.c reorder the table to put the possibly unused entries
> >   at the end so we can remove them by terminating the table early.
> > 
> > - In neighbour.c kill the entries with questionable binary sysctl
> >   handling behavior.
> > 
> > - In neighbour.c if we don't have a strategy routine remove the
> >   binary path.  So we don't the default sysctl strategy routine
> >   on data that is not ready for it.
> > 
> 
> I disagree.  It is bad to remove existing interface.

But it is good to remove bad interfaces, if we possibly can.

It is worth making the attempt.  Does anyone know of anything which will
break?  I fed NET_NEIGH_ANYCAST_DELAY at random into
http://www.google.com/codesearch and came up with nothing...



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 04/10] sysctl: Fix neighbour table sysctls.
  2007-08-10  1:55                       ` Andrew Morton
@ 2007-08-10  2:12                         ` Eric W. Biederman
  0 siblings, 0 replies; 14+ messages in thread
From: Eric W. Biederman @ 2007-08-10  2:12 UTC (permalink / raw)
  To: Andrew Morton
  Cc: YOSHIFUJI Hideaki / 吉藤英明,
	linux-kernel, devel, adobriyan, netdev, davem

Andrew Morton <akpm@linux-foundation.org> writes:

> But it is good to remove bad interfaces, if we possibly can.
>
> It is worth making the attempt.  Does anyone know of anything which will
> break?  I fed NET_NEIGH_ANYCAST_DELAY at random into
> http://www.google.com/codesearch and came up with nothing...

My current policy is that since I could only find 5 real world linux
programs that even call sys_sysctl, that if I find a broken sysctl
binary interface I'm lazy and just remove it.  The only networking one
I know of is radvd.

Added to that I just pushed an autochecking sysctl patch to Andrew
that fails register_sysctl_table if the sysctl table is broken.  And
all of these showed up.  So some fix was needed or things would have
been even worse.

Eric


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 04/10] sysctl: Fix neighbour table sysctls.
  2007-08-10  1:49                       ` David Miller
@ 2007-08-10  2:14                         ` YOSHIFUJI Hideaki / 吉藤英明
  2007-08-10  2:23                           ` Eric W. Biederman
  0 siblings, 1 reply; 14+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2007-08-10  2:14 UTC (permalink / raw)
  To: davem; +Cc: ebiederm, akpm, linux-kernel, devel, adobriyan, netdev, yoshfuji

In article <20070809.184921.11594412.davem@davemloft.net> (at Thu, 09 Aug 2007 18:49:21 -0700 (PDT)), David Miller <davem@davemloft.net> says:

> From: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>
> Date: Fri, 10 Aug 2007 10:47:10 +0900 (JST)
> 
> > I disagree.  It is bad to remove existing interface.
> > Ditto for other patches.
> 
> I think perhaps you misunderstand what Eric is doing.
> 
> sys_sysctl() isn't working properly for these cases and it is both a
> deprecated interface and not worth the pain of adding support
> in these cases.

Would you explain why it does not work properly
for those cases?

--yoshfuji

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 04/10] sysctl: Fix neighbour table sysctls.
  2007-08-10  0:56                   ` [PATCH 04/10] sysctl: Fix neighbour table sysctls Eric W. Biederman
  2007-08-10  0:57                     ` [PATCH 05/10] sysctl: ipv6 route flushing (kill binary path) Eric W. Biederman
  2007-08-10  1:47                     ` [PATCH 04/10] sysctl: Fix neighbour table sysctls YOSHIFUJI Hideaki / 吉藤英明
@ 2007-08-10  2:22                     ` YOSHIFUJI Hideaki / 吉藤英明
  2 siblings, 0 replies; 14+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2007-08-10  2:22 UTC (permalink / raw)
  To: ebiederm; +Cc: akpm, linux-kernel, devel, adobriyan, netdev, davem, yoshfuji

In article <m1zm108axi.fsf_-_@ebiederm.dsl.xmission.com> (at Thu, 09 Aug 2007 18:56:09 -0600), ebiederm@xmission.com (Eric W. Biederman) says:

> 
> - In ipv6 ndisc_ifinfo_syctl_change so it doesn't depend on binary
>   sysctl names for a function that works with proc.
:

Well, retrans_time_ms and base_reachable_time_ms supercedes
retrans_time and base_reachable_time, we've warned for long
time for its deprecation.  So, maybe, it is time to remove
the old interfaces (retrans_time and base_reachable_time)
and simplify ndisc_ifinfo_syctl_change().

--yoshfuji

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 04/10] sysctl: Fix neighbour table sysctls.
  2007-08-10  2:14                         ` YOSHIFUJI Hideaki / 吉藤英明
@ 2007-08-10  2:23                           ` Eric W. Biederman
  2007-08-10  2:29                             ` YOSHIFUJI Hideaki / 吉藤英明
  0 siblings, 1 reply; 14+ messages in thread
From: Eric W. Biederman @ 2007-08-10  2:23 UTC (permalink / raw)
  To: YOSHIFUJI Hideaki / 吉藤英明
  Cc: davem, ebiederm, akpm, linux-kernel, devel, adobriyan, netdev

YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org> writes:

> Would you explain why it does not work properly
> for those cases?

Mostly no appropriate strategy routine was setup to 
report the data to the caller of sys_sysctl.

Eric

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 04/10] sysctl: Fix neighbour table sysctls.
  2007-08-10  2:23                           ` Eric W. Biederman
@ 2007-08-10  2:29                             ` YOSHIFUJI Hideaki / 吉藤英明
  2007-08-10  2:35                               ` Eric W. Biederman
  0 siblings, 1 reply; 14+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2007-08-10  2:29 UTC (permalink / raw)
  To: ebiederm; +Cc: davem, akpm, linux-kernel, devel, adobriyan, netdev, yoshfuji

In article <m1odhg6sbv.fsf@ebiederm.dsl.xmission.com> (at Thu, 09 Aug 2007 20:23:16 -0600), ebiederm@xmission.com (Eric W. Biederman) says:

> YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org> writes:
> 
> > Would you explain why it does not work properly
> > for those cases?
> 
> Mostly no appropriate strategy routine was setup to 
> report the data to the caller of sys_sysctl.

I assume that default strategy have been existing for it, no?!
Maybe, I do miss something...

--yoshfuji

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 04/10] sysctl: Fix neighbour table sysctls.
  2007-08-10  2:29                             ` YOSHIFUJI Hideaki / 吉藤英明
@ 2007-08-10  2:35                               ` Eric W. Biederman
  0 siblings, 0 replies; 14+ messages in thread
From: Eric W. Biederman @ 2007-08-10  2:35 UTC (permalink / raw)
  To: YOSHIFUJI Hideaki / 吉藤英明
  Cc: davem, akpm, linux-kernel, devel, adobriyan, netdev

YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org> writes:

> In article <m1odhg6sbv.fsf@ebiederm.dsl.xmission.com> (at Thu, 09 Aug 2007
> 20:23:16 -0600), ebiederm@xmission.com (Eric W. Biederman) says:
>
>> YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org> writes:
>> 
>> > Would you explain why it does not work properly
>> > for those cases?
>> 
>> Mostly no appropriate strategy routine was setup to 
>> report the data to the caller of sys_sysctl.
>
> I assume that default strategy have been existing for it, no?!
> Maybe, I do miss something...

I'd have to go through it case by case.  But in general
unless your proc_handler is proc_dointvec the default
strategy routine which does a raw binary copy of your data
out will generally do the wrong thing.

So especially if your data is jiffies or otherwise needs
processing you don't want to use the default strategy
routine.

Until relatively recently no one was really policing the
sysctl interfaces and even now it isn't too serious.

Eric

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2007-08-10  2:36 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20070726164518.GB16937@localhost.sw.ru>
     [not found] ` <m13azbulhf.fsf@ebiederm.dsl.xmission.com>
     [not found]   ` <20070727145235.GC6924@localhost.sw.ru>
     [not found]     ` <20070806124530.GD6634@localhost.sw.ru>
     [not found]       ` <m1tzr8a3ms.fsf_-_@ebiederm.dsl.xmission.com>
     [not found]         ` <m1ps1wa3kf.fsf_-_@ebiederm.dsl.xmission.com>
     [not found]           ` <m1hcn8a2rq.fsf_-_@ebiederm.dsl.xmission.com>
     [not found]             ` <m1d4xw9psl.fsf_-_@ebiederm.dsl.xmission.com>
     [not found]               ` <m18x8k9ppv.fsf_-_@ebiederm.dsl.xmission.com>
     [not found]                 ` <m14pj89pmt.fsf_-_@ebiederm.dsl.xmission.com>
2007-08-10  0:56                   ` [PATCH 04/10] sysctl: Fix neighbour table sysctls Eric W. Biederman
2007-08-10  0:57                     ` [PATCH 05/10] sysctl: ipv6 route flushing (kill binary path) Eric W. Biederman
2007-08-10  0:58                       ` [PATCH 06/10] sysctl: Remove broken sunrpc debug binary sysctls Eric W. Biederman
     [not found]                         ` <m1myx08arh.fsf_-_@ebiederm.dsl.xmission.com>
     [not found]                           ` <m1ir7o8ap1.fsf_-_@ebiederm.dsl.xmission.com>
2007-08-10  1:02                             ` [PATCH 09/10] sysctl: ipv4 remove binary sysctl paths where they are broken Eric W. Biederman
2007-08-10  1:04                       ` [PATCH 06/10] sysctl: Remove broken sunrpc debug binary sysctls Eric W. Biederman
2007-08-10  1:47                     ` [PATCH 04/10] sysctl: Fix neighbour table sysctls YOSHIFUJI Hideaki / 吉藤英明
2007-08-10  1:49                       ` David Miller
2007-08-10  2:14                         ` YOSHIFUJI Hideaki / 吉藤英明
2007-08-10  2:23                           ` Eric W. Biederman
2007-08-10  2:29                             ` YOSHIFUJI Hideaki / 吉藤英明
2007-08-10  2:35                               ` Eric W. Biederman
2007-08-10  1:55                       ` Andrew Morton
2007-08-10  2:12                         ` Eric W. Biederman
2007-08-10  2:22                     ` YOSHIFUJI Hideaki / 吉藤英明

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).