Re: [PATCH v2] macintosh: declare ctl_table as const
From: Madhavan Srinivasan <maddy@linux.ibm.com>
Date: 2025-01-01 09:08:45
Also in:
lkml
From: Madhavan Srinivasan <maddy@linux.ibm.com>
Date: 2025-01-01 09:08:45
Also in:
lkml
On Tue, 17 Dec 2024 21:55:41 -0500, Luis Felipe Hernandez wrote:
Since commit 7abc9b53bd51 ("sysctl: allow registration of const struct
ctl_table"), the sysctl registration API allows struct ctl_table variables
to be placed into read-only memory.
mac_hid_files is registered as a sysctl table and should be treated as
read-only. By declaring the mac_hid_files structure as const, we ensure
that it cannot be accidentally modified. This change improves safety.
[...]
Applied to powerpc/next.
[1/1] macintosh: declare ctl_table as const
https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?h=next&id=e834166822a3c9fb403411c898367df8dabf973c
Thanks