Re: [RFC][PATCH] sysctl: Remove the sysctl system call
From: Eric W. Biederman
Date: Tue Oct 01 2019 - 18:54:23 EST
Kees Cook <keescook@xxxxxxxxxxxx> writes:
> On Tue, Oct 01, 2019 at 01:36:32PM -0500, Eric W. Biederman wrote:
>>
>> This system call has been deprecated almost since it was introduced, and
>> in a survey of the linux distributions I can no longer find any of them
>> that enable CONFIG_SYSCTL_SYSCALL. The only indication that I can find
>> that anyone might care is that a few of the defconfigs in the kernel
>> enable CONFIG_SYSCTL_SYSCALL. However this appears in only 31 of 414
>> defconfigs in the kernel, so I suspect this symbols presence is simply
>> because it is harmless to include rather than because it is necessary.
>>
>> As there appear to be no users of the sysctl system call, remove the
>> code. As this removes one of the few uses of the internal kernel mount
>> of proc I hope this allows for even more simplifications of the proc
>> filesystem.
>
> I'm for it. :) I tripped over this being deprecated over a decade ago. :P
>
> I think you can actually take this further and remove (or at least
> empty) the uapi/linux/sysctl.h file too.
I copied everyone who had put this into a defconfig and I will wait a
little more to see if anyone screams. I think it is a safe guess that
several of the affected configurations are dead (or at least
unmaintained) as I received 17 bounces when copying everyone.
I would make it a followup that removes uapi/linux/sysctl.h. I don't
see anything in it that isn't about the sysctl system call. I will keep
it a separate patch as I can imagine something silly that needs the
header file to compile. A separate patch would make a revert easier
if we find something like that.
Eric