lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHC9VhQpkyqaJsxj9_d4d6Vpc+FVbSnH_HeAFAVEdj0trGCh1g@mail.gmail.com>
Date: Wed, 26 Feb 2025 19:21:39 -0500
From: Paul Moore <paul@...l-moore.com>
To: "Ricardo B. Marliere" <ricardo@...liere.net>, David Howells <dhowells@...hat.com>, 
	Jarkko Sakkinen <jarkko@...nel.org>
Cc: James Morris <jmorris@...ei.org>, "Serge E. Hallyn" <serge@...lyn.com>, keyrings@...r.kernel.org, 
	linux-security-module@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Thomas Weißschuh <linux@...ssschuh.net>, 
	"Ricardo B. Marliere" <rbm@...e.com>
Subject: Re: [PATCH] security: keys: Make sysctl table const

On Thu, Jan 23, 2025 at 2:50 PM Ricardo B. Marliere
<ricardo@...liere.net> 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@...ssschuh.net>
> Suggested-by: Thomas Weißschuh <linux@...ssschuh.net>
> Signed-off-by: Ricardo B. Marliere <rbm@...e.com>
> ---
>  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@...l-moore.com>

> diff --git a/security/keys/sysctl.c b/security/keys/sysctl.c
> index 91f000eef3ad82370250e5238d9c9c80757aab61..cde08c478f3272081304e6db34e36b64ce0d321a 100644
> --- a/security/keys/sysctl.c
> +++ b/security/keys/sysctl.c
> @@ -9,7 +9,7 @@
>  #include <linux/sysctl.h>
>  #include "internal.h"
>
> -static struct ctl_table key_sysctls[] = {
> +static const struct ctl_table key_sysctls[] = {
>         {
>                 .procname = "maxkeys",
>                 .data = &key_quota_maxkeys,
>
> ---
> base-commit: 714d87c90a766e6917f7d69f618b864d350f09d3
> change-id: 20250123-sysctl_const-pcmoore-fa14389b8329
>
> Best regards,
> --
> Ricardo B. Marliere <rbm@...e.com>

-- 
paul-moore.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ