Re: [PATCH] security: keys: Make sysctl table const

From: Jarkko Sakkinen
Date: Fri Feb 28 2025 - 21:00:10 EST


On Wed, Feb 26, 2025 at 07:21:39PM -0500, Paul Moore wrote:
> On Thu, Jan 23, 2025 at 2:50 PM Ricardo B. Marliere
> <ricardo@xxxxxxxxxxxx> 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 key_sysctls to be declared at build time, instead
> > of having to be dynamically allocated at boot time.
> >
> > Cc: Thomas Weißschuh <linux@xxxxxxxxxxxxxx>
> > Suggested-by: Thomas Weißschuh <linux@xxxxxxxxxxxxxx>
> > Signed-off-by: Ricardo B. Marliere <rbm@xxxxxxxx>
> > ---
> > security/keys/sysctl.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Looks fine to me. David or Jarkko, this looks like something for the
> keys tree, yes?
>
> Reviewed-by: Paul Moore <paul@xxxxxxxxxxxxxx>

I can pick this after back from holiday on next week.

Reviewed-by: Jarkko Sakkinen <jarkko@xxxxxxxxxx>

BR, Jarkko