[PATCH 1/2] yama: Make sysctl table const

Kees Cook kees at kernel.org
Thu Jan 23 23:20:46 UTC 2025


On Thu, Jan 23, 2025 at 04:33:34PM -0300, Ricardo B. Marliere wrote:
> Since commit 7abc9b53bd51 ("sysctl: allow registration of const struct
> ctl_table"), the sysctl registration API allows for struct ctl_table to be
> in read-only memory. Move yama_sysctl_table to be declared at build time,
> instead of having to be dynamically allocated at boot time.
> 
> Cc: Thomas Weißschuh <linux at weissschuh.net>
> Suggested-by: Thomas Weißschuh <linux at weissschuh.net>
> Signed-off-by: Ricardo B. Marliere <rbm at suse.com>

Reviewed-by: Kees Cook <kees at kernel.org>

-- 
Kees Cook



More information about the Linux-security-module-archive mailing list