Re: [PATCH v3 00/11] sysctl: treewide: constify ctl_table argument of sysctl handlers

2024-04-23 Thread Luis Chamberlain
On Tue, Apr 23, 2024 at 09:54:35AM +0200, Thomas Weißschuh wrote: > * Patch 1 is a bugfix for the stack_erasing sysctl handler > * Patches 2-10 change various helper functions throughout the kernel to > be able to handle 'const ctl_table'. > * Patch 11 changes the signatures of all proc handlers

[PATCH v3 01/11] stackleak: don't modify ctl_table argument

2024-04-23 Thread Thomas Weißschuh
In a future commit the proc_handlers will change to "const struct ctl_table". As a preparation for that adapt the logic to work with a temporary variable, similar to how it is done in other parts of the kernel. Fixes: 964c9dff0091 ("stackleak: Allow runtime disabling of kernel stack erasing")

[PATCH v3 04/11] utsname: constify ctl_table arguments of utility function

2024-04-23 Thread Thomas Weißschuh
In a future commit the proc_handlers themselves will change to "const struct ctl_table". As a preparation for that adapt the internal helper. Signed-off-by: Thomas Weißschuh --- kernel/utsname_sysctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/utsname_sysctl.c

[PATCH v3 00/11] sysctl: treewide: constify ctl_table argument of sysctl handlers

2024-04-23 Thread Thomas Weißschuh
* Patch 1 is a bugfix for the stack_erasing sysctl handler * Patches 2-10 change various helper functions throughout the kernel to be able to handle 'const ctl_table'. * Patch 11 changes the signatures of all proc handlers through the tree. Some other signatures are also adapted, for details

[PATCH v3 03/11] hugetlb: constify ctl_table arguments of utility functions

2024-04-23 Thread Thomas Weißschuh
In a future commit the proc_handlers themselves will change to "const struct ctl_table". As a preparation for that adapt the internal helpers. Signed-off-by: Thomas Weißschuh --- mm/hugetlb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c

[PATCH v3 02/11] cgroup: bpf: constify ctl_table arguments and fields

2024-04-23 Thread Thomas Weißschuh
In a future commit the sysctl core will only use "const struct ctl_table". As a preparation for that adapt the cgroup-bpf code. Signed-off-by: Thomas Weißschuh --- include/linux/filter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/filter.h

[PATCH v3 11/11] sysctl: treewide: constify the ctl_table argument of handlers

2024-04-23 Thread Thomas Weißschuh
Adapt the proc_hander function signature to make it clear that handlers are not supposed to modify their ctl_table argument. This is a prerequisite to moving the static ctl_table structs into .rodata. By migrating all handlers at once a lengthy transition can be avoided. The patch was mostly

[PATCH v3 10/11] sysctl: constify ctl_table arguments of utility function

2024-04-23 Thread Thomas Weißschuh
In a future commit the proc_handlers themselves will change to "const struct ctl_table". As a preparation for that adapt the internal helper. Signed-off-by: Thomas Weißschuh --- include/linux/sysctl.h | 2 +- kernel/sysctl.c| 21 +++-- 2 files changed, 12 insertions(+),

[PATCH v3 07/11] ipv6/addrconf: constify ctl_table arguments of utility functions

2024-04-23 Thread Thomas Weißschuh
In a future commit the proc_handlers themselves will change to "const struct ctl_table". As a preparation for that adapt the internal helpers. Signed-off-by: Thomas Weißschuh --- net/ipv6/addrconf.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/ipv6/addrconf.c

[PATCH v3 08/11] ipv6/ndisc: constify ctl_table arguments of utility function

2024-04-23 Thread Thomas Weißschuh
In a future commit the proc_handlers themselves will change to "const struct ctl_table". As a preparation for that adapt the internal helper. Signed-off-by: Thomas Weißschuh --- net/ipv6/ndisc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/ndisc.c

[PATCH v3 09/11] ipvs: constify ctl_table arguments of utility functions

2024-04-23 Thread Thomas Weißschuh
In a future commit the proc_handlers themselves will change to "const struct ctl_table". As a preparation for that adapt the internal helpers. Signed-off-by: Thomas Weißschuh --- net/netfilter/ipvs/ip_vs_ctl.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git

[PATCH v3 06/11] ipv4/sysctl: constify ctl_table arguments of utility functions

2024-04-23 Thread Thomas Weißschuh
In a future commit the proc_handlers themselves will change to "const struct ctl_table". As a preparation for that adapt the internal helpers. Signed-off-by: Thomas Weißschuh --- net/ipv4/sysctl_net_ipv4.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[PATCH v3 05/11] neighbour: constify ctl_table arguments of utility function

2024-04-23 Thread Thomas Weißschuh
In a future commit the proc_handlers themselves will change to "const struct ctl_table". As a preparation for that adapt the internal helper. Signed-off-by: Thomas Weißschuh --- net/core/neighbour.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/neighbour.c