Re: [PATCH] sysctl: Delete the code of sys_sysctl

From: Kees Cook
Date: Tue Jun 09 2020 - 11:40:43 EST


On Tue, Jun 09, 2020 at 02:20:05PM +0800, Xiaoming Ni wrote:
> Since the commit 61a47c1ad3a4dc ("sysctl: Remove the sysctl system call"),
> sys_sysctl has lost its actual role: any input can only return an error.
>
> Delete the code and return -ENOSYS directly at the function entry
>
> Signed-off-by: Xiaoming Ni <nixiaoming@xxxxxxxxxx>

Looks right to me.

Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx>

Should this be taken a step further and just remove the syscall entirely
and update the per-arch tables with the ENOSYS hole?

-Kees

--
Kees Cook