[PATCH v2] macintosh: declare ctl_table as const
    Madhavan Srinivasan 
    maddy at linux.ibm.com
       
    Wed Jan  1 20:08:31 AEDT 2025
    
    
  
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
    
    
More information about the Linuxppc-dev
mailing list