• Eric W. Biederman's avatar
    [PATCH] sysctl: allow a zero ctl_name in the middle of a sysctl table · d99f160a
    Eric W. Biederman authored
    Since it is becoming clear that there are just enough users of the binary
    sysctl interface that completely removing the binary interface from the kernel
    will not be an option for foreseeable future, we need to find a way to address
    the sysctl maintenance issues.
    
    The basic problem is that sysctl requires one central authority to allocate
    sysctl numbers, or else conflicts and ABI breakage occur.  The proc interface
    to sysctl does not have that problem, as names are not densely allocated.
    
    By not terminating a sysctl table until I have neither a ctl_name nor a
    procname, it becomes simple to add sysctl entries that don't show up in the
    binary sysctl interface.  Which allows people to avoid allocating a binary
    sysctl value when not needed.
    
    I have audited the kernel code and in my reading I have not found a single
    sysctl table that wasn't terminated by a completely zero filled entry.  So
    this change in behavior should not affect anything.
    
    I think this mechanism eases the pain enough that combined with a little
    disciple we can solve the reoccurring sysctl ABI breakage.
    Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
    Acked-by: default avatarAlan Cox <alan@redhat.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    d99f160a
sysctl.c 64.5 KB