Skip to content

Commit

Permalink
[PATCH] sysctl: Undeprecate sys_sysctl
Browse files Browse the repository at this point in the history
The basic issue is that despite have been deprecated and warned about as a
very bad thing in the man pages since its inception there are a few real
users of sys_sysctl.  It was my assumption that because sysctl had been
deprecated for all of 2.6 there would be no user space users by this point,
so I initially gave sys_sysctl a very short deprecation period.

Now that I know there are a few real users the only sane way to proceed
with deprecation is to push the time limit out to a year or two work and
work with distributions that have big testing pools like fedora core to
find these last remaining users.

Which means that the sys_sysctl interface needs to be maintained in the
meantime.

Since I have provided a technical measure that allows us to add new sysctl
entries without reserving more binary numbers I believe that is enough to
fix the sys_sysctl binary interface maintenance problems, because there is
no longer a need to change the binary interface at all.

Since the sys_sysctl implementation needs to stay around for a while and
the worst of the maintenance issues that caused us to occasionally break
the ABI have been addressed I don't see any advantage in continuing with
the removal of sys_sysctl.

So instead of merely increasing the deprecation period this patch removes
the deprecation of sys_sysctl and modifies the kernel to compile the code
in by default.

With committing to maintain sys_sysctl we get all of the advantages of a
fast interface for anything that needs it.  Currently sys_sysctl is about
5x faster than /proc/sys, for the same string data.

Signed-off-by: Eric W. Biederman <[email protected]>
Acked-by: Alan Cox <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
ebiederm authored and Linus Torvalds committed Nov 9, 2006
1 parent 6c33eb3 commit 13bb7e3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 22 deletions.
12 changes: 0 additions & 12 deletions Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,6 @@ Who: Mauro Carvalho Chehab <[email protected]>

---------------------------

What: sys_sysctl
When: January 2007
Why: The same information is available through /proc/sys and that is the
interface user space prefers to use. And there do not appear to be
any existing user in user space of sys_sysctl. The additional
maintenance overhead of keeping a set of binary names gets
in the way of doing a good job of maintaining this interface.

Who: Eric Biederman <[email protected]>

---------------------------

What: PCMCIA control ioctl (needed for pcmcia-cs [cardmgr, cardctl])
When: November 2005
Files: drivers/pcmcia/: pcmcia_ioctl.c
Expand Down
19 changes: 9 additions & 10 deletions init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -304,20 +304,19 @@ config UID16

config SYSCTL_SYSCALL
bool "Sysctl syscall support" if EMBEDDED
default n
default y
select SYSCTL
---help---
Enable the deprecated sysctl system call. sys_sysctl uses
binary paths that have been found to be a major pain to maintain
and use. The interface in /proc/sys is now the primary and what
everyone uses.
sys_sysctl uses binary paths that have been found challenging
to properly maintain and use. The interface in /proc/sys
using paths with ascii names is now the primary path to this
information.

Nothing has been using the binary sysctl interface for some
time now so nothing should break if you disable sysctl syscall
support, and your kernel will get marginally smaller.
Almost nothing using the binary sysctl interface so if you are
trying to save some space it is probably safe to disable this,
making your kernel marginally smaller.

Unless you have an application that uses the sys_sysctl interface
you should probably say N here.
If unsure say Y here.

config KALLSYMS
bool "Load all symbols for debugging/kksymoops" if EMBEDDED
Expand Down

0 comments on commit 13bb7e3

Please sign in to comment.