summaryrefslogtreecommitdiff
path: root/include/linux/filter.h
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2024-05-18 17:58:47 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2024-05-24 18:44:32 +0300
commit2c1713a8f1c94033a6e00aae4693ab03e8a3b9f1 (patch)
treea532036e561cc47497039c481b72c69d848a9968 /include/linux/filter.h
parent99fa63d9ca60c4c1cc843fde205e4bc6e86b218f (diff)
downloadlinux-2c1713a8f1c94033a6e00aae4693ab03e8a3b9f1.tar.xz
bpf: constify member bpf_sysctl_kern:: Table
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, for which bpf_sysctl_kern::table is also used. 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 this utility type which is not bound by "typedef proc_handler" to "const struct ctl_table". No functional change. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Reviewed-by: Joel Granados <j.granados@samsung.com> Link: https://lore.kernel.org/bpf/20240518-sysctl-const-handler-bpf-v1-1-f0d7186743c1@weissschuh.net
Diffstat (limited to 'include/linux/filter.h')
-rw-r--r--include/linux/filter.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/filter.h b/include/linux/filter.h
index 0f12cf01070e..b02aea291b7e 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -1406,7 +1406,7 @@ struct bpf_sock_ops_kern {
struct bpf_sysctl_kern {
struct ctl_table_header *head;
- struct ctl_table *table;
+ const struct ctl_table *table;
void *cur_val;
size_t cur_len;
void *new_val;