]> git.ipfire.org Git - thirdparty/linux.git/commit
sysctl: allow registration of const struct ctl_table
authorThomas Weißschuh <linux@weissschuh.net>
Mon, 5 Aug 2024 09:39:38 +0000 (11:39 +0200)
committerJoel Granados <joel.granados@kernel.org>
Wed, 9 Oct 2024 11:39:11 +0000 (13:39 +0200)
commit7abc9b53bd515d7953d1f4e069b062ec4b5ba9e7
tree82b8b185321a48d2d32ad9c08183e39e9a22c070
parent29e1095bb1ad149b5c417719338d9c81d58bf12b
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>
fs/proc/proc_sysctl.c
include/linux/sysctl.h