]> Git Repo - linux.git/commit
Merge branch 'net-constify-ctl_table-arguments-of-utility-functions'
authorJakub Kicinski <[email protected]>
Wed, 29 May 2024 02:49:51 +0000 (19:49 -0700)
committerJakub Kicinski <[email protected]>
Wed, 29 May 2024 02:49:51 +0000 (19:49 -0700)
commit93bda33046e7ad8ec96645b63432fdb789fefce6
tree0d9ce3dd23dfb6e863bd03e5d91568d94266cfa7
parent982300c115d229565d7af8e8b38aa1ee7bb1f5bd
parent0a9f788fdde4af08547455fcdc21e21b822218f2
Merge branch 'net-constify-ctl_table-arguments-of-utility-functions'

Thomas Weißschuh says:

====================
net: constify ctl_table arguments of utility functions

The sysctl core is preparing to only expose instances of
struct ctl_table as "const".
This will also affect the ctl_table argument of sysctl handlers.

As the function prototype of all sysctl handlers throughout the tree
needs to stay consistent that change will be done in one commit.

To reduce the size of that final commit, switch utility functions which
are not bound by "typedef proc_handler" to "const struct ctl_table".

No functional change.

This patch(set) is meant to be applied through your subsystem tree.
Or at your preference through the sysctl tree.

Motivation
==========

Moving structures containing function pointers into unmodifiable .rodata
prevents attackers or bugs from corrupting and diverting those pointers.

Also the "struct ctl_table" exposed by the sysctl core were never meant
to be mutated by users.

For this goal changes to both the sysctl core and "const" qualifiers for
various sysctl APIs are necessary.
====================

Link: https://lore.kernel.org/r/20240527-sysctl-const-handler-net-v1-0-16523767d0b2@weissschuh.net
Signed-off-by: Jakub Kicinski <[email protected]>
This page took 0.046461 seconds and 4 git commands to generate.