Skip to contentSkip to conversation

sysctls

DISCUSSION Andrew Morton 4 participants 10 messages Apr 25, 2007 – Apr 26, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

I note that the networking tree is adding new sysctls:

<<<<<<< HEAD/include/linux/sysctl.h

        NET_IPV6_ACCEPT_SOURCE_ROUTE=25,
=======
        NET_IPV6_OPTIMISTIC_DAD=24,
        NET_IPV6_ACCEPT_SOURCE_ROUTE=25,
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

/include/linux/sysctl.h

(Well, it's trying to - there are some git rejects in net-2.6.22)

But we kind-of decided a while back to stop doing that and to use CTL_UNNUMBERED.

Frankly, I don't 100% remember the thinking - Eric, can you please remind us?

#1 lore raw
Quoted 9 lines · Andrew Morton

I note that the networking tree is adding new sysctls:

<<<<<<< HEAD/include/linux/sysctl.h

        NET_IPV6_ACCEPT_SOURCE_ROUTE=25,
=======
        NET_IPV6_OPTIMISTIC_DAD=24,
        NET_IPV6_ACCEPT_SOURCE_ROUTE=25,
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

/include/linux/sysctl.h

Quoted 7 lines

(Well, it's trying to - there are some git rejects in net-2.6.22)

But we kind-of decided a while back to stop doing that and to use CTL_UNNUMBERED.

Frankly, I don't 100% remember the thinking - Eric, can you please remind us?

The thinking is this:

Binary sysctl numbers are a problem because of patch conflicts like the above, and the related user space breakage they cause.

In practice no one uses binary sysctl numbers.

So the policy should be to add new sysctl's using CTL_UNNUMBERED (to prevent patch conflicts and user space breakage).

There may be cases where someone actually needs the binary sysctl interface. Once there is a demonstrated need we can go back and very carefully add numbers for these very few cases, with a strong review process.

Adding binary sysctl numbers should be done as carefully as and with as much review as adding syscall numbers, and distro kernels and other stable kernels should never get a sysctl number backport until the number first reaches Linus's tree. To avoid difference in meaning between different kernels.

Given that no one except on BSD uses the binary sysctl interface anyway my personal preference is to just freeze it and to reduce the number of binary sysctls we support if possible.

Eric

#2 lore raw
Quoted 44 lines · Eric W. Biederman
Quoted 9 lines · Andrew Morton

I note that the networking tree is adding new sysctls:

<<<<<<< HEAD/include/linux/sysctl.h

        NET_IPV6_ACCEPT_SOURCE_ROUTE=25,
=======
        NET_IPV6_OPTIMISTIC_DAD=24,
        NET_IPV6_ACCEPT_SOURCE_ROUTE=25,
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

/include/linux/sysctl.h

Quoted 7 lines

(Well, it's trying to - there are some git rejects in net-2.6.22)

But we kind-of decided a while back to stop doing that and to use CTL_UNNUMBERED.

Frankly, I don't 100% remember the thinking - Eric, can you please remind us?

The thinking is this:

Binary sysctl numbers are a problem because of patch conflicts like the above, and the related user space breakage they cause.

In practice no one uses binary sysctl numbers.

So the policy should be to add new sysctl's using CTL_UNNUMBERED (to prevent patch conflicts and user space breakage).

There may be cases where someone actually needs the binary sysctl interface. Once there is a demonstrated need we can go back and very carefully add numbers for these very few cases, with a strong review process.

Adding binary sysctl numbers should be done as carefully as and with as much review as adding syscall numbers, and distro kernels and other stable kernels should never get a sysctl number backport until the number first reaches Linus's tree. To avoid difference in meaning between different kernels.

Given that no one except on BSD uses the binary sysctl interface anyway my personal preference is to just freeze it and to reduce the number of binary sysctls we support if possible.

Quoted 5 lines

Eric
-
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

I did the optimistic dad sysctl, and have no strict use for numbered sysctls (I was just unaware of the policy). I'll work up a patch to use register_sysclt_table with CTL_UNNUMBERED in the next few days.

Regards
Neil

#3 lore raw
Quoted 3 lines · On Wed, 25 Apr 2007 15:53:19 -0400 Neil Horman <[email protected]> wrote:

I did the optimistic dad sysctl, and have no strict use for numbered sysctls (I was just unaware of the policy). I'll work up a patch to use register_sysclt_table with CTL_UNNUMBERED in the next few days.

I don't think you need to add a call to register_sysctl_table(), if that's what you're proposing. Just drop the changes to sysctl.h and use CTL_UNNUMBERED in sysctl.c.

maintainer
#4 lore raw

From: Andrew Morton <[email protected]>
Date: Wed, 25 Apr 2007 14:50:18 -0700

Quoted 10 lines
Quoted 3 lines · On Wed, 25 Apr 2007 15:53:19 -0400 Neil Horman <[email protected]> wrote:

I did the optimistic dad sysctl, and have no strict use for numbered sysctls (I was just unaware of the policy). I'll work up a patch to use register_sysclt_table with CTL_UNNUMBERED in the next few days.

I don't think you need to add a call to register_sysctl_table(), if that's what you're proposing. Just drop the changes to sysctl.h and use CTL_UNNUMBERED in sysctl.c.

Ok, I'll take care of this.

#5 lore raw
Quoted 10 lines · David Miller

From: Andrew Morton <[email protected]>
Date: Wed, 25 Apr 2007 14:50:18 -0700

Quoted 7 lines
Quoted 3 lines · On Wed, 25 Apr 2007 15:53:19 -0400 Neil Horman <[email protected]> wrote:

I did the optimistic dad sysctl, and have no strict use for numbered sysctls (I was just unaware of the policy). I'll work up a patch to use register_sysclt_table with CTL_UNNUMBERED in the next few days.

Quoted 5 lines
Quoted 3 lines

I don't think you need to add a call to register_sysctl_table(), if that's what you're proposing. Just drop the changes to sysctl.h and use CTL_UNNUMBERED in sysctl.c.

Ok, I'll take care of this.

Thank you dave.
Neil

maintainer
#6 lore raw
In reply to Andrew Morton

From: Andrew Morton <[email protected]>
Date: Wed, 25 Apr 2007 12:29:24 -0700

Quoted 11 lines

I note that the networking tree is adding new sysctls:

<<<<<<< HEAD/include/linux/sysctl.h

        NET_IPV6_ACCEPT_SOURCE_ROUTE=25,
=======
        NET_IPV6_OPTIMISTIC_DAD=24,
        NET_IPV6_ACCEPT_SOURCE_ROUTE=25,
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

/include/linux/sysctl.h

(Well, it's trying to - there are some git rejects in net-2.6.22)

I knew this was going to happen because of Yoshifuji's security fix, the conflict is trivial to resolve.

I'll rebase the net-2.6.22 tree later today since all we should have before 2.6.21-final is the netlink OOPS'er fix Alexey just posted.

#7 lore raw
Quoted 13 lines · David Miller

From: Andrew Morton <[email protected]>
Date: Wed, 25 Apr 2007 12:29:24 -0700

Quoted 10 lines

I note that the networking tree is adding new sysctls:

<<<<<<< HEAD/include/linux/sysctl.h

        NET_IPV6_ACCEPT_SOURCE_ROUTE=25,
=======
        NET_IPV6_OPTIMISTIC_DAD=24,
        NET_IPV6_ACCEPT_SOURCE_ROUTE=25,
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

/include/linux/sysctl.h

Quoted 8 lines
Quoted 1 line

(Well, it's trying to - there are some git rejects in net-2.6.22)

I knew this was going to happen because of Yoshifuji's security fix, the conflict is trivial to resolve.

I'll rebase the net-2.6.22 tree later today since all we should have before 2.6.21-final is the netlink OOPS'er fix Alexey just posted.

David for clarity do you happen to know of anyone using binary sysctl values?

In particular is there any reason not to use CTL_UNNUMBERED for new networking sysctls?

Eric

maintainer
#8 lore raw

From: [email protected] (Eric W. Biederman)
Date: Wed, 25 Apr 2007 14:06:34 -0600

Quoted 2 lines

David for clarity do you happen to know of anyone using binary sysctl values?

None at all.

Quoted 2 lines

In particular is there any reason not to use CTL_UNNUMBERED for new networking sysctls?

Neil said he would send me a patch to do that.

Thanks.

#9 lore raw
Quoted 6 lines · David Miller

From: [email protected] (Eric W. Biederman)
Date: Wed, 25 Apr 2007 14:06:34 -0600

Quoted 2 lines

David for clarity do you happen to know of anyone using binary sysctl values?

Quoted 6 lines

None at all.

Quoted 2 lines

In particular is there any reason not to use CTL_UNNUMBERED for new networking sysctls?

Neil said he would send me a patch to do that.

Thanks. I just wanted to be certain I wasn't missing something, when asking people not to use binary sysctl values.

Eric