sysctl: allow registration of const struct ctl_table

Putting structure, especially those containing function pointers,
into read-only memory makes the safer and easier to reason about.
Change the sysctl registration APIs to allow registration of
"const struct ctl_table".

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Kees Cook <keescook@chromium.org> # security/*
Signed-off-by: Joel Granados <joel.granados@kernel.org>
This commit is contained in:
Thomas Weißschuh 2024-08-05 11:39:38 +02:00 • committed by Joel Granados
commit 7abc9b53bd
2 changed files with 8 additions and 8 deletions