History

sysctl: treewide: constify the ctl_table argument of proc_handlers

const qualify the struct ctl_table argument in the proc_handler function signatures. This is a prerequisite to moving the static ctl_table structs into .rodata data which will ensure that proc_handler function pointers cannot be modified. This patch has been generated by the following coccinelle script: ``` virtual patch @r1@ identifier ctl, write, buffer, lenp, ppos; identifier func !~ "appldata_(timer|interval)_handler|sched_(rt|rr)_handler|rds_tcp_skbuf_handler|proc_sctp_do_(hmac_alg|rto_min|rto_max|udp_port|alpha_beta|auth|probe_interval)"; @@ int func( - struct ctl_table *ctl + const struct ctl_table *ctl ,int write, void *buffer, size_t *lenp, loff_t *ppos); @r2@ identifier func, ctl, write, buffer, lenp, ppos; @@ int func( - struct ctl_table *ctl + const struct ctl_table *ctl ,int write, void *buffer, size_t *lenp, loff_t *ppos) { ... } @r3@ identifier func; @@ int func( - struct ctl_table * + const struct ctl_table * ,int , void *, size_t *, loff_t *); @r4@ identifier func, ctl; @@ int func( - struct ctl_table *ctl + const struct ctl_table *ctl ,int , void *, size_t *, loff_t *); @r5@ identifier func, write, buffer, lenp, ppos; @@ int func( - struct ctl_table * + const struct ctl_table * ,int write, void *buffer, size_t *lenp, loff_t *ppos); ``` * Code formatting was adjusted in xfs_sysctl.c to comply with code conventions. The xfs_stats_clear_proc_handler, xfs_panic_mask_proc_handler and xfs_deprecated_dointvec_minmax where adjusted. * The ctl_table argument in proc_watchdog_common was const qualified. This is called from a proc_handler itself and is calling back into another proc_handler, making it necessary to change it as part of the proc_handler migration.

Joel Granados committed 2 years ago

Commit 78eb4ea1 parent 7a3fad393 files · +258 −258Browse files

Unified · Split

93 files
  1. arch/arm64/kernel/armv8_deprecated.c +1 −1
  2. arch/arm64/kernel/fpsimd.c +1 −1
  3. arch/s390/appldata/appldata_base.c +5 −5
  4. arch/s390/kernel/debug.c +1 −1
  5. arch/s390/kernel/topology.c +1 −1
  6. arch/s390/mm/cmm.c +3 −3
  7. arch/x86/kernel/itmt.c +1 −1
  8. drivers/cdrom/cdrom.c +2 −2
  9. drivers/char/random.c +2 −2
  10. drivers/macintosh/mac_hid.c +1 −1
  11. drivers/net/vrf.c +1 −1
  12. drivers/parport/procfs.c +6 −6
  13. drivers/perf/arm_pmuv3.c +1 −1
  14. drivers/perf/riscv_pmu_sbi.c +1 −1
  15. fs/coredump.c +1 −1
  16. fs/dcache.c +1 −1
  17. fs/drop_caches.c +1 −1
  18. fs/exec.c +1 −1
  19. fs/file_table.c +1 −1
  20. fs/fs-writeback.c +1 −1
  21. fs/inode.c +1 −1
  22. fs/pipe.c +1 −1
  23. fs/quota/dquot.c +1 −1
  24. fs/xfs/xfs_sysctl.c +3 −3
  25. include/linux/ftrace.h +2 −2
  26. include/linux/mm.h +4 −4
  27. include/linux/perf_event.h +3 −3
  28. include/linux/security.h +1 −1
  29. include/linux/sysctl.h +17 −17
  30. include/linux/vmstat.h +2 −2
  31. include/linux/writeback.h +1 −1
  32. include/net/ndisc.h +1 −1
  33. include/net/neighbour.h +3 −3
  34. include/net/netfilter/nf_hooks_lwtunnel.h +1 −1
  35. ipc/ipc_sysctl.c +3 −3
  36. kernel/bpf/syscall.c +2 −2
  37. kernel/delayacct.c +1 −1
  38. kernel/events/callchain.c +1 −1
  39. kernel/events/core.c +2 −2
  40. kernel/fork.c +1 −1
  41. kernel/hung_task.c +1 −1
  42. kernel/kexec_core.c +1 −1
  43. kernel/kprobes.c +1 −1
  44. kernel/latencytop.c +1 −1
  45. kernel/pid_namespace.c +1 −1
  46. kernel/pid_sysctl.h +1 −1
  47. kernel/printk/internal.h +1 −1
  48. kernel/printk/printk.c +1 −1
  49. kernel/printk/sysctl.c +1 −1
  50. kernel/sched/core.c +3 −3
  51. kernel/sched/rt.c +4 −4
  52. kernel/sched/topology.c +1 −1
  53. kernel/seccomp.c +1 −1
  54. kernel/stackleak.c +1 −1
  55. kernel/sysctl.c +32 −32
  56. kernel/time/timer.c +1 −1
  57. kernel/trace/ftrace.c +1 −1
  58. kernel/trace/trace.c +1 −1
  59. kernel/trace/trace_events_user.c +1 −1
  60. kernel/trace/trace_stack.c +1 −1
  61. kernel/umh.c +1 −1
  62. kernel/utsname_sysctl.c +1 −1
  63. kernel/watchdog.c +6 −6
  64. mm/compaction.c +3 −3
  65. mm/hugetlb.c +3 −3
  66. mm/page-writeback.c +5 −5
  67. mm/page_alloc.c +7 −7
  68. mm/util.c +3 −3
  69. mm/vmstat.c +2 −2
  70. net/bridge/br_netfilter_hooks.c +1 −1
  71. net/core/neighbour.c +9 −9
  72. net/core/sysctl_net_core.c +10 −10
  73. net/ipv4/devinet.c +3 −3
  74. net/ipv4/route.c +1 −1
  75. net/ipv4/sysctl_net_ipv4.c +15 −15
  76. net/ipv6/addrconf.c +8 −8
  77. net/ipv6/ndisc.c +1 −1
  78. net/ipv6/route.c +1 −1
  79. net/ipv6/sysctl_net_ipv6.c +2 −2
  80. net/mpls/af_mpls.c +2 −2
  81. net/mptcp/ctrl.c +2 −2
  82. net/netfilter/ipvs/ip_vs_ctl.c +6 −6
  83. net/netfilter/nf_conntrack_standalone.c +1 −1
  84. net/netfilter/nf_hooks_lwtunnel.c +1 −1
  85. net/netfilter/nf_log.c +1 −1
  86. net/phonet/sysctl.c +1 −1
  87. net/rds/tcp.c +2 −2
  88. net/sctp/sysctl.c +14 −14
  89. net/sunrpc/sysctl.c +2 −2
  90. net/sunrpc/xprtrdma/svc_rdma.c +1 −1
  91. security/apparmor/lsm.c +1 −1
  92. security/min_addr.c +1 −1
  93. security/yama/yama_lsm.c +1 −1
arch/arm64/kernel/armv8_deprecated.c+1−1
@@ -507,7 +507,7 @@ static int update_insn_emulation_mode(struct insn_emulation *insn, · 506 unmodified lines
507507 return ret;
508508 }
509509
510−static int emulation_proc_handler(struct ctl_table *table, int write,
510+static int emulation_proc_handler(const struct ctl_table *table, int write,
511511 void *buffer, size_t *lenp,
512512 loff_t *ppos)
513513 {
arch/arm64/kernel/fpsimd.c+1−1
@@ -535,7 +535,7 @@ static unsigned int find_supported_vector_length(enum vec_type type, · 534 unmodified lines
535535
536536 #if defined(CONFIG_ARM64_SVE) && defined(CONFIG_SYSCTL)
537537
538−static int vec_proc_do_default_vl(struct ctl_table *table, int write,
538+static int vec_proc_do_default_vl(const struct ctl_table *table, int write,
539539 void *buffer, size_t *lenp, loff_t *ppos)
540540 {
541541 struct vl_info *info = table->extra1;
arch/s390/appldata/appldata_base.c+5−5
@@ -46,9 +46,9 @@ · 45 unmodified lines
4646 * /proc entries (sysctl)
4747 */
4848 static const char appldata_proc_name[APPLDATA_PROC_NAME_LENGTH] = "appldata";
49−static int appldata_timer_handler(struct ctl_table *ctl, int write,
49+static int appldata_timer_handler(const struct ctl_table *ctl, int write,
5050 void *buffer, size_t *lenp, loff_t *ppos);
51−static int appldata_interval_handler(struct ctl_table *ctl, int write,
51+static int appldata_interval_handler(const struct ctl_table *ctl, int write,
5252 void *buffer, size_t *lenp, loff_t *ppos);
5353
5454 static struct ctl_table_header *appldata_sysctl_header;
@@ -199,7 +199,7 @@ static void __appldata_vtimer_setup(int cmd) · 144 unmodified lines
199199 * Start/Stop timer, show status of timer (0 = not active, 1 = active)
200200 */
201201 static int
202−appldata_timer_handler(struct ctl_table *ctl, int write,
202+appldata_timer_handler(const struct ctl_table *ctl, int write,
203203 void *buffer, size_t *lenp, loff_t *ppos)
204204 {
205205 int timer_active = appldata_timer_active;
@@ -232,7 +232,7 @@ appldata_timer_handler(struct ctl_table *ctl, int write, · 26 unmodified lines
232232 * current timer interval.
233233 */
234234 static int
235−appldata_interval_handler(struct ctl_table *ctl, int write,
235+appldata_interval_handler(const struct ctl_table *ctl, int write,
236236 void *buffer, size_t *lenp, loff_t *ppos)
237237 {
238238 int interval = appldata_interval;
@@ -262,7 +262,7 @@ appldata_interval_handler(struct ctl_table *ctl, int write, · 23 unmodified lines
262262 * monitoring (0 = not in process, 1 = in process)
263263 */
264264 static int
265−appldata_generic_handler(struct ctl_table *ctl, int write,
265+appldata_generic_handler(const struct ctl_table *ctl, int write,
266266 void *buffer, size_t *lenp, loff_t *ppos)
267267 {
268268 struct appldata_ops *ops = NULL, *tmp_ops;
arch/s390/kernel/debug.c+1−1
@@ -954,7 +954,7 @@ static int debug_active = 1; · 953 unmodified lines
954954 * always allow read, allow write only if debug_stoppable is set or
955955 * if debug_active is already off
956956 */
957−static int s390dbf_procactive(struct ctl_table *table, int write,
957+static int s390dbf_procactive(const struct ctl_table *table, int write,
958958 void *buffer, size_t *lenp, loff_t *ppos)
959959 {
960960 if (!write || debug_stoppable || !debug_active)
arch/s390/kernel/topology.c+1−1
@@ -594,7 +594,7 @@ static int __init topology_setup(char *str) · 593 unmodified lines
594594 }
595595 early_param("topology", topology_setup);
596596
597−static int topology_ctl_handler(struct ctl_table *ctl, int write,
597+static int topology_ctl_handler(const struct ctl_table *ctl, int write,
598598 void *buffer, size_t *lenp, loff_t *ppos)
599599 {
600600 int enabled = topology_is_enabled();
arch/s390/mm/cmm.c+3−3
@@ -243,7 +243,7 @@ static int cmm_skip_blanks(char *cp, char **endp) · 242 unmodified lines
243243 return str != cp;
244244 }
245245
246−static int cmm_pages_handler(struct ctl_table *ctl, int write,
246+static int cmm_pages_handler(const struct ctl_table *ctl, int write,
247247 void *buffer, size_t *lenp, loff_t *ppos)
248248 {
249249 long nr = cmm_get_pages();
@@ -262,7 +262,7 @@ static int cmm_pages_handler(struct ctl_table *ctl, int write, · 12 unmodified lines
262262 return 0;
263263 }
264264
265−static int cmm_timed_pages_handler(struct ctl_table *ctl, int write,
265+static int cmm_timed_pages_handler(const struct ctl_table *ctl, int write,
266266 void *buffer, size_t *lenp,
267267 loff_t *ppos)
268268 {
@@ -282,7 +282,7 @@ static int cmm_timed_pages_handler(struct ctl_table *ctl, int write, · 13 unmodified lines
282282 return 0;
283283 }
284284
285−static int cmm_timeout_handler(struct ctl_table *ctl, int write,
285+static int cmm_timeout_handler(const struct ctl_table *ctl, int write,
286286 void *buffer, size_t *lenp, loff_t *ppos)
287287 {
288288 char buf[64], *p;
arch/x86/kernel/itmt.c+1−1
@@ -38,7 +38,7 @@ static bool __read_mostly sched_itmt_capable; · 37 unmodified lines
3838 */
3939 unsigned int __read_mostly sysctl_sched_itmt_enabled;
4040
41−static int sched_itmt_update_handler(struct ctl_table *table, int write,
41+static int sched_itmt_update_handler(const struct ctl_table *table, int write,
4242 void *buffer, size_t *lenp, loff_t *ppos)
4343 {
4444 unsigned int old_sysctl;
drivers/cdrom/cdrom.c+2−2
@@ -3473,7 +3473,7 @@ static int cdrom_print_info(const char *header, int val, char *info, · 3472 unmodified lines
34733473 return 0;
34743474 }
34753475
3476−static int cdrom_sysctl_info(struct ctl_table *ctl, int write,
3476+static int cdrom_sysctl_info(const struct ctl_table *ctl, int write,
34773477 void *buffer, size_t *lenp, loff_t *ppos)
34783478 {
34793479 int pos;
@@ -3586,7 +3586,7 @@ static void cdrom_update_settings(void) · 106 unmodified lines
35863586 mutex_unlock(&cdrom_mutex);
35873587 }
35883588
3589−static int cdrom_sysctl_handler(struct ctl_table *ctl, int write,
3589+static int cdrom_sysctl_handler(const struct ctl_table *ctl, int write,
35903590 void *buffer, size_t *lenp, loff_t *ppos)
35913591 {
35923592 int ret;
drivers/char/random.c+2−2
@@ -1620,7 +1620,7 @@ static u8 sysctl_bootid[UUID_SIZE]; · 1619 unmodified lines
16201620 * UUID. The difference is in whether table->data is NULL; if it is,
16211621 * then a new UUID is generated and returned to the user.
16221622 */
1623−static int proc_do_uuid(struct ctl_table *table, int write, void *buf,
1623+static int proc_do_uuid(const struct ctl_table *table, int write, void *buf,
16241624 size_t *lenp, loff_t *ppos)
16251625 {
16261626 u8 tmp_uuid[UUID_SIZE], *uuid;
@@ -1651,7 +1651,7 @@ static int proc_do_uuid(struct ctl_table *table, int write, void *buf, · 24 unmodified lines
16511651 }
16521652
16531653 /* The same as proc_dointvec, but writes don't change anything. */
1654−static int proc_do_rointvec(struct ctl_table *table, int write, void *buf,
1654+static int proc_do_rointvec(const struct ctl_table *table, int write, void *buf,
16551655 size_t *lenp, loff_t *ppos)
16561656 {
16571657 return write ? 0 : proc_dointvec(table, 0, buf, lenp, ppos);
drivers/macintosh/mac_hid.c+1−1
@@ -183,7 +183,7 @@ static void mac_hid_stop_emulation(void) · 182 unmodified lines
183183 mac_hid_destroy_emumouse();
184184 }
185185
186−static int mac_hid_toggle_emumouse(struct ctl_table *table, int write,
186+static int mac_hid_toggle_emumouse(const struct ctl_table *table, int write,
187187 void *buffer, size_t *lenp, loff_t *ppos)
188188 {
189189 int *valp = table->data;
drivers/net/vrf.c+1−1
@@ -1886,7 +1886,7 @@ unlock: · 1885 unmodified lines
18861886 return res;
18871887 }
18881888
1889−static int vrf_shared_table_handler(struct ctl_table *table, int write,
1889+static int vrf_shared_table_handler(const struct ctl_table *table, int write,
18901890 void *buffer, size_t *lenp, loff_t *ppos)
18911891 {
18921892 struct net *net = (struct net *)table->extra1;
drivers/parport/procfs.c+6−6
@@ -33,7 +33,7 @@ · 32 unmodified lines
3333 #define PARPORT_MIN_SPINTIME_VALUE 1
3434 #define PARPORT_MAX_SPINTIME_VALUE 1000
3535
36−static int do_active_device(struct ctl_table *table, int write,
36+static int do_active_device(const struct ctl_table *table, int write,
3737 void *result, size_t *lenp, loff_t *ppos)
3838 {
3939 struct parport *port = (struct parport *)table->extra1;
@@ -70,7 +70,7 @@ static int do_active_device(struct ctl_table *table, int write, · 30 unmodified lines
7070 }
7171
7272 #ifdef CONFIG_PARPORT_1284
73−static int do_autoprobe(struct ctl_table *table, int write,
73+static int do_autoprobe(const struct ctl_table *table, int write,
7474 void *result, size_t *lenp, loff_t *ppos)
7575 {
7676 struct parport_device_info *info = table->extra2;
@@ -113,7 +113,7 @@ static int do_autoprobe(struct ctl_table *table, int write, · 36 unmodified lines
113113 }
114114 #endif /* IEEE1284.3 support. */
115115
116−static int do_hardware_base_addr(struct ctl_table *table, int write,
116+static int do_hardware_base_addr(const struct ctl_table *table, int write,
117117 void *result, size_t *lenp, loff_t *ppos)
118118 {
119119 struct parport *port = (struct parport *)table->extra1;
@@ -140,7 +140,7 @@ static int do_hardware_base_addr(struct ctl_table *table, int write, · 20 unmodified lines
140140 return 0;
141141 }
142142
143−static int do_hardware_irq(struct ctl_table *table, int write,
143+static int do_hardware_irq(const struct ctl_table *table, int write,
144144 void *result, size_t *lenp, loff_t *ppos)
145145 {
146146 struct parport *port = (struct parport *)table->extra1;
@@ -167,7 +167,7 @@ static int do_hardware_irq(struct ctl_table *table, int write, · 20 unmodified lines
167167 return 0;
168168 }
169169
170−static int do_hardware_dma(struct ctl_table *table, int write,
170+static int do_hardware_dma(const struct ctl_table *table, int write,
171171 void *result, size_t *lenp, loff_t *ppos)
172172 {
173173 struct parport *port = (struct parport *)table->extra1;
@@ -194,7 +194,7 @@ static int do_hardware_dma(struct ctl_table *table, int write, · 20 unmodified lines
194194 return 0;
195195 }
196196
197−static int do_hardware_modes(struct ctl_table *table, int write,
197+static int do_hardware_modes(const struct ctl_table *table, int write,
198198 void *result, size_t *lenp, loff_t *ppos)
199199 {
200200 struct parport *port = (struct parport *)table->extra1;
drivers/perf/arm_pmuv3.c+1−1
@@ -1257,7 +1257,7 @@ static void armv8pmu_disable_user_access_ipi(void *unused) · 1256 unmodified lines
12571257 armv8pmu_disable_user_access();
12581258 }
12591259
1260−static int armv8pmu_proc_user_access_handler(struct ctl_table *table, int write,
1260+static int armv8pmu_proc_user_access_handler(const struct ctl_table *table, int write,
12611261 void *buffer, size_t *lenp, loff_t *ppos)
12621262 {
12631263 int ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
drivers/perf/riscv_pmu_sbi.c+1−1
@@ -1277,7 +1277,7 @@ static void riscv_pmu_update_counter_access(void *info) · 1276 unmodified lines
12771277 csr_write(CSR_SCOUNTEREN, 0x2);
12781278 }
12791279
1280−static int riscv_pmu_proc_user_access_handler(struct ctl_table *table,
1280+static int riscv_pmu_proc_user_access_handler(const struct ctl_table *table,
12811281 int write, void *buffer,
12821282 size_t *lenp, loff_t *ppos)
12831283 {
fs/coredump.c+1−1
@@ -991,7 +991,7 @@ void validate_coredump_safety(void) · 990 unmodified lines
991991 }
992992 }
993993
994−static int proc_dostring_coredump(struct ctl_table *table, int write,
994+static int proc_dostring_coredump(const struct ctl_table *table, int write,
995995 void *buffer, size_t *lenp, loff_t *ppos)
996996 {
997997 int error = proc_dostring(table, write, buffer, lenp, ppos);
fs/dcache.c+1−1
@@ -177,7 +177,7 @@ static long get_nr_dentry_negative(void) · 176 unmodified lines
177177 return sum < 0 ? 0 : sum;
178178 }
179179
180−static int proc_nr_dentry(struct ctl_table *table, int write, void *buffer,
180+static int proc_nr_dentry(const struct ctl_table *table, int write, void *buffer,
181181 size_t *lenp, loff_t *ppos)
182182 {
183183 dentry_stat.nr_dentry = get_nr_dentry();
fs/drop_caches.c+1−1
@@ -48,7 +48,7 @@ static void drop_pagecache_sb(struct super_block *sb, void *unused) · 47 unmodified lines
4848 iput(toput_inode);
4949 }
5050
51−int drop_caches_sysctl_handler(struct ctl_table *table, int write,
51+int drop_caches_sysctl_handler(const struct ctl_table *table, int write,
5252 void *buffer, size_t *length, loff_t *ppos)
5353 {
5454 int ret;
fs/exec.c+1−1
@@ -2204,7 +2204,7 @@ COMPAT_SYSCALL_DEFINE5(execveat, int, fd, · 2203 unmodified lines
22042204
22052205 #ifdef CONFIG_SYSCTL
22062206
2207−static int proc_dointvec_minmax_coredump(struct ctl_table *table, int write,
2207+static int proc_dointvec_minmax_coredump(const struct ctl_table *table, int write,
22082208 void *buffer, size_t *lenp, loff_t *ppos)
22092209 {
22102210 int error = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
fs/file_table.c+1−1
@@ -96,7 +96,7 @@ EXPORT_SYMBOL_GPL(get_max_files); · 95 unmodified lines
9696 /*
9797 * Handle nr_files sysctl
9898 */
99−static int proc_nr_files(struct ctl_table *table, int write, void *buffer,
99+static int proc_nr_files(const struct ctl_table *table, int write, void *buffer,
100100 size_t *lenp, loff_t *ppos)
101101 {
102102 files_stat.nr_files = get_nr_files();
fs/fs-writeback.c+1−1
@@ -2413,7 +2413,7 @@ static int __init start_dirtytime_writeback(void) · 2412 unmodified lines
24132413 }
24142414 __initcall(start_dirtytime_writeback);
24152415
2416−int dirtytime_interval_handler(struct ctl_table *table, int write,
2416+int dirtytime_interval_handler(const struct ctl_table *table, int write,
24172417 void *buffer, size_t *lenp, loff_t *ppos)
24182418 {
24192419 int ret;
fs/inode.c+1−1
@@ -107,7 +107,7 @@ long get_nr_dirty_inodes(void) · 106 unmodified lines
107107 */
108108 static struct inodes_stat_t inodes_stat;
109109
110−static int proc_nr_inodes(struct ctl_table *table, int write, void *buffer,
110+static int proc_nr_inodes(const struct ctl_table *table, int write, void *buffer,
111111 size_t *lenp, loff_t *ppos)
112112 {
113113 inodes_stat.nr_inodes = get_nr_inodes();
fs/pipe.c+1−1
@@ -1469,7 +1469,7 @@ static int do_proc_dopipe_max_size_conv(unsigned long *lvalp, · 1468 unmodified lines
14691469 return 0;
14701470 }
14711471
1472−static int proc_dopipe_max_size(struct ctl_table *table, int write,
1472+static int proc_dopipe_max_size(const struct ctl_table *table, int write,
14731473 void *buffer, size_t *lenp, loff_t *ppos)
14741474 {
14751475 return do_proc_douintvec(table, write, buffer, lenp, ppos,
fs/quota/dquot.c+1−1
@@ -2913,7 +2913,7 @@ const struct quotactl_ops dquot_quotactl_sysfile_ops = { · 2912 unmodified lines
29132913 };
29142914 EXPORT_SYMBOL(dquot_quotactl_sysfile_ops);
29152915
2916−static int do_proc_dqstats(struct ctl_table *table, int write,
2916+static int do_proc_dqstats(const struct ctl_table *table, int write,
29172917 void *buffer, size_t *lenp, loff_t *ppos)
29182918 {
29192919 unsigned int type = (unsigned long *)table->data - dqstats.stat;
fs/xfs/xfs_sysctl.c+3−3
@@ -11,7 +11,7 @@ static struct ctl_table_header *xfs_table_header; · 10 unmodified lines
1111 #ifdef CONFIG_PROC_FS
1212 STATIC int
1313 xfs_stats_clear_proc_handler(
14− struct ctl_table *ctl,
14+ const struct ctl_table *ctl,
1515 int write,
1616 void *buffer,
1717 size_t *lenp,
@@ -31,7 +31,7 @@ xfs_stats_clear_proc_handler( · 13 unmodified lines
3131
3232 STATIC int
3333 xfs_panic_mask_proc_handler(
34− struct ctl_table *ctl,
34+ const struct ctl_table *ctl,
3535 int write,
3636 void *buffer,
3737 size_t *lenp,
@@ -52,7 +52,7 @@ xfs_panic_mask_proc_handler( · 14 unmodified lines
5252
5353 STATIC int
5454 xfs_deprecated_dointvec_minmax(
55− struct ctl_table *ctl,
55+ const struct ctl_table *ctl,
5656 int write,
5757 void *buffer,
5858 size_t *lenp,
include/linux/ftrace.h+2−2
@@ -471,7 +471,7 @@ static inline void arch_ftrace_set_direct_caller(struct ftrace_regs *fregs, · 470 unmodified lines
471471
472472 extern int stack_tracer_enabled;
473473
474−int stack_trace_sysctl(struct ctl_table *table, int write, void *buffer,
474+int stack_trace_sysctl(const struct ctl_table *table, int write, void *buffer,
475475 size_t *lenp, loff_t *ppos);
476476
477477 /* DO NOT MODIFY THIS VARIABLE DIRECTLY! */
@@ -1175,7 +1175,7 @@ extern int tracepoint_printk; · 697 unmodified lines
11751175 extern void disable_trace_on_warning(void);
11761176 extern int __disable_trace_on_warning;
11771177
1178−int tracepoint_printk_sysctl(struct ctl_table *table, int write,
1178+int tracepoint_printk_sysctl(const struct ctl_table *table, int write,
11791179 void *buffer, size_t *lenp, loff_t *ppos);
11801180
11811181 #else /* CONFIG_TRACING */
include/linux/mm.h+4−4
@@ -204,11 +204,11 @@ extern int sysctl_overcommit_memory; · 203 unmodified lines
204204 extern int sysctl_overcommit_ratio;
205205 extern unsigned long sysctl_overcommit_kbytes;
206206
207−int overcommit_ratio_handler(struct ctl_table *, int, void *, size_t *,
207+int overcommit_ratio_handler(const struct ctl_table *, int, void *, size_t *,
208208 loff_t *);
209−int overcommit_kbytes_handler(struct ctl_table *, int, void *, size_t *,
209+int overcommit_kbytes_handler(const struct ctl_table *, int, void *, size_t *,
210210 loff_t *);
211−int overcommit_policy_handler(struct ctl_table *, int, void *, size_t *,
211+int overcommit_policy_handler(const struct ctl_table *, int, void *, size_t *,
212212 loff_t *);
213213
214214 #if defined(CONFIG_SPARSEMEM) && !defined(CONFIG_SPARSEMEM_VMEMMAP)
@@ -3854,7 +3854,7 @@ extern bool process_shares_mm(struct task_struct *p, struct mm_struct *mm); · 3639 unmodified lines
38543854
38553855 #ifdef CONFIG_SYSCTL
38563856 extern int sysctl_drop_caches;
3857−int drop_caches_sysctl_handler(struct ctl_table *, int, void *, size_t *,
3857+int drop_caches_sysctl_handler(const struct ctl_table *, int, void *, size_t *,
38583858 loff_t *);
38593859 #endif
38603860
include/linux/perf_event.h+3−3
@@ -1582,11 +1582,11 @@ extern int sysctl_perf_cpu_time_max_percent; · 1581 unmodified lines
15821582
15831583 extern void perf_sample_event_took(u64 sample_len_ns);
15841584
1585−int perf_event_max_sample_rate_handler(struct ctl_table *table, int write,
1585+int perf_event_max_sample_rate_handler(const struct ctl_table *table, int write,
15861586 void *buffer, size_t *lenp, loff_t *ppos);
1587−int perf_cpu_time_max_percent_handler(struct ctl_table *table, int write,
1587+int perf_cpu_time_max_percent_handler(const struct ctl_table *table, int write,
15881588 void *buffer, size_t *lenp, loff_t *ppos);
1589−int perf_event_max_stack_handler(struct ctl_table *table, int write,
1589+int perf_event_max_stack_handler(const struct ctl_table *table, int write,
15901590 void *buffer, size_t *lenp, loff_t *ppos);
15911591
15921592 /* Access to perf_event_open(2) syscall. */
include/linux/security.h+1−1
@@ -228,7 +228,7 @@ struct request_sock; · 227 unmodified lines
228228 #define LSM_UNSAFE_NO_NEW_PRIVS 4
229229
230230 #ifdef CONFIG_MMU
231−extern int mmap_min_addr_handler(struct ctl_table *table, int write,
231+extern int mmap_min_addr_handler(const struct ctl_table *table, int write,
232232 void *buffer, size_t *lenp, loff_t *ppos);
233233 #endif
234234
include/linux/sysctl.h+17−17
@@ -61,31 +61,31 @@ extern const int sysctl_vals[]; · 60 unmodified lines
6161
6262 extern const unsigned long sysctl_long_vals[];
6363
64−typedef int proc_handler(struct ctl_table *ctl, int write, void *buffer,
64+typedef int proc_handler(const struct ctl_table *ctl, int write, void *buffer,
6565 size_t *lenp, loff_t *ppos);
6666
67−int proc_dostring(struct ctl_table *, int, void *, size_t *, loff_t *);
68−int proc_dobool(struct ctl_table *table, int write, void *buffer,
67+int proc_dostring(const struct ctl_table *, int, void *, size_t *, loff_t *);
68+int proc_dobool(const struct ctl_table *table, int write, void *buffer,
6969 size_t *lenp, loff_t *ppos);
70−int proc_dointvec(struct ctl_table *, int, void *, size_t *, loff_t *);
71−int proc_douintvec(struct ctl_table *, int, void *, size_t *, loff_t *);
72−int proc_dointvec_minmax(struct ctl_table *, int, void *, size_t *, loff_t *);
73−int proc_douintvec_minmax(struct ctl_table *table, int write, void *buffer,
70+int proc_dointvec(const struct ctl_table *, int, void *, size_t *, loff_t *);
71+int proc_douintvec(const struct ctl_table *, int, void *, size_t *, loff_t *);
72+int proc_dointvec_minmax(const struct ctl_table *, int, void *, size_t *, loff_t *);
73+int proc_douintvec_minmax(const struct ctl_table *table, int write, void *buffer,
7474 size_t *lenp, loff_t *ppos);
75−int proc_dou8vec_minmax(struct ctl_table *table, int write, void *buffer,
75+int proc_dou8vec_minmax(const struct ctl_table *table, int write, void *buffer,
7676 size_t *lenp, loff_t *ppos);
77−int proc_dointvec_jiffies(struct ctl_table *, int, void *, size_t *, loff_t *);
78−int proc_dointvec_ms_jiffies_minmax(struct ctl_table *table, int write,
77+int proc_dointvec_jiffies(const struct ctl_table *, int, void *, size_t *, loff_t *);
78+int proc_dointvec_ms_jiffies_minmax(const struct ctl_table *table, int write,
7979 void *buffer, size_t *lenp, loff_t *ppos);
80−int proc_dointvec_userhz_jiffies(struct ctl_table *, int, void *, size_t *,
80+int proc_dointvec_userhz_jiffies(const struct ctl_table *, int, void *, size_t *,
8181 loff_t *);
82−int proc_dointvec_ms_jiffies(struct ctl_table *, int, void *, size_t *,
82+int proc_dointvec_ms_jiffies(const struct ctl_table *, int, void *, size_t *,
8383 loff_t *);
84−int proc_doulongvec_minmax(struct ctl_table *, int, void *, size_t *, loff_t *);
85−int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int, void *,
84+int proc_doulongvec_minmax(const struct ctl_table *, int, void *, size_t *, loff_t *);
85+int proc_doulongvec_ms_jiffies_minmax(const struct ctl_table *table, int, void *,
8686 size_t *, loff_t *);
87−int proc_do_large_bitmap(struct ctl_table *, int, void *, size_t *, loff_t *);
88−int proc_do_static_key(struct ctl_table *table, int write, void *buffer,
87+int proc_do_large_bitmap(const struct ctl_table *, int, void *, size_t *, loff_t *);
88+int proc_do_static_key(const struct ctl_table *table, int write, void *buffer,
8989 size_t *lenp, loff_t *ppos);
9090
9191 /*
@@ -287,7 +287,7 @@ static inline bool sysctl_is_alias(char *param) · 195 unmodified lines
287287 }
288288 #endif /* CONFIG_SYSCTL */
289289
290−int sysctl_max_threads(struct ctl_table *table, int write, void *buffer,
290+int sysctl_max_threads(const struct ctl_table *table, int write, void *buffer,
291291 size_t *lenp, loff_t *ppos);
292292
293293 #endif /* _LINUX_SYSCTL_H */
include/linux/vmstat.h+2−2
@@ -17,7 +17,7 @@ extern int sysctl_stat_interval; · 16 unmodified lines
1717 #define DISABLE_NUMA_STAT 0
1818 extern int sysctl_vm_numa_stat;
1919 DECLARE_STATIC_KEY_TRUE(vm_numa_stat_key);
20−int sysctl_vm_numa_stat_handler(struct ctl_table *table, int write,
20+int sysctl_vm_numa_stat_handler(const struct ctl_table *table, int write,
2121 void *buffer, size_t *length, loff_t *ppos);
2222 #endif
2323
@@ -301,7 +301,7 @@ void cpu_vm_stats_fold(int cpu); · 277 unmodified lines
301301 void refresh_zone_stat_thresholds(void);
302302
303303 struct ctl_table;
304−int vmstat_refresh(struct ctl_table *, int write, void *buffer, size_t *lenp,
304+int vmstat_refresh(const struct ctl_table *, int write, void *buffer, size_t *lenp,
305305 loff_t *ppos);
306306
307307 void drain_zonestat(struct zone *zone, struct per_cpu_zonestat *);
include/linux/writeback.h+1−1
@@ -350,7 +350,7 @@ extern unsigned int dirty_expire_interval; · 349 unmodified lines
350350 extern unsigned int dirtytime_expire_interval;
351351 extern int laptop_mode;
352352
353−int dirtytime_interval_handler(struct ctl_table *table, int write,
353+int dirtytime_interval_handler(const struct ctl_table *table, int write,
354354 void *buffer, size_t *lenp, loff_t *ppos);
355355
356356 void global_dirty_limits(unsigned long *pbackground, unsigned long *pdirty);
include/net/ndisc.h+1−1
@@ -486,7 +486,7 @@ void igmp6_event_report(struct sk_buff *skb); · 485 unmodified lines
486486
487487
488488 #ifdef CONFIG_SYSCTL
489−int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write,
489+int ndisc_ifinfo_sysctl_change(const struct ctl_table *ctl, int write,
490490 void *buffer, size_t *lenp, loff_t *ppos);
491491 #endif
492492
include/net/neighbour.h+3−3
@@ -412,12 +412,12 @@ void *neigh_seq_start(struct seq_file *, loff_t *, struct neigh_table *, · 411 unmodified lines
412412 void *neigh_seq_next(struct seq_file *, void *, loff_t *);
413413 void neigh_seq_stop(struct seq_file *, void *);
414414
415−int neigh_proc_dointvec(struct ctl_table *ctl, int write,
415+int neigh_proc_dointvec(const struct ctl_table *ctl, int write,
416416 void *buffer, size_t *lenp, loff_t *ppos);
417−int neigh_proc_dointvec_jiffies(struct ctl_table *ctl, int write,
417+int neigh_proc_dointvec_jiffies(const struct ctl_table *ctl, int write,
418418 void *buffer,
419419 size_t *lenp, loff_t *ppos);
420−int neigh_proc_dointvec_ms_jiffies(struct ctl_table *ctl, int write,
420+int neigh_proc_dointvec_ms_jiffies(const struct ctl_table *ctl, int write,
421421 void *buffer, size_t *lenp, loff_t *ppos);
422422
423423 int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p,
include/net/netfilter/nf_hooks_lwtunnel.h+1−1
@@ -2,6 +2,6 @@ · 1 unmodified line
22 #include <linux/types.h>
33
44 #ifdef CONFIG_SYSCTL
5−int nf_hooks_lwtunnel_sysctl_handler(struct ctl_table *table, int write,
5+int nf_hooks_lwtunnel_sysctl_handler(const struct ctl_table *table, int write,
66 void *buffer, size_t *lenp, loff_t *ppos);
77 #endif
ipc/ipc_sysctl.c+3−3
@@ -17,7 +17,7 @@ · 16 unmodified lines
1717 #include <linux/cred.h>
1818 #include "util.h"
1919
20−static int proc_ipc_dointvec_minmax_orphans(struct ctl_table *table, int write,
20+static int proc_ipc_dointvec_minmax_orphans(const struct ctl_table *table, int write,
2121 void *buffer, size_t *lenp, loff_t *ppos)
2222 {
2323 struct ipc_namespace *ns =
@@ -33,7 +33,7 @@ static int proc_ipc_dointvec_minmax_orphans(struct ctl_table *table, int write, · 9 unmodified lines
3333 return err;
3434 }
3535
36−static int proc_ipc_auto_msgmni(struct ctl_table *table, int write,
36+static int proc_ipc_auto_msgmni(const struct ctl_table *table, int write,
3737 void *buffer, size_t *lenp, loff_t *ppos)
3838 {
3939 struct ctl_table ipc_table;
@@ -48,7 +48,7 @@ static int proc_ipc_auto_msgmni(struct ctl_table *table, int write, · 8 unmodified lines
4848 return proc_dointvec_minmax(&ipc_table, write, buffer, lenp, ppos);
4949 }
5050
51−static int proc_ipc_sem_dointvec(struct ctl_table *table, int write,
51+static int proc_ipc_sem_dointvec(const struct ctl_table *table, int write,
5252 void *buffer, size_t *lenp, loff_t *ppos)
5353 {
5454 struct ipc_namespace *ns =
kernel/bpf/syscall.c+2−2
@@ -5983,7 +5983,7 @@ const struct bpf_prog_ops bpf_syscall_prog_ops = { · 5982 unmodified lines
59835983 };
59845984
59855985 #ifdef CONFIG_SYSCTL
5986−static int bpf_stats_handler(struct ctl_table *table, int write,
5986+static int bpf_stats_handler(const struct ctl_table *table, int write,
59875987 void *buffer, size_t *lenp, loff_t *ppos)
59885988 {
59895989 struct static_key *key = (struct static_key *)table->data;
@@ -6018,7 +6018,7 @@ void __weak unpriv_ebpf_notify(int new_state) · 28 unmodified lines
60186018 {
60196019 }
60206020
6021−static int bpf_unpriv_handler(struct ctl_table *table, int write,
6021+static int bpf_unpriv_handler(const struct ctl_table *table, int write,
60226022 void *buffer, size_t *lenp, loff_t *ppos)
60236023 {
60246024 int ret, unpriv_enable = *(int *)table->data;
kernel/delayacct.c+1−1
@@ -44,7 +44,7 @@ void delayacct_init(void) · 43 unmodified lines
4444 }
4545
4646 #ifdef CONFIG_PROC_SYSCTL
47−static int sysctl_delayacct(struct ctl_table *table, int write, void *buffer,
47+static int sysctl_delayacct(const struct ctl_table *table, int write, void *buffer,
4848 size_t *lenp, loff_t *ppos)
4949 {
5050 int state = delayacct_on;
kernel/events/callchain.c+1−1
@@ -270,7 +270,7 @@ exit_put: · 269 unmodified lines
270270 * Used for sysctl_perf_event_max_stack and
271271 * sysctl_perf_event_max_contexts_per_stack.
272272 */
273−int perf_event_max_stack_handler(struct ctl_table *table, int write,
273+int perf_event_max_stack_handler(const struct ctl_table *table, int write,
274274 void *buffer, size_t *lenp, loff_t *ppos)
275275 {
276276 int *value = table->data;
kernel/events/core.c+2−2
@@ -450,7 +450,7 @@ static void update_perf_cpu_limits(void) · 449 unmodified lines
450450
451451 static bool perf_rotate_context(struct perf_cpu_pmu_context *cpc);
452452
453−int perf_event_max_sample_rate_handler(struct ctl_table *table, int write,
453+int perf_event_max_sample_rate_handler(const struct ctl_table *table, int write,
454454 void *buffer, size_t *lenp, loff_t *ppos)
455455 {
456456 int ret;
@@ -474,7 +474,7 @@ int perf_event_max_sample_rate_handler(struct ctl_table *table, int write, · 17 unmodified lines
474474
475475 int sysctl_perf_cpu_time_max_percent __read_mostly = DEFAULT_CPU_TIME_MAX_PERCENT;
476476
477−int perf_cpu_time_max_percent_handler(struct ctl_table *table, int write,
477+int perf_cpu_time_max_percent_handler(const struct ctl_table *table, int write,
478478 void *buffer, size_t *lenp, loff_t *ppos)
479479 {
480480 int ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
kernel/fork.c+1−1
@@ -3404,7 +3404,7 @@ int unshare_files(void) · 3403 unmodified lines
34043404 return 0;
34053405 }
34063406
3407−int sysctl_max_threads(struct ctl_table *table, int write,
3407+int sysctl_max_threads(const struct ctl_table *table, int write,
34083408 void *buffer, size_t *lenp, loff_t *ppos)
34093409 {
34103410 struct ctl_table t;
kernel/hung_task.c+1−1
@@ -239,7 +239,7 @@ static long hung_timeout_jiffies(unsigned long last_checked, · 238 unmodified lines
239239 /*
240240 * Process updating of timeout sysctl
241241 */
242−static int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,
242+static int proc_dohung_task_timeout_secs(const struct ctl_table *table, int write,
243243 void *buffer,
244244 size_t *lenp, loff_t *ppos)
245245 {
kernel/kexec_core.c+1−1
@@ -888,7 +888,7 @@ struct kimage *kexec_crash_image; · 887 unmodified lines
888888 static int kexec_load_disabled;
889889
890890 #ifdef CONFIG_SYSCTL
891−static int kexec_limit_handler(struct ctl_table *table, int write,
891+static int kexec_limit_handler(const struct ctl_table *table, int write,
892892 void *buffer, size_t *lenp, loff_t *ppos)
893893 {
894894 struct kexec_load_limit *limit = table->data;
kernel/kprobes.c+1−1
@@ -939,7 +939,7 @@ static void unoptimize_all_kprobes(void) · 938 unmodified lines
939939
940940 static DEFINE_MUTEX(kprobe_sysctl_mutex);
941941 static int sysctl_kprobes_optimization;
942−static int proc_kprobes_optimization_handler(struct ctl_table *table,
942+static int proc_kprobes_optimization_handler(const struct ctl_table *table,
943943 int write, void *buffer,
944944 size_t *length, loff_t *ppos)
945945 {
kernel/latencytop.c+1−1
@@ -65,7 +65,7 @@ static struct latency_record latency_record[MAXLR]; · 64 unmodified lines
6565 int latencytop_enabled;
6666
6767 #ifdef CONFIG_SYSCTL
68−static int sysctl_latencytop(struct ctl_table *table, int write, void *buffer,
68+static int sysctl_latencytop(const struct ctl_table *table, int write, void *buffer,
6969 size_t *lenp, loff_t *ppos)
7070 {
7171 int err;
kernel/pid_namespace.c+1−1
@@ -261,7 +261,7 @@ void zap_pid_ns_processes(struct pid_namespace *pid_ns) · 260 unmodified lines
261261 }
262262
263263 #ifdef CONFIG_CHECKPOINT_RESTORE
264−static int pid_ns_ctl_handler(struct ctl_table *table, int write,
264+static int pid_ns_ctl_handler(const struct ctl_table *table, int write,
265265 void *buffer, size_t *lenp, loff_t *ppos)
266266 {
267267 struct pid_namespace *pid_ns = task_active_pid_ns(current);
kernel/pid_sysctl.h+1−1
@@ -5,7 +5,7 @@ · 4 unmodified lines
55 #include <linux/pid_namespace.h>
66
77 #if defined(CONFIG_SYSCTL) && defined(CONFIG_MEMFD_CREATE)
8−static int pid_mfd_noexec_dointvec_minmax(struct ctl_table *table,
8+static int pid_mfd_noexec_dointvec_minmax(const struct ctl_table *table,
99 int write, void *buf, size_t *lenp, loff_t *ppos)
1010 {
1111 struct pid_namespace *ns = task_active_pid_ns(current);
kernel/printk/internal.h+1−1
@@ -8,7 +8,7 @@ · 7 unmodified lines
88
99 #if defined(CONFIG_PRINTK) && defined(CONFIG_SYSCTL)
1010 void __init printk_sysctl_init(void);
11−int devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write,
11+int devkmsg_sysctl_set_loglvl(const struct ctl_table *table, int write,
1212 void *buffer, size_t *lenp, loff_t *ppos);
1313 #else
1414 #define printk_sysctl_init() do { } while (0)
kernel/printk/printk.c+1−1
@@ -197,7 +197,7 @@ __setup("printk.devkmsg=", control_devkmsg); · 196 unmodified lines
197197
198198 char devkmsg_log_str[DEVKMSG_STR_MAX_SIZE] = "ratelimit";
199199 #if defined(CONFIG_PRINTK) && defined(CONFIG_SYSCTL)
200−int devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write,
200+int devkmsg_sysctl_set_loglvl(const struct ctl_table *table, int write,
201201 void *buffer, size_t *lenp, loff_t *ppos)
202202 {
203203 char old_str[DEVKMSG_STR_MAX_SIZE];
kernel/printk/sysctl.c+1−1
@@ -11,7 +11,7 @@ · 10 unmodified lines
1111
1212 static const int ten_thousand = 10000;
1313
14−static int proc_dointvec_minmax_sysadmin(struct ctl_table *table, int write,
14+static int proc_dointvec_minmax_sysadmin(const struct ctl_table *table, int write,
1515 void *buffer, size_t *lenp, loff_t *ppos)
1616 {
1717 if (write && !capable(CAP_SYS_ADMIN))
kernel/sched/core.c+3−3
@@ -1806,7 +1806,7 @@ static void uclamp_sync_util_min_rt_default(void) · 1805 unmodified lines
18061806 uclamp_update_util_min_rt_default(p);
18071807 }
18081808
1809−static int sysctl_sched_uclamp_handler(struct ctl_table *table, int write,
1809+static int sysctl_sched_uclamp_handler(const struct ctl_table *table, int write,
18101810 void *buffer, size_t *lenp, loff_t *ppos)
18111811 {
18121812 bool update_root_tg = false;
@@ -4392,7 +4392,7 @@ static void reset_memory_tiering(void) · 2579 unmodified lines
43924392 }
43934393 }
43944394
4395−static int sysctl_numa_balancing(struct ctl_table *table, int write,
4395+static int sysctl_numa_balancing(const struct ctl_table *table, int write,
43964396 void *buffer, size_t *lenp, loff_t *ppos)
43974397 {
43984398 struct ctl_table t;
@@ -4461,7 +4461,7 @@ out: · 62 unmodified lines
44614461 __setup("schedstats=", setup_schedstats);
44624462
44634463 #ifdef CONFIG_PROC_SYSCTL
4464−static int sysctl_schedstats(struct ctl_table *table, int write, void *buffer,
4464+static int sysctl_schedstats(const struct ctl_table *table, int write, void *buffer,
44654465 size_t *lenp, loff_t *ppos)
44664466 {
44674467 struct ctl_table t;
kernel/sched/rt.c+4−4
@@ -26,9 +26,9 @@ int sysctl_sched_rt_runtime = 950000; · 25 unmodified lines
2626
2727 #ifdef CONFIG_SYSCTL
2828 static int sysctl_sched_rr_timeslice = (MSEC_PER_SEC * RR_TIMESLICE) / HZ;
29−static int sched_rt_handler(struct ctl_table *table, int write, void *buffer,
29+static int sched_rt_handler(const struct ctl_table *table, int write, void *buffer,
3030 size_t *lenp, loff_t *ppos);
31−static int sched_rr_handler(struct ctl_table *table, int write, void *buffer,
31+static int sched_rr_handler(const struct ctl_table *table, int write, void *buffer,
3232 size_t *lenp, loff_t *ppos);
3333 static struct ctl_table sched_rt_sysctls[] = {
3434 {
@@ -2952,7 +2952,7 @@ static void sched_rt_do_global(void) · 2917 unmodified lines
29522952 raw_spin_unlock_irqrestore(&def_rt_bandwidth.rt_runtime_lock, flags);
29532953 }
29542954
2955−static int sched_rt_handler(struct ctl_table *table, int write, void *buffer,
2955+static int sched_rt_handler(const struct ctl_table *table, int write, void *buffer,
29562956 size_t *lenp, loff_t *ppos)
29572957 {
29582958 int old_period, old_runtime;
@@ -2991,7 +2991,7 @@ undo: · 32 unmodified lines
29912991 return ret;
29922992 }
29932993
2994−static int sched_rr_handler(struct ctl_table *table, int write, void *buffer,
2994+static int sched_rr_handler(const struct ctl_table *table, int write, void *buffer,
29952995 size_t *lenp, loff_t *ppos)
29962996 {
29972997 int ret;
kernel/sched/topology.c+1−1
@@ -285,7 +285,7 @@ void rebuild_sched_domains_energy(void) · 284 unmodified lines
285285 }
286286
287287 #ifdef CONFIG_PROC_SYSCTL
288−static int sched_energy_aware_handler(struct ctl_table *table, int write,
288+static int sched_energy_aware_handler(const struct ctl_table *table, int write,
289289 void *buffer, size_t *lenp, loff_t *ppos)
290290 {
291291 int ret, state;
kernel/seccomp.c+1−1
@@ -2431,7 +2431,7 @@ static void audit_actions_logged(u32 actions_logged, u32 old_actions_logged, · 2430 unmodified lines
24312431 return audit_seccomp_actions_logged(new, old, !ret);
24322432 }
24332433
2434−static int seccomp_actions_logged_handler(struct ctl_table *ro_table, int write,
2434+static int seccomp_actions_logged_handler(const struct ctl_table *ro_table, int write,
24352435 void *buffer, size_t *lenp,
24362436 loff_t *ppos)
24372437 {
kernel/stackleak.c+1−1
@@ -21,7 +21,7 @@ · 20 unmodified lines
2121 static DEFINE_STATIC_KEY_FALSE(stack_erasing_bypass);
2222
2323 #ifdef CONFIG_SYSCTL
24−static int stack_erasing_sysctl(struct ctl_table *table, int write,
24+static int stack_erasing_sysctl(const struct ctl_table *table, int write,
2525 void __user *buffer, size_t *lenp, loff_t *ppos)
2626 {
2727 int ret = 0;
kernel/sysctl.c+32−32
@@ -256,7 +256,7 @@ static bool proc_first_pos_non_zero_ignore(loff_t *ppos, · 255 unmodified lines
256256 *
257257 * Returns 0 on success.
258258 */
259−int proc_dostring(struct ctl_table *table, int write,
259+int proc_dostring(const struct ctl_table *table, int write,
260260 void *buffer, size_t *lenp, loff_t *ppos)
261261 {
262262 if (write)
@@ -702,7 +702,7 @@ int do_proc_douintvec(const struct ctl_table *table, int write, · 439 unmodified lines
702702 *
703703 * Returns 0 on success.
704704 */
705−int proc_dobool(struct ctl_table *table, int write, void *buffer,
705+int proc_dobool(const struct ctl_table *table, int write, void *buffer,
706706 size_t *lenp, loff_t *ppos)
707707 {
708708 struct ctl_table tmp;
@@ -739,7 +739,7 @@ int proc_dobool(struct ctl_table *table, int write, void *buffer, · 30 unmodified lines
739739 *
740740 * Returns 0 on success.
741741 */
742−int proc_dointvec(struct ctl_table *table, int write, void *buffer,
742+int proc_dointvec(const struct ctl_table *table, int write, void *buffer,
743743 size_t *lenp, loff_t *ppos)
744744 {
745745 return do_proc_dointvec(table, write, buffer, lenp, ppos, NULL, NULL);
@@ -758,7 +758,7 @@ int proc_dointvec(struct ctl_table *table, int write, void *buffer, · 12 unmodified lines
758758 *
759759 * Returns 0 on success.
760760 */
761−int proc_douintvec(struct ctl_table *table, int write, void *buffer,
761+int proc_douintvec(const struct ctl_table *table, int write, void *buffer,
762762 size_t *lenp, loff_t *ppos)
763763 {
764764 return do_proc_douintvec(table, write, buffer, lenp, ppos,
@@ -769,7 +769,7 @@ int proc_douintvec(struct ctl_table *table, int write, void *buffer, · 4 unmodified lines
769769 * Taint values can only be increased
770770 * This means we can safely use a temporary.
771771 */
772−static int proc_taint(struct ctl_table *table, int write,
772+static int proc_taint(const struct ctl_table *table, int write,
773773 void *buffer, size_t *lenp, loff_t *ppos)
774774 {
775775 struct ctl_table t;
@@ -864,7 +864,7 @@ static int do_proc_dointvec_minmax_conv(bool *negp, unsigned long *lvalp, · 88 unmodified lines
864864 *
865865 * Returns 0 on success or -EINVAL on write when the range check fails.
866866 */
867−int proc_dointvec_minmax(struct ctl_table *table, int write,
867+int proc_dointvec_minmax(const struct ctl_table *table, int write,
868868 void *buffer, size_t *lenp, loff_t *ppos)
869869 {
870870 struct do_proc_dointvec_minmax_conv_param param = {
@@ -933,7 +933,7 @@ static int do_proc_douintvec_minmax_conv(unsigned long *lvalp, · 62 unmodified lines
933933 *
934934 * Returns 0 on success or -ERANGE on write when the range check fails.
935935 */
936−int proc_douintvec_minmax(struct ctl_table *table, int write,
936+int proc_douintvec_minmax(const struct ctl_table *table, int write,
937937 void *buffer, size_t *lenp, loff_t *ppos)
938938 {
939939 struct do_proc_douintvec_minmax_conv_param param = {
@@ -961,7 +961,7 @@ int proc_douintvec_minmax(struct ctl_table *table, int write, · 21 unmodified lines
961961 *
962962 * Returns 0 on success or an error on write when the range check fails.
963963 */
964−int proc_dou8vec_minmax(struct ctl_table *table, int write,
964+int proc_dou8vec_minmax(const struct ctl_table *table, int write,
965965 void *buffer, size_t *lenp, loff_t *ppos)
966966 {
967967 struct ctl_table tmp;
@@ -998,7 +998,7 @@ int proc_dou8vec_minmax(struct ctl_table *table, int write, · 30 unmodified lines
998998 EXPORT_SYMBOL_GPL(proc_dou8vec_minmax);
999999
10001000 #ifdef CONFIG_MAGIC_SYSRQ
1001−static int sysrq_sysctl_handler(struct ctl_table *table, int write,
1001+static int sysrq_sysctl_handler(const struct ctl_table *table, int write,
10021002 void *buffer, size_t *lenp, loff_t *ppos)
10031003 {
10041004 int tmp, ret;
@@ -1115,7 +1115,7 @@ static int do_proc_doulongvec_minmax(const struct ctl_table *table, int write, · 110 unmodified lines
11151115 *
11161116 * Returns 0 on success.
11171117 */
1118−int proc_doulongvec_minmax(struct ctl_table *table, int write,
1118+int proc_doulongvec_minmax(const struct ctl_table *table, int write,
11191119 void *buffer, size_t *lenp, loff_t *ppos)
11201120 {
11211121 return do_proc_doulongvec_minmax(table, write, buffer, lenp, ppos, 1l, 1l);
@@ -1138,7 +1138,7 @@ int proc_doulongvec_minmax(struct ctl_table *table, int write, · 16 unmodified lines
11381138 *
11391139 * Returns 0 on success.
11401140 */
1141−int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write,
1141+int proc_doulongvec_ms_jiffies_minmax(const struct ctl_table *table, int write,
11421142 void *buffer, size_t *lenp, loff_t *ppos)
11431143 {
11441144 return do_proc_doulongvec_minmax(table, write, buffer,
@@ -1259,14 +1259,14 @@ static int do_proc_dointvec_ms_jiffies_minmax_conv(bool *negp, unsigned long *lv · 114 unmodified lines
12591259 *
12601260 * Returns 0 on success.
12611261 */
1262−int proc_dointvec_jiffies(struct ctl_table *table, int write,
1262+int proc_dointvec_jiffies(const struct ctl_table *table, int write,
12631263 void *buffer, size_t *lenp, loff_t *ppos)
12641264 {
12651265 return do_proc_dointvec(table,write,buffer,lenp,ppos,
12661266 do_proc_dointvec_jiffies_conv,NULL);
12671267 }
12681268
1269−int proc_dointvec_ms_jiffies_minmax(struct ctl_table *table, int write,
1269+int proc_dointvec_ms_jiffies_minmax(const struct ctl_table *table, int write,
12701270 void *buffer, size_t *lenp, loff_t *ppos)
12711271 {
12721272 struct do_proc_dointvec_minmax_conv_param param = {
@@ -1292,7 +1292,7 @@ int proc_dointvec_ms_jiffies_minmax(struct ctl_table *table, int write, · 19 unmodified lines
12921292 *
12931293 * Returns 0 on success.
12941294 */
1295−int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write,
1295+int proc_dointvec_userhz_jiffies(const struct ctl_table *table, int write,
12961296 void *buffer, size_t *lenp, loff_t *ppos)
12971297 {
12981298 return do_proc_dointvec(table, write, buffer, lenp, ppos,
@@ -1315,14 +1315,14 @@ int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write, · 16 unmodified lines
13151315 *
13161316 * Returns 0 on success.
13171317 */
1318−int proc_dointvec_ms_jiffies(struct ctl_table *table, int write, void *buffer,
1318+int proc_dointvec_ms_jiffies(const struct ctl_table *table, int write, void *buffer,
13191319 size_t *lenp, loff_t *ppos)
13201320 {
13211321 return do_proc_dointvec(table, write, buffer, lenp, ppos,
13221322 do_proc_dointvec_ms_jiffies_conv, NULL);
13231323 }
13241324
1325−static int proc_do_cad_pid(struct ctl_table *table, int write, void *buffer,
1325+static int proc_do_cad_pid(const struct ctl_table *table, int write, void *buffer,
13261326 size_t *lenp, loff_t *ppos)
13271327 {
13281328 struct pid *new_pid;
@@ -1361,7 +1361,7 @@ static int proc_do_cad_pid(struct ctl_table *table, int write, void *buffer, · 32 unmodified lines
13611361 *
13621362 * Returns 0 on success.
13631363 */
1364−int proc_do_large_bitmap(struct ctl_table *table, int write,
1364+int proc_do_large_bitmap(const struct ctl_table *table, int write,
13651365 void *buffer, size_t *lenp, loff_t *ppos)
13661366 {
13671367 int err = 0;
@@ -1493,85 +1493,85 @@ int proc_do_large_bitmap(struct ctl_table *table, int write, · 125 unmodified lines
14931493
14941494 #else /* CONFIG_PROC_SYSCTL */
14951495
1496−int proc_dostring(struct ctl_table *table, int write,
1496+int proc_dostring(const struct ctl_table *table, int write,
14971497 void *buffer, size_t *lenp, loff_t *ppos)
14981498 {
14991499 return -ENOSYS;
15001500 }
15011501
1502−int proc_dobool(struct ctl_table *table, int write,
1502+int proc_dobool(const struct ctl_table *table, int write,
15031503 void *buffer, size_t *lenp, loff_t *ppos)
15041504 {
15051505 return -ENOSYS;
15061506 }
15071507
1508−int proc_dointvec(struct ctl_table *table, int write,
1508+int proc_dointvec(const struct ctl_table *table, int write,
15091509 void *buffer, size_t *lenp, loff_t *ppos)
15101510 {
15111511 return -ENOSYS;
15121512 }
15131513
1514−int proc_douintvec(struct ctl_table *table, int write,
1514+int proc_douintvec(const struct ctl_table *table, int write,
15151515 void *buffer, size_t *lenp, loff_t *ppos)
15161516 {
15171517 return -ENOSYS;
15181518 }
15191519
1520−int proc_dointvec_minmax(struct ctl_table *table, int write,
1520+int proc_dointvec_minmax(const struct ctl_table *table, int write,
15211521 void *buffer, size_t *lenp, loff_t *ppos)
15221522 {
15231523 return -ENOSYS;
15241524 }
15251525
1526−int proc_douintvec_minmax(struct ctl_table *table, int write,
1526+int proc_douintvec_minmax(const struct ctl_table *table, int write,
15271527 void *buffer, size_t *lenp, loff_t *ppos)
15281528 {
15291529 return -ENOSYS;
15301530 }
15311531
1532−int proc_dou8vec_minmax(struct ctl_table *table, int write,
1532+int proc_dou8vec_minmax(const struct ctl_table *table, int write,
15331533 void *buffer, size_t *lenp, loff_t *ppos)
15341534 {
15351535 return -ENOSYS;
15361536 }
15371537
1538−int proc_dointvec_jiffies(struct ctl_table *table, int write,
1538+int proc_dointvec_jiffies(const struct ctl_table *table, int write,
15391539 void *buffer, size_t *lenp, loff_t *ppos)
15401540 {
15411541 return -ENOSYS;
15421542 }
15431543
1544−int proc_dointvec_ms_jiffies_minmax(struct ctl_table *table, int write,
1544+int proc_dointvec_ms_jiffies_minmax(const struct ctl_table *table, int write,
15451545 void *buffer, size_t *lenp, loff_t *ppos)
15461546 {
15471547 return -ENOSYS;
15481548 }
15491549
1550−int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write,
1550+int proc_dointvec_userhz_jiffies(const struct ctl_table *table, int write,
15511551 void *buffer, size_t *lenp, loff_t *ppos)
15521552 {
15531553 return -ENOSYS;
15541554 }
15551555
1556−int proc_dointvec_ms_jiffies(struct ctl_table *table, int write,
1556+int proc_dointvec_ms_jiffies(const struct ctl_table *table, int write,
15571557 void *buffer, size_t *lenp, loff_t *ppos)
15581558 {
15591559 return -ENOSYS;
15601560 }
15611561
1562−int proc_doulongvec_minmax(struct ctl_table *table, int write,
1562+int proc_doulongvec_minmax(const struct ctl_table *table, int write,
15631563 void *buffer, size_t *lenp, loff_t *ppos)
15641564 {
15651565 return -ENOSYS;
15661566 }
15671567
1568−int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write,
1568+int proc_doulongvec_ms_jiffies_minmax(const struct ctl_table *table, int write,
15691569 void *buffer, size_t *lenp, loff_t *ppos)
15701570 {
15711571 return -ENOSYS;
15721572 }
15731573
1574−int proc_do_large_bitmap(struct ctl_table *table, int write,
1574+int proc_do_large_bitmap(const struct ctl_table *table, int write,
15751575 void *buffer, size_t *lenp, loff_t *ppos)
15761576 {
15771577 return -ENOSYS;
@@ -1580,7 +1580,7 @@ int proc_do_large_bitmap(struct ctl_table *table, int write, · 2 unmodified lines
15801580 #endif /* CONFIG_PROC_SYSCTL */
15811581
15821582 #if defined(CONFIG_SYSCTL)
1583−int proc_do_static_key(struct ctl_table *table, int write,
1583+int proc_do_static_key(const struct ctl_table *table, int write,
15841584 void *buffer, size_t *lenp, loff_t *ppos)
15851585 {
15861586 struct static_key *key = (struct static_key *)table->data;
kernel/time/timer.c+1−1
@@ -289,7 +289,7 @@ static void timers_update_migration(void) · 288 unmodified lines
289289 }
290290
291291 #ifdef CONFIG_SYSCTL
292−static int timer_migration_handler(struct ctl_table *table, int write,
292+static int timer_migration_handler(const struct ctl_table *table, int write,
293293 void *buffer, size_t *lenp, loff_t *ppos)
294294 {
295295 int ret;
kernel/trace/ftrace.c+1−1
@@ -8735,7 +8735,7 @@ static bool is_permanent_ops_registered(void) · 8734 unmodified lines
87358735 }
87368736
87378737 static int
8738−ftrace_enable_sysctl(struct ctl_table *table, int write,
8738+ftrace_enable_sysctl(const struct ctl_table *table, int write,
87398739 void *buffer, size_t *lenp, loff_t *ppos)
87408740 {
87418741 int ret = -ENODEV;
kernel/trace/trace.c+1−1
@@ -2767,7 +2767,7 @@ static void output_printk(struct trace_event_buffer *fbuffer) · 2766 unmodified lines
27672767 raw_spin_unlock_irqrestore(&tracepoint_iter_lock, flags);
27682768 }
27692769
2770−int tracepoint_printk_sysctl(struct ctl_table *table, int write,
2770+int tracepoint_printk_sysctl(const struct ctl_table *table, int write,
27712771 void *buffer, size_t *lenp,
27722772 loff_t *ppos)
27732773 {
kernel/trace/trace_events_user.c+1−1
@@ -2885,7 +2885,7 @@ err: · 2884 unmodified lines
28852885 return -ENODEV;
28862886 }
28872887
2888−static int set_max_user_events_sysctl(struct ctl_table *table, int write,
2888+static int set_max_user_events_sysctl(const struct ctl_table *table, int write,
28892889 void *buffer, size_t *lenp, loff_t *ppos)
28902890 {
28912891 int ret;
kernel/trace/trace_stack.c+1−1
@@ -514,7 +514,7 @@ static const struct file_operations stack_trace_filter_fops = { · 513 unmodified lines
514514 #endif /* CONFIG_DYNAMIC_FTRACE */
515515
516516 int
517−stack_trace_sysctl(struct ctl_table *table, int write, void *buffer,
517+stack_trace_sysctl(const struct ctl_table *table, int write, void *buffer,
518518 size_t *lenp, loff_t *ppos)
519519 {
520520 int was_enabled;
kernel/umh.c+1−1
@@ -495,7 +495,7 @@ int call_usermodehelper(const char *path, char **argv, char **envp, int wait) · 494 unmodified lines
495495 EXPORT_SYMBOL(call_usermodehelper);
496496
497497 #if defined(CONFIG_SYSCTL)
498−static int proc_cap_handler(struct ctl_table *table, int write,
498+static int proc_cap_handler(const struct ctl_table *table, int write,
499499 void *buffer, size_t *lenp, loff_t *ppos)
500500 {
501501 struct ctl_table t;
kernel/utsname_sysctl.c+1−1
@@ -30,7 +30,7 @@ static void *get_uts(const struct ctl_table *table) · 29 unmodified lines
3030 * Special case of dostring for the UTS structure. This has locks
3131 * to observe. Should this be in kernel/sys.c ????
3232 */
33−static int proc_do_uts_string(struct ctl_table *table, int write,
33+static int proc_do_uts_string(const struct ctl_table *table, int write,
3434 void *buffer, size_t *lenp, loff_t *ppos)
3535 {
3636 struct ctl_table uts_table;
kernel/watchdog.c+6−6
@@ -983,7 +983,7 @@ static void proc_watchdog_update(void) · 982 unmodified lines
983983 * -------------------|----------------------------------|-------------------------------
984984 * proc_soft_watchdog | watchdog_softlockup_user_enabled | WATCHDOG_SOFTOCKUP_ENABLED
985985 */
986−static int proc_watchdog_common(int which, struct ctl_table *table, int write,
986+static int proc_watchdog_common(int which, const struct ctl_table *table, int write,
987987 void *buffer, size_t *lenp, loff_t *ppos)
988988 {
989989 int err, old, *param = table->data;
@@ -1010,7 +1010,7 @@ static int proc_watchdog_common(int which, struct ctl_table *table, int write, · 20 unmodified lines
10101010 /*
10111011 * /proc/sys/kernel/watchdog
10121012 */
1013−static int proc_watchdog(struct ctl_table *table, int write,
1013+static int proc_watchdog(const struct ctl_table *table, int write,
10141014 void *buffer, size_t *lenp, loff_t *ppos)
10151015 {
10161016 return proc_watchdog_common(WATCHDOG_HARDLOCKUP_ENABLED |
@@ -1021,7 +1021,7 @@ static int proc_watchdog(struct ctl_table *table, int write, · 4 unmodified lines
10211021 /*
10221022 * /proc/sys/kernel/nmi_watchdog
10231023 */
1024−static int proc_nmi_watchdog(struct ctl_table *table, int write,
1024+static int proc_nmi_watchdog(const struct ctl_table *table, int write,
10251025 void *buffer, size_t *lenp, loff_t *ppos)
10261026 {
10271027 if (!watchdog_hardlockup_available && write)
@@ -1034,7 +1034,7 @@ static int proc_nmi_watchdog(struct ctl_table *table, int write, · 6 unmodified lines
10341034 /*
10351035 * /proc/sys/kernel/soft_watchdog
10361036 */
1037−static int proc_soft_watchdog(struct ctl_table *table, int write,
1037+static int proc_soft_watchdog(const struct ctl_table *table, int write,
10381038 void *buffer, size_t *lenp, loff_t *ppos)
10391039 {
10401040 return proc_watchdog_common(WATCHDOG_SOFTOCKUP_ENABLED,
@@ -1045,7 +1045,7 @@ static int proc_soft_watchdog(struct ctl_table *table, int write, · 4 unmodified lines
10451045 /*
10461046 * /proc/sys/kernel/watchdog_thresh
10471047 */
1048−static int proc_watchdog_thresh(struct ctl_table *table, int write,
1048+static int proc_watchdog_thresh(const struct ctl_table *table, int write,
10491049 void *buffer, size_t *lenp, loff_t *ppos)
10501050 {
10511051 int err, old;
@@ -1068,7 +1068,7 @@ static int proc_watchdog_thresh(struct ctl_table *table, int write, · 16 unmodified lines
10681068 * user to specify a mask that will include cpus that have not yet
10691069 * been brought online, if desired.
10701070 */
1071−static int proc_watchdog_cpumask(struct ctl_table *table, int write,
1071+static int proc_watchdog_cpumask(const struct ctl_table *table, int write,
10721072 void *buffer, size_t *lenp, loff_t *ppos)
10731073 {
10741074 int err;
mm/compaction.c+3−3
@@ -2962,7 +2962,7 @@ static int compact_nodes(void) · 2961 unmodified lines
29622962 return 0;
29632963 }
29642964
2965−static int compaction_proactiveness_sysctl_handler(struct ctl_table *table, int write,
2965+static int compaction_proactiveness_sysctl_handler(const struct ctl_table *table, int write,
29662966 void *buffer, size_t *length, loff_t *ppos)
29672967 {
29682968 int rc, nid;
@@ -2992,7 +2992,7 @@ static int compaction_proactiveness_sysctl_handler(struct ctl_table *table, int · 23 unmodified lines
29922992 * This is the entry point for compacting all nodes via
29932993 * /proc/sys/vm/compact_memory
29942994 */
2995−static int sysctl_compaction_handler(struct ctl_table *table, int write,
2995+static int sysctl_compaction_handler(const struct ctl_table *table, int write,
29962996 void *buffer, size_t *length, loff_t *ppos)
29972997 {
29982998 int ret;
@@ -3303,7 +3303,7 @@ static int kcompactd_cpu_online(unsigned int cpu) · 304 unmodified lines
33033303 return 0;
33043304 }
33053305
3306−static int proc_dointvec_minmax_warn_RT_change(struct ctl_table *table,
3306+static int proc_dointvec_minmax_warn_RT_change(const struct ctl_table *table,
33073307 int write, void *buffer, size_t *lenp, loff_t *ppos)
33083308 {
33093309 int ret, old;
mm/hugetlb.c+3−3
@@ -4925,7 +4925,7 @@ out: · 4924 unmodified lines
49254925 return ret;
49264926 }
49274927
4928−static int hugetlb_sysctl_handler(struct ctl_table *table, int write,
4928+static int hugetlb_sysctl_handler(const struct ctl_table *table, int write,
49294929 void *buffer, size_t *length, loff_t *ppos)
49304930 {
49314931
@@ -4934,7 +4934,7 @@ static int hugetlb_sysctl_handler(struct ctl_table *table, int write, · 2 unmodified lines
49344934 }
49354935
49364936 #ifdef CONFIG_NUMA
4937−static int hugetlb_mempolicy_sysctl_handler(struct ctl_table *table, int write,
4937+static int hugetlb_mempolicy_sysctl_handler(const struct ctl_table *table, int write,
49384938 void *buffer, size_t *length, loff_t *ppos)
49394939 {
49404940 return hugetlb_sysctl_handler_common(true, table, write,
@@ -4942,7 +4942,7 @@ static int hugetlb_mempolicy_sysctl_handler(struct ctl_table *table, int write, · 1 unmodified line
49424942 }
49434943 #endif /* CONFIG_NUMA */
49444944
4945−static int hugetlb_overcommit_handler(struct ctl_table *table, int write,
4945+static int hugetlb_overcommit_handler(const struct ctl_table *table, int write,
49464946 void *buffer, size_t *length, loff_t *ppos)
49474947 {
49484948 struct hstate *h = &default_hstate;
mm/page-writeback.c+5−5
@@ -506,7 +506,7 @@ bool node_dirty_ok(struct pglist_data *pgdat) · 505 unmodified lines
506506 }
507507
508508 #ifdef CONFIG_SYSCTL
509−static int dirty_background_ratio_handler(struct ctl_table *table, int write,
509+static int dirty_background_ratio_handler(const struct ctl_table *table, int write,
510510 void *buffer, size_t *lenp, loff_t *ppos)
511511 {
512512 int ret;
@@ -517,7 +517,7 @@ static int dirty_background_ratio_handler(struct ctl_table *table, int write, · 4 unmodified lines
517517 return ret;
518518 }
519519
520−static int dirty_background_bytes_handler(struct ctl_table *table, int write,
520+static int dirty_background_bytes_handler(const struct ctl_table *table, int write,
521521 void *buffer, size_t *lenp, loff_t *ppos)
522522 {
523523 int ret;
@@ -535,7 +535,7 @@ static int dirty_background_bytes_handler(struct ctl_table *table, int write, · 11 unmodified lines
535535 return ret;
536536 }
537537
538−static int dirty_ratio_handler(struct ctl_table *table, int write, void *buffer,
538+static int dirty_ratio_handler(const struct ctl_table *table, int write, void *buffer,
539539 size_t *lenp, loff_t *ppos)
540540 {
541541 int old_ratio = vm_dirty_ratio;
@@ -549,7 +549,7 @@ static int dirty_ratio_handler(struct ctl_table *table, int write, void *buffer, · 7 unmodified lines
549549 return ret;
550550 }
551551
552−static int dirty_bytes_handler(struct ctl_table *table, int write,
552+static int dirty_bytes_handler(const struct ctl_table *table, int write,
553553 void *buffer, size_t *lenp, loff_t *ppos)
554554 {
555555 unsigned long old_bytes = vm_dirty_bytes;
@@ -2203,7 +2203,7 @@ bool wb_over_bg_thresh(struct bdi_writeback *wb) · 1647 unmodified lines
22032203 /*
22042204 * sysctl handler for /proc/sys/vm/dirty_writeback_centisecs
22052205 */
2206−static int dirty_writeback_centisecs_handler(struct ctl_table *table, int write,
2206+static int dirty_writeback_centisecs_handler(const struct ctl_table *table, int write,
22072207 void *buffer, size_t *length, loff_t *ppos)
22082208 {
22092209 unsigned int old_interval = dirty_writeback_interval;
mm/page_alloc.c+7−7
@@ -5127,7 +5127,7 @@ static char numa_zonelist_order[] = "Node"; · 5126 unmodified lines
51275127 /*
51285128 * sysctl handler for numa_zonelist_order
51295129 */
5130−static int numa_zonelist_order_handler(struct ctl_table *table, int write,
5130+static int numa_zonelist_order_handler(const struct ctl_table *table, int write,
51315131 void *buffer, size_t *length, loff_t *ppos)
51325132 {
51335133 if (write)
@@ -6091,7 +6091,7 @@ postcore_initcall(init_per_zone_wmark_min) · 957 unmodified lines
60916091 * that we can call two helper functions whenever min_free_kbytes
60926092 * changes.
60936093 */
6094−static int min_free_kbytes_sysctl_handler(struct ctl_table *table, int write,
6094+static int min_free_kbytes_sysctl_handler(const struct ctl_table *table, int write,
60956095 void *buffer, size_t *length, loff_t *ppos)
60966096 {
60976097 int rc;
@@ -6107,7 +6107,7 @@ static int min_free_kbytes_sysctl_handler(struct ctl_table *table, int write, · 9 unmodified lines
61076107 return 0;
61086108 }
61096109
6110−static int watermark_scale_factor_sysctl_handler(struct ctl_table *table, int write,
6110+static int watermark_scale_factor_sysctl_handler(const struct ctl_table *table, int write,
61116111 void *buffer, size_t *length, loff_t *ppos)
61126112 {
61136113 int rc;
@@ -6137,7 +6137,7 @@ static void setup_min_unmapped_ratio(void) · 23 unmodified lines
61376137 }
61386138
61396139
6140−static int sysctl_min_unmapped_ratio_sysctl_handler(struct ctl_table *table, int write,
6140+static int sysctl_min_unmapped_ratio_sysctl_handler(const struct ctl_table *table, int write,
61416141 void *buffer, size_t *length, loff_t *ppos)
61426142 {
61436143 int rc;
@@ -6164,7 +6164,7 @@ static void setup_min_slab_ratio(void) · 20 unmodified lines
61646164 sysctl_min_slab_ratio) / 100;
61656165 }
61666166
6167−static int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *table, int write,
6167+static int sysctl_min_slab_ratio_sysctl_handler(const struct ctl_table *table, int write,
61686168 void *buffer, size_t *length, loff_t *ppos)
61696169 {
61706170 int rc;
@@ -6188,7 +6188,7 @@ static int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *table, int wri · 17 unmodified lines
61886188 * minimum watermarks. The lowmem reserve ratio can only make sense
61896189 * if in function of the boot time zone sizes.
61906190 */
6191−static int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *table,
6191+static int lowmem_reserve_ratio_sysctl_handler(const struct ctl_table *table,
61926192 int write, void *buffer, size_t *length, loff_t *ppos)
61936193 {
61946194 int i;
@@ -6209,7 +6209,7 @@ static int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *table, · 14 unmodified lines
62096209 * cpu. It is the fraction of total pages in each zone that a hot per cpu
62106210 * pagelist can have before it gets flushed back to buddy allocator.
62116211 */
6212−static int percpu_pagelist_high_fraction_sysctl_handler(struct ctl_table *table,
6212+static int percpu_pagelist_high_fraction_sysctl_handler(const struct ctl_table *table,
62136213 int write, void *buffer, size_t *length, loff_t *ppos)
62146214 {
62156215 struct zone *zone;
mm/util.c+3−3
@@ -868,7 +868,7 @@ int sysctl_max_map_count __read_mostly = DEFAULT_MAX_MAP_COUNT; · 867 unmodified lines
868868 unsigned long sysctl_user_reserve_kbytes __read_mostly = 1UL << 17; /* 128MB */
869869 unsigned long sysctl_admin_reserve_kbytes __read_mostly = 1UL << 13; /* 8MB */
870870
871−int overcommit_ratio_handler(struct ctl_table *table, int write, void *buffer,
871+int overcommit_ratio_handler(const struct ctl_table *table, int write, void *buffer,
872872 size_t *lenp, loff_t *ppos)
873873 {
874874 int ret;
@@ -884,7 +884,7 @@ static void sync_overcommit_as(struct work_struct *dummy) · 9 unmodified lines
884884 percpu_counter_sync(&vm_committed_as);
885885 }
886886
887−int overcommit_policy_handler(struct ctl_table *table, int write, void *buffer,
887+int overcommit_policy_handler(const struct ctl_table *table, int write, void *buffer,
888888 size_t *lenp, loff_t *ppos)
889889 {
890890 struct ctl_table t;
@@ -920,7 +920,7 @@ int overcommit_policy_handler(struct ctl_table *table, int write, void *buffer, · 29 unmodified lines
920920 return ret;
921921 }
922922
923−int overcommit_kbytes_handler(struct ctl_table *table, int write, void *buffer,
923+int overcommit_kbytes_handler(const struct ctl_table *table, int write, void *buffer,
924924 size_t *lenp, loff_t *ppos)
925925 {
926926 int ret;
mm/vmstat.c+2−2
@@ -74,7 +74,7 @@ static void invalid_numa_statistics(void) · 73 unmodified lines
7474
7575 static DEFINE_MUTEX(vm_numa_stat_lock);
7676
77−int sysctl_vm_numa_stat_handler(struct ctl_table *table, int write,
77+int sysctl_vm_numa_stat_handler(const struct ctl_table *table, int write,
7878 void *buffer, size_t *length, loff_t *ppos)
7979 {
8080 int ret, oldval;
@@ -1888,7 +1888,7 @@ static void refresh_vm_stats(struct work_struct *work) · 1807 unmodified lines
18881888 refresh_cpu_vm_stats(true);
18891889 }
18901890
1891−int vmstat_refresh(struct ctl_table *table, int write,
1891+int vmstat_refresh(const struct ctl_table *table, int write,
18921892 void *buffer, size_t *lenp, loff_t *ppos)
18931893 {
18941894 long val;
net/bridge/br_netfilter_hooks.c+1−1
@@ -1189,7 +1189,7 @@ int br_nf_hook_thresh(unsigned int hook, struct net *net, · 1188 unmodified lines
11891189
11901190 #ifdef CONFIG_SYSCTL
11911191 static
1192−int brnf_sysctl_call_tables(struct ctl_table *ctl, int write,
1192+int brnf_sysctl_call_tables(const struct ctl_table *ctl, int write,
11931193 void *buffer, size_t *lenp, loff_t *ppos)
11941194 {
11951195 int ret;
net/core/neighbour.c+9−9
@@ -3543,7 +3543,7 @@ EXPORT_SYMBOL(neigh_app_ns); · 3542 unmodified lines
35433543 #ifdef CONFIG_SYSCTL
35443544 static int unres_qlen_max = INT_MAX / SKB_TRUESIZE(ETH_FRAME_LEN);
35453545
3546−static int proc_unres_qlen(struct ctl_table *ctl, int write,
3546+static int proc_unres_qlen(const struct ctl_table *ctl, int write,
35473547 void *buffer, size_t *lenp, loff_t *ppos)
35483548 {
35493549 int size, ret;
@@ -3595,7 +3595,7 @@ static void neigh_proc_update(const struct ctl_table *ctl, int write) · 45 unmodified lines
35953595 neigh_copy_dflt_parms(net, p, index);
35963596 }
35973597
3598−static int neigh_proc_dointvec_zero_intmax(struct ctl_table *ctl, int write,
3598+static int neigh_proc_dointvec_zero_intmax(const struct ctl_table *ctl, int write,
35993599 void *buffer, size_t *lenp,
36003600 loff_t *ppos)
36013601 {
@@ -3610,7 +3610,7 @@ static int neigh_proc_dointvec_zero_intmax(struct ctl_table *ctl, int write, · 8 unmodified lines
36103610 return ret;
36113611 }
36123612
3613−static int neigh_proc_dointvec_ms_jiffies_positive(struct ctl_table *ctl, int write,
3613+static int neigh_proc_dointvec_ms_jiffies_positive(const struct ctl_table *ctl, int write,
36143614 void *buffer, size_t *lenp, loff_t *ppos)
36153615 {
36163616 struct ctl_table tmp = *ctl;
@@ -3626,7 +3626,7 @@ static int neigh_proc_dointvec_ms_jiffies_positive(struct ctl_table *ctl, int wr · 9 unmodified lines
36263626 return ret;
36273627 }
36283628
3629−int neigh_proc_dointvec(struct ctl_table *ctl, int write, void *buffer,
3629+int neigh_proc_dointvec(const struct ctl_table *ctl, int write, void *buffer,
36303630 size_t *lenp, loff_t *ppos)
36313631 {
36323632 int ret = proc_dointvec(ctl, write, buffer, lenp, ppos);
@@ -3636,7 +3636,7 @@ int neigh_proc_dointvec(struct ctl_table *ctl, int write, void *buffer, · 3 unmodified lines
36363636 }
36373637 EXPORT_SYMBOL(neigh_proc_dointvec);
36383638
3639−int neigh_proc_dointvec_jiffies(struct ctl_table *ctl, int write, void *buffer,
3639+int neigh_proc_dointvec_jiffies(const struct ctl_table *ctl, int write, void *buffer,
36403640 size_t *lenp, loff_t *ppos)
36413641 {
36423642 int ret = proc_dointvec_jiffies(ctl, write, buffer, lenp, ppos);
@@ -3646,7 +3646,7 @@ int neigh_proc_dointvec_jiffies(struct ctl_table *ctl, int write, void *buffer, · 3 unmodified lines
36463646 }
36473647 EXPORT_SYMBOL(neigh_proc_dointvec_jiffies);
36483648
3649−static int neigh_proc_dointvec_userhz_jiffies(struct ctl_table *ctl, int write,
3649+static int neigh_proc_dointvec_userhz_jiffies(const struct ctl_table *ctl, int write,
36503650 void *buffer, size_t *lenp,
36513651 loff_t *ppos)
36523652 {
@@ -3656,7 +3656,7 @@ static int neigh_proc_dointvec_userhz_jiffies(struct ctl_table *ctl, int write, · 3 unmodified lines
36563656 return ret;
36573657 }
36583658
3659−int neigh_proc_dointvec_ms_jiffies(struct ctl_table *ctl, int write,
3659+int neigh_proc_dointvec_ms_jiffies(const struct ctl_table *ctl, int write,
36603660 void *buffer, size_t *lenp, loff_t *ppos)
36613661 {
36623662 int ret = proc_dointvec_ms_jiffies(ctl, write, buffer, lenp, ppos);
@@ -3666,7 +3666,7 @@ int neigh_proc_dointvec_ms_jiffies(struct ctl_table *ctl, int write, · 3 unmodified lines
36663666 }
36673667 EXPORT_SYMBOL(neigh_proc_dointvec_ms_jiffies);
36683668
3669−static int neigh_proc_dointvec_unres_qlen(struct ctl_table *ctl, int write,
3669+static int neigh_proc_dointvec_unres_qlen(const struct ctl_table *ctl, int write,
36703670 void *buffer, size_t *lenp,
36713671 loff_t *ppos)
36723672 {
@@ -3676,7 +3676,7 @@ static int neigh_proc_dointvec_unres_qlen(struct ctl_table *ctl, int write, · 3 unmodified lines
36763676 return ret;
36773677 }
36783678
3679−static int neigh_proc_base_reachable_time(struct ctl_table *ctl, int write,
3679+static int neigh_proc_base_reachable_time(const struct ctl_table *ctl, int write,
36803680 void *buffer, size_t *lenp,
36813681 loff_t *ppos)
36823682 {
net/core/sysctl_net_core.c+10−10
@@ -95,7 +95,7 @@ static struct cpumask *rps_default_mask_cow_alloc(struct net *net) · 94 unmodified lines
9595 return rps_default_mask;
9696 }
9797
98−static int rps_default_mask_sysctl(struct ctl_table *table, int write,
98+static int rps_default_mask_sysctl(const struct ctl_table *table, int write,
9999 void *buffer, size_t *lenp, loff_t *ppos)
100100 {
101101 struct net *net = (struct net *)table->data;
@@ -126,7 +126,7 @@ done: · 24 unmodified lines
126126 return err;
127127 }
128128
129−static int rps_sock_flow_sysctl(struct ctl_table *table, int write,
129+static int rps_sock_flow_sysctl(const struct ctl_table *table, int write,
130130 void *buffer, size_t *lenp, loff_t *ppos)
131131 {
132132 unsigned int orig_size, size;
@@ -198,7 +198,7 @@ static int rps_sock_flow_sysctl(struct ctl_table *table, int write, · 65 unmodified lines
198198 #ifdef CONFIG_NET_FLOW_LIMIT
199199 static DEFINE_MUTEX(flow_limit_update_mutex);
200200
201−static int flow_limit_cpu_sysctl(struct ctl_table *table, int write,
201+static int flow_limit_cpu_sysctl(const struct ctl_table *table, int write,
202202 void *buffer, size_t *lenp, loff_t *ppos)
203203 {
204204 struct sd_flow_limit *cur;
@@ -255,7 +255,7 @@ done: · 50 unmodified lines
255255 return ret;
256256 }
257257
258−static int flow_limit_table_len_sysctl(struct ctl_table *table, int write,
258+static int flow_limit_table_len_sysctl(const struct ctl_table *table, int write,
259259 void *buffer, size_t *lenp, loff_t *ppos)
260260 {
261261 unsigned int old, *ptr;
@@ -277,7 +277,7 @@ static int flow_limit_table_len_sysctl(struct ctl_table *table, int write, · 15 unmodified lines
277277 #endif /* CONFIG_NET_FLOW_LIMIT */
278278
279279 #ifdef CONFIG_NET_SCHED
280−static int set_default_qdisc(struct ctl_table *table, int write,
280+static int set_default_qdisc(const struct ctl_table *table, int write,
281281 void *buffer, size_t *lenp, loff_t *ppos)
282282 {
283283 char id[IFNAMSIZ];
@@ -296,7 +296,7 @@ static int set_default_qdisc(struct ctl_table *table, int write, · 12 unmodified lines
296296 }
297297 #endif
298298
299−static int proc_do_dev_weight(struct ctl_table *table, int write,
299+static int proc_do_dev_weight(const struct ctl_table *table, int write,
300300 void *buffer, size_t *lenp, loff_t *ppos)
301301 {
302302 static DEFINE_MUTEX(dev_weight_mutex);
@@ -314,7 +314,7 @@ static int proc_do_dev_weight(struct ctl_table *table, int write, · 11 unmodified lines
314314 return ret;
315315 }
316316
317−static int proc_do_rss_key(struct ctl_table *table, int write,
317+static int proc_do_rss_key(const struct ctl_table *table, int write,
318318 void *buffer, size_t *lenp, loff_t *ppos)
319319 {
320320 struct ctl_table fake_table;
@@ -327,7 +327,7 @@ static int proc_do_rss_key(struct ctl_table *table, int write, · 6 unmodified lines
327327 }
328328
329329 #ifdef CONFIG_BPF_JIT
330−static int proc_dointvec_minmax_bpf_enable(struct ctl_table *table, int write,
330+static int proc_dointvec_minmax_bpf_enable(const struct ctl_table *table, int write,
331331 void *buffer, size_t *lenp,
332332 loff_t *ppos)
333333 {
@@ -360,7 +360,7 @@ static int proc_dointvec_minmax_bpf_enable(struct ctl_table *table, int write, · 26 unmodified lines
360360
361361 # ifdef CONFIG_HAVE_EBPF_JIT
362362 static int
363−proc_dointvec_minmax_bpf_restricted(struct ctl_table *table, int write,
363+proc_dointvec_minmax_bpf_restricted(const struct ctl_table *table, int write,
364364 void *buffer, size_t *lenp, loff_t *ppos)
365365 {
366366 if (!capable(CAP_SYS_ADMIN))
@@ -371,7 +371,7 @@ proc_dointvec_minmax_bpf_restricted(struct ctl_table *table, int write, · 4 unmodified lines
371371 # endif /* CONFIG_HAVE_EBPF_JIT */
372372
373373 static int
374−proc_dolongvec_minmax_bpf_restricted(struct ctl_table *table, int write,
374+proc_dolongvec_minmax_bpf_restricted(const struct ctl_table *table, int write,
375375 void *buffer, size_t *lenp, loff_t *ppos)
376376 {
377377 if (!capable(CAP_SYS_ADMIN))
net/ipv4/devinet.c+3−3
@@ -2390,7 +2390,7 @@ static int devinet_conf_ifindex(struct net *net, struct ipv4_devconf *cnf) · 2389 unmodified lines
23902390 }
23912391 }
23922392
2393−static int devinet_conf_proc(struct ctl_table *ctl, int write,
2393+static int devinet_conf_proc(const struct ctl_table *ctl, int write,
23942394 void *buffer, size_t *lenp, loff_t *ppos)
23952395 {
23962396 int old_value = *(int *)ctl->data;
@@ -2442,7 +2442,7 @@ static int devinet_conf_proc(struct ctl_table *ctl, int write, · 45 unmodified lines
24422442 return ret;
24432443 }
24442444
2445−static int devinet_sysctl_forward(struct ctl_table *ctl, int write,
2445+static int devinet_sysctl_forward(const struct ctl_table *ctl, int write,
24462446 void *buffer, size_t *lenp, loff_t *ppos)
24472447 {
24482448 int *valp = ctl->data;
@@ -2489,7 +2489,7 @@ static int devinet_sysctl_forward(struct ctl_table *ctl, int write, · 40 unmodified lines
24892489 return ret;
24902490 }
24912491
2492−static int ipv4_doint_and_flush(struct ctl_table *ctl, int write,
2492+static int ipv4_doint_and_flush(const struct ctl_table *ctl, int write,
24932493 void *buffer, size_t *lenp, loff_t *ppos)
24942494 {
24952495 int *valp = ctl->data;
net/ipv4/route.c+1−1
@@ -3388,7 +3388,7 @@ static int ip_rt_gc_min_interval __read_mostly = HZ / 2; · 3387 unmodified lines
33883388 static int ip_rt_gc_elasticity __read_mostly = 8;
33893389 static int ip_min_valid_pmtu __read_mostly = IPV4_MIN_MTU;
33903390
3391−static int ipv4_sysctl_rtcache_flush(struct ctl_table *__ctl, int write,
3391+static int ipv4_sysctl_rtcache_flush(const struct ctl_table *__ctl, int write,
33923392 void *buffer, size_t *lenp, loff_t *ppos)
33933393 {
33943394 struct net *net = (struct net *)__ctl->extra1;
net/ipv4/sysctl_net_ipv4.c+15−15
@@ -62,7 +62,7 @@ static void set_local_port_range(struct net *net, unsigned int low, unsigned int · 61 unmodified lines
6262 }
6363
6464 /* Validate changes from /proc interface. */
65−static int ipv4_local_port_range(struct ctl_table *table, int write,
65+static int ipv4_local_port_range(const struct ctl_table *table, int write,
6666 void *buffer, size_t *lenp, loff_t *ppos)
6767 {
6868 struct net *net = table->data;
@@ -96,7 +96,7 @@ static int ipv4_local_port_range(struct ctl_table *table, int write, · 27 unmodified lines
9696 }
9797
9898 /* Validate changes from /proc interface. */
99−static int ipv4_privileged_ports(struct ctl_table *table, int write,
99+static int ipv4_privileged_ports(const struct ctl_table *table, int write,
100100 void *buffer, size_t *lenp, loff_t *ppos)
101101 {
102102 struct net *net = container_of(table->data, struct net,
@@ -159,7 +159,7 @@ static void set_ping_group_range(const struct ctl_table *table, · 56 unmodified lines
159159 }
160160
161161 /* Validate changes from /proc interface. */
162−static int ipv4_ping_group_range(struct ctl_table *table, int write,
162+static int ipv4_ping_group_range(const struct ctl_table *table, int write,
163163 void *buffer, size_t *lenp, loff_t *ppos)
164164 {
165165 struct user_namespace *user_ns = current_user_ns();
@@ -194,7 +194,7 @@ static int ipv4_ping_group_range(struct ctl_table *table, int write, · 28 unmodified lines
194194 return ret;
195195 }
196196
197−static int ipv4_fwd_update_priority(struct ctl_table *table, int write,
197+static int ipv4_fwd_update_priority(const struct ctl_table *table, int write,
198198 void *buffer, size_t *lenp, loff_t *ppos)
199199 {
200200 struct net *net;
@@ -210,7 +210,7 @@ static int ipv4_fwd_update_priority(struct ctl_table *table, int write, · 9 unmodified lines
210210 return ret;
211211 }
212212
213−static int proc_tcp_congestion_control(struct ctl_table *ctl, int write,
213+static int proc_tcp_congestion_control(const struct ctl_table *ctl, int write,
214214 void *buffer, size_t *lenp, loff_t *ppos)
215215 {
216216 struct net *net = container_of(ctl->data, struct net,
@@ -230,7 +230,7 @@ static int proc_tcp_congestion_control(struct ctl_table *ctl, int write, · 13 unmodified lines
230230 return ret;
231231 }
232232
233−static int proc_tcp_available_congestion_control(struct ctl_table *ctl,
233+static int proc_tcp_available_congestion_control(const struct ctl_table *ctl,
234234 int write, void *buffer,
235235 size_t *lenp, loff_t *ppos)
236236 {
@@ -246,7 +246,7 @@ static int proc_tcp_available_congestion_control(struct ctl_table *ctl, · 9 unmodified lines
246246 return ret;
247247 }
248248
249−static int proc_allowed_congestion_control(struct ctl_table *ctl,
249+static int proc_allowed_congestion_control(const struct ctl_table *ctl,
250250 int write, void *buffer,
251251 size_t *lenp, loff_t *ppos)
252252 {
@@ -283,7 +283,7 @@ static int sscanf_key(char *buf, __le32 *key) · 30 unmodified lines
283283 return ret;
284284 }
285285
286−static int proc_tcp_fastopen_key(struct ctl_table *table, int write,
286+static int proc_tcp_fastopen_key(const struct ctl_table *table, int write,
287287 void *buffer, size_t *lenp, loff_t *ppos)
288288 {
289289 struct net *net = container_of(table->data, struct net,
@@ -354,7 +354,7 @@ bad_key: · 64 unmodified lines
354354 return ret;
355355 }
356356
357−static int proc_tfo_blackhole_detect_timeout(struct ctl_table *table,
357+static int proc_tfo_blackhole_detect_timeout(const struct ctl_table *table,
358358 int write, void *buffer,
359359 size_t *lenp, loff_t *ppos)
360360 {
@@ -369,7 +369,7 @@ static int proc_tfo_blackhole_detect_timeout(struct ctl_table *table, · 8 unmodified lines
369369 return ret;
370370 }
371371
372−static int proc_tcp_available_ulp(struct ctl_table *ctl,
372+static int proc_tcp_available_ulp(const struct ctl_table *ctl,
373373 int write, void *buffer, size_t *lenp,
374374 loff_t *ppos)
375375 {
@@ -386,7 +386,7 @@ static int proc_tcp_available_ulp(struct ctl_table *ctl, · 10 unmodified lines
386386 return ret;
387387 }
388388
389−static int proc_tcp_ehash_entries(struct ctl_table *table, int write,
389+static int proc_tcp_ehash_entries(const struct ctl_table *table, int write,
390390 void *buffer, size_t *lenp, loff_t *ppos)
391391 {
392392 struct net *net = container_of(table->data, struct net,
@@ -410,7 +410,7 @@ static int proc_tcp_ehash_entries(struct ctl_table *table, int write, · 17 unmodified lines
410410 return proc_dointvec(&tbl, write, buffer, lenp, ppos);
411411 }
412412
413−static int proc_udp_hash_entries(struct ctl_table *table, int write,
413+static int proc_udp_hash_entries(const struct ctl_table *table, int write,
414414 void *buffer, size_t *lenp, loff_t *ppos)
415415 {
416416 struct net *net = container_of(table->data, struct net,
@@ -434,7 +434,7 @@ static int proc_udp_hash_entries(struct ctl_table *table, int write, · 17 unmodified lines
434434 }
435435
436436 #ifdef CONFIG_IP_ROUTE_MULTIPATH
437−static int proc_fib_multipath_hash_policy(struct ctl_table *table, int write,
437+static int proc_fib_multipath_hash_policy(const struct ctl_table *table, int write,
438438 void *buffer, size_t *lenp,
439439 loff_t *ppos)
440440 {
@@ -449,7 +449,7 @@ static int proc_fib_multipath_hash_policy(struct ctl_table *table, int write, · 8 unmodified lines
449449 return ret;
450450 }
451451
452−static int proc_fib_multipath_hash_fields(struct ctl_table *table, int write,
452+static int proc_fib_multipath_hash_fields(const struct ctl_table *table, int write,
453453 void *buffer, size_t *lenp,
454454 loff_t *ppos)
455455 {
@@ -484,7 +484,7 @@ static void proc_fib_multipath_hash_set_seed(struct net *net, u32 user_seed) · 28 unmodified lines
484484 WRITE_ONCE(net->ipv4.sysctl_fib_multipath_hash_seed, new);
485485 }
486486
487−static int proc_fib_multipath_hash_seed(struct ctl_table *table, int write,
487+static int proc_fib_multipath_hash_seed(const struct ctl_table *table, int write,
488488 void *buffer, size_t *lenp,
489489 loff_t *ppos)
490490 {
net/ipv6/addrconf.c+8−8
@@ -6309,7 +6309,7 @@ static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp) · 6308 unmodified lines
63096309
63106310 #ifdef CONFIG_SYSCTL
63116311
6312−static int addrconf_sysctl_forward(struct ctl_table *ctl, int write,
6312+static int addrconf_sysctl_forward(const struct ctl_table *ctl, int write,
63136313 void *buffer, size_t *lenp, loff_t *ppos)
63146314 {
63156315 int *valp = ctl->data;
@@ -6334,7 +6334,7 @@ static int addrconf_sysctl_forward(struct ctl_table *ctl, int write, · 18 unmodified lines
63346334 return ret;
63356335 }
63366336
6337−static int addrconf_sysctl_mtu(struct ctl_table *ctl, int write,
6337+static int addrconf_sysctl_mtu(const struct ctl_table *ctl, int write,
63386338 void *buffer, size_t *lenp, loff_t *ppos)
63396339 {
63406340 struct inet6_dev *idev = ctl->extra1;
@@ -6405,7 +6405,7 @@ static int addrconf_disable_ipv6(const struct ctl_table *table, int *p, int newf · 64 unmodified lines
64056405 return 0;
64066406 }
64076407
6408−static int addrconf_sysctl_disable(struct ctl_table *ctl, int write,
6408+static int addrconf_sysctl_disable(const struct ctl_table *ctl, int write,
64096409 void *buffer, size_t *lenp, loff_t *ppos)
64106410 {
64116411 int *valp = ctl->data;
@@ -6430,7 +6430,7 @@ static int addrconf_sysctl_disable(struct ctl_table *ctl, int write, · 18 unmodified lines
64306430 return ret;
64316431 }
64326432
6433−static int addrconf_sysctl_proxy_ndp(struct ctl_table *ctl, int write,
6433+static int addrconf_sysctl_proxy_ndp(const struct ctl_table *ctl, int write,
64346434 void *buffer, size_t *lenp, loff_t *ppos)
64356435 {
64366436 int *valp = ctl->data;
@@ -6471,7 +6471,7 @@ static int addrconf_sysctl_proxy_ndp(struct ctl_table *ctl, int write, · 34 unmodified lines
64716471 return ret;
64726472 }
64736473
6474−static int addrconf_sysctl_addr_gen_mode(struct ctl_table *ctl, int write,
6474+static int addrconf_sysctl_addr_gen_mode(const struct ctl_table *ctl, int write,
64756475 void *buffer, size_t *lenp,
64766476 loff_t *ppos)
64776477 {
@@ -6534,7 +6534,7 @@ out: · 56 unmodified lines
65346534 return ret;
65356535 }
65366536
6537−static int addrconf_sysctl_stable_secret(struct ctl_table *ctl, int write,
6537+static int addrconf_sysctl_stable_secret(const struct ctl_table *ctl, int write,
65386538 void *buffer, size_t *lenp,
65396539 loff_t *ppos)
65406540 {
@@ -6602,7 +6602,7 @@ out: · 61 unmodified lines
66026602 }
66036603
66046604 static
6605−int addrconf_sysctl_ignore_routes_with_linkdown(struct ctl_table *ctl,
6605+int addrconf_sysctl_ignore_routes_with_linkdown(const struct ctl_table *ctl,
66066606 int write, void *buffer,
66076607 size_t *lenp,
66086608 loff_t *ppos)
@@ -6702,7 +6702,7 @@ int addrconf_disable_policy(const struct ctl_table *ctl, int *valp, int val) · 93 unmodified lines
67026702 return 0;
67036703 }
67046704
6705−static int addrconf_sysctl_disable_policy(struct ctl_table *ctl, int write,
6705+static int addrconf_sysctl_disable_policy(const struct ctl_table *ctl, int write,
67066706 void *buffer, size_t *lenp, loff_t *ppos)
67076707 {
67086708 int *valp = ctl->data;
net/ipv6/ndisc.c+1−1
@@ -1951,7 +1951,7 @@ static void ndisc_warn_deprecated_sysctl(const struct ctl_table *ctl, · 1950 unmodified lines
19511951 }
19521952 }
19531953
1954−int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write, void *buffer,
1954+int ndisc_ifinfo_sysctl_change(const struct ctl_table *ctl, int write, void *buffer,
19551955 size_t *lenp, loff_t *ppos)
19561956 {
19571957 struct net_device *dev = ctl->extra1;
net/ipv6/route.c+1−1
@@ -6334,7 +6334,7 @@ static int rt6_stats_seq_show(struct seq_file *seq, void *v) · 6333 unmodified lines
63346334
63356335 #ifdef CONFIG_SYSCTL
63366336
6337−static int ipv6_sysctl_rtcache_flush(struct ctl_table *ctl, int write,
6337+static int ipv6_sysctl_rtcache_flush(const struct ctl_table *ctl, int write,
63386338 void *buffer, size_t *lenp, loff_t *ppos)
63396339 {
63406340 struct net *net;
net/ipv6/sysctl_net_ipv6.c+2−2
@@ -30,7 +30,7 @@ static u32 rt6_multipath_hash_fields_all_mask = · 29 unmodified lines
3030 static u32 ioam6_id_max = IOAM6_DEFAULT_ID;
3131 static u64 ioam6_id_wide_max = IOAM6_DEFAULT_ID_WIDE;
3232
33−static int proc_rt6_multipath_hash_policy(struct ctl_table *table, int write,
33+static int proc_rt6_multipath_hash_policy(const struct ctl_table *table, int write,
3434 void *buffer, size_t *lenp, loff_t *ppos)
3535 {
3636 struct net *net;
@@ -46,7 +46,7 @@ static int proc_rt6_multipath_hash_policy(struct ctl_table *table, int write, · 9 unmodified lines
4646 }
4747
4848 static int
49−proc_rt6_multipath_hash_fields(struct ctl_table *table, int write, void *buffer,
49+proc_rt6_multipath_hash_fields(const struct ctl_table *table, int write, void *buffer,
5050 size_t *lenp, loff_t *ppos)
5151 {
5252 struct net *net;
net/mpls/af_mpls.c+2−2
@@ -1347,7 +1347,7 @@ static int mpls_netconf_dump_devconf(struct sk_buff *skb, · 1346 unmodified lines
13471347 #define MPLS_PERDEV_SYSCTL_OFFSET(field) \
13481348 (&((struct mpls_dev *)0)->field)
13491349
1350−static int mpls_conf_proc(struct ctl_table *ctl, int write,
1350+static int mpls_conf_proc(const struct ctl_table *ctl, int write,
13511351 void *buffer, size_t *lenp, loff_t *ppos)
13521352 {
13531353 int oval = *(int *)ctl->data;
@@ -2600,7 +2600,7 @@ nolabels: · 1246 unmodified lines
26002600 return -ENOMEM;
26012601 }
26022602
2603−static int mpls_platform_labels(struct ctl_table *table, int write,
2603+static int mpls_platform_labels(const struct ctl_table *table, int write,
26042604 void *buffer, size_t *lenp, loff_t *ppos)
26052605 {
26062606 struct net *net = table->data;
net/mptcp/ctrl.c+2−2
@@ -113,7 +113,7 @@ static int mptcp_set_scheduler(const struct net *net, const char *name) · 112 unmodified lines
113113 return ret;
114114 }
115115
116−static int proc_scheduler(struct ctl_table *ctl, int write,
116+static int proc_scheduler(const struct ctl_table *ctl, int write,
117117 void *buffer, size_t *lenp, loff_t *ppos)
118118 {
119119 const struct net *net = current->nsproxy->net_ns;
@@ -133,7 +133,7 @@ static int proc_scheduler(struct ctl_table *ctl, int write, · 13 unmodified lines
133133 return ret;
134134 }
135135
136−static int proc_available_schedulers(struct ctl_table *ctl,
136+static int proc_available_schedulers(const struct ctl_table *ctl,
137137 int write, void *buffer,
138138 size_t *lenp, loff_t *ppos)
139139 {
net/netfilter/ipvs/ip_vs_ctl.c+6−6
@@ -1846,7 +1846,7 @@ static int ip_vs_zero_all(struct netns_ipvs *ipvs) · 1845 unmodified lines
18461846 #ifdef CONFIG_SYSCTL
18471847
18481848 static int
1849−proc_do_defense_mode(struct ctl_table *table, int write,
1849+proc_do_defense_mode(const struct ctl_table *table, int write,
18501850 void *buffer, size_t *lenp, loff_t *ppos)
18511851 {
18521852 struct netns_ipvs *ipvs = table->extra2;
@@ -1873,7 +1873,7 @@ proc_do_defense_mode(struct ctl_table *table, int write, · 20 unmodified lines
18731873 }
18741874
18751875 static int
1876−proc_do_sync_threshold(struct ctl_table *table, int write,
1876+proc_do_sync_threshold(const struct ctl_table *table, int write,
18771877 void *buffer, size_t *lenp, loff_t *ppos)
18781878 {
18791879 struct netns_ipvs *ipvs = table->extra2;
@@ -1901,7 +1901,7 @@ proc_do_sync_threshold(struct ctl_table *table, int write, · 21 unmodified lines
19011901 }
19021902
19031903 static int
1904−proc_do_sync_ports(struct ctl_table *table, int write,
1904+proc_do_sync_ports(const struct ctl_table *table, int write,
19051905 void *buffer, size_t *lenp, loff_t *ppos)
19061906 {
19071907 int *valp = table->data;
@@ -1984,7 +1984,7 @@ static int ipvs_proc_est_cpumask_get(const struct ctl_table *table, · 76 unmodified lines
19841984 return ret;
19851985 }
19861986
1987−static int ipvs_proc_est_cpulist(struct ctl_table *table, int write,
1987+static int ipvs_proc_est_cpulist(const struct ctl_table *table, int write,
19881988 void *buffer, size_t *lenp, loff_t *ppos)
19891989 {
19901990 int ret;
@@ -2011,7 +2011,7 @@ static int ipvs_proc_est_cpulist(struct ctl_table *table, int write, · 20 unmodified lines
20112011 return ret;
20122012 }
20132013
2014−static int ipvs_proc_est_nice(struct ctl_table *table, int write,
2014+static int ipvs_proc_est_nice(const struct ctl_table *table, int write,
20152015 void *buffer, size_t *lenp, loff_t *ppos)
20162016 {
20172017 struct netns_ipvs *ipvs = table->extra2;
@@ -2041,7 +2041,7 @@ static int ipvs_proc_est_nice(struct ctl_table *table, int write, · 23 unmodified lines
20412041 return ret;
20422042 }
20432043
2044−static int ipvs_proc_run_estimation(struct ctl_table *table, int write,
2044+static int ipvs_proc_run_estimation(const struct ctl_table *table, int write,
20452045 void *buffer, size_t *lenp, loff_t *ppos)
20462046 {
20472047 struct netns_ipvs *ipvs = table->extra2;
net/netfilter/nf_conntrack_standalone.c+1−1
@@ -524,7 +524,7 @@ EXPORT_SYMBOL_GPL(nf_conntrack_count); · 523 unmodified lines
524524 static unsigned int nf_conntrack_htable_size_user __read_mostly;
525525
526526 static int
527−nf_conntrack_hash_sysctl(struct ctl_table *table, int write,
527+nf_conntrack_hash_sysctl(const struct ctl_table *table, int write,
528528 void *buffer, size_t *lenp, loff_t *ppos)
529529 {
530530 int ret;
net/netfilter/nf_hooks_lwtunnel.c+1−1
@@ -28,7 +28,7 @@ static inline int nf_hooks_lwtunnel_set(int enable) · 27 unmodified lines
2828 }
2929
3030 #ifdef CONFIG_SYSCTL
31−int nf_hooks_lwtunnel_sysctl_handler(struct ctl_table *table, int write,
31+int nf_hooks_lwtunnel_sysctl_handler(const struct ctl_table *table, int write,
3232 void *buffer, size_t *lenp, loff_t *ppos)
3333 {
3434 int proc_nf_hooks_lwtunnel_enabled = 0;
net/netfilter/nf_log.c+1−1
@@ -408,7 +408,7 @@ static struct ctl_table nf_log_sysctl_ftable[] = { · 407 unmodified lines
408408 },
409409 };
410410
411−static int nf_log_proc_dostring(struct ctl_table *table, int write,
411+static int nf_log_proc_dostring(const struct ctl_table *table, int write,
412412 void *buffer, size_t *lenp, loff_t *ppos)
413413 {
414414 const struct nf_logger *logger;
net/phonet/sysctl.c+1−1
@@ -48,7 +48,7 @@ void phonet_get_local_port_range(int *min, int *max) · 47 unmodified lines
4848 } while (read_seqretry(&local_port_range_lock, seq));
4949 }
5050
51−static int proc_local_port_range(struct ctl_table *table, int write,
51+static int proc_local_port_range(const struct ctl_table *table, int write,
5252 void *buffer, size_t *lenp, loff_t *ppos)
5353 {
5454 int ret;
net/rds/tcp.c+2−2
@@ -61,7 +61,7 @@ static atomic_t rds_tcp_unloading = ATOMIC_INIT(0); · 60 unmodified lines
6161
6262 static struct kmem_cache *rds_tcp_conn_slab;
6363
64−static int rds_tcp_skbuf_handler(struct ctl_table *ctl, int write,
64+static int rds_tcp_skbuf_handler(const struct ctl_table *ctl, int write,
6565 void *buffer, size_t *lenp, loff_t *fpos);
6666
6767 static int rds_tcp_min_sndbuf = SOCK_MIN_SNDBUF;
@@ -682,7 +682,7 @@ static void rds_tcp_sysctl_reset(struct net *net) · 614 unmodified lines
682682 spin_unlock_irq(&rds_tcp_conn_lock);
683683 }
684684
685−static int rds_tcp_skbuf_handler(struct ctl_table *ctl, int write,
685+static int rds_tcp_skbuf_handler(const struct ctl_table *ctl, int write,
686686 void *buffer, size_t *lenp, loff_t *fpos)
687687 {
688688 struct net *net = current->nsproxy->net_ns;
net/sctp/sysctl.c+14−14
@@ -43,19 +43,19 @@ static unsigned long max_autoclose_max = · 42 unmodified lines
4343 (MAX_SCHEDULE_TIMEOUT / HZ > UINT_MAX)
4444 ? UINT_MAX : MAX_SCHEDULE_TIMEOUT / HZ;
4545
46−static int proc_sctp_do_hmac_alg(struct ctl_table *ctl, int write,
46+static int proc_sctp_do_hmac_alg(const struct ctl_table *ctl, int write,
4747 void *buffer, size_t *lenp, loff_t *ppos);
48−static int proc_sctp_do_rto_min(struct ctl_table *ctl, int write,
48+static int proc_sctp_do_rto_min(const struct ctl_table *ctl, int write,
4949 void *buffer, size_t *lenp, loff_t *ppos);
50−static int proc_sctp_do_rto_max(struct ctl_table *ctl, int write, void *buffer,
50+static int proc_sctp_do_rto_max(const struct ctl_table *ctl, int write, void *buffer,
5151 size_t *lenp, loff_t *ppos);
52−static int proc_sctp_do_udp_port(struct ctl_table *ctl, int write, void *buffer,
52+static int proc_sctp_do_udp_port(const struct ctl_table *ctl, int write, void *buffer,
5353 size_t *lenp, loff_t *ppos);
54−static int proc_sctp_do_alpha_beta(struct ctl_table *ctl, int write,
54+static int proc_sctp_do_alpha_beta(const struct ctl_table *ctl, int write,
5555 void *buffer, size_t *lenp, loff_t *ppos);
56−static int proc_sctp_do_auth(struct ctl_table *ctl, int write,
56+static int proc_sctp_do_auth(const struct ctl_table *ctl, int write,
5757 void *buffer, size_t *lenp, loff_t *ppos);
58−static int proc_sctp_do_probe_interval(struct ctl_table *ctl, int write,
58+static int proc_sctp_do_probe_interval(const struct ctl_table *ctl, int write,
5959 void *buffer, size_t *lenp, loff_t *ppos);
6060
6161 static struct ctl_table sctp_table[] = {
@@ -384,7 +384,7 @@ static struct ctl_table sctp_net_table[] = { · 322 unmodified lines
384384 },
385385 };
386386
387−static int proc_sctp_do_hmac_alg(struct ctl_table *ctl, int write,
387+static int proc_sctp_do_hmac_alg(const struct ctl_table *ctl, int write,
388388 void *buffer, size_t *lenp, loff_t *ppos)
389389 {
390390 struct net *net = current->nsproxy->net_ns;
@@ -429,7 +429,7 @@ static int proc_sctp_do_hmac_alg(struct ctl_table *ctl, int write, · 38 unmodified lines
429429 return ret;
430430 }
431431
432−static int proc_sctp_do_rto_min(struct ctl_table *ctl, int write,
432+static int proc_sctp_do_rto_min(const struct ctl_table *ctl, int write,
433433 void *buffer, size_t *lenp, loff_t *ppos)
434434 {
435435 struct net *net = current->nsproxy->net_ns;
@@ -457,7 +457,7 @@ static int proc_sctp_do_rto_min(struct ctl_table *ctl, int write, · 21 unmodified lines
457457 return ret;
458458 }
459459
460−static int proc_sctp_do_rto_max(struct ctl_table *ctl, int write,
460+static int proc_sctp_do_rto_max(const struct ctl_table *ctl, int write,
461461 void *buffer, size_t *lenp, loff_t *ppos)
462462 {
463463 struct net *net = current->nsproxy->net_ns;
@@ -485,7 +485,7 @@ static int proc_sctp_do_rto_max(struct ctl_table *ctl, int write, · 21 unmodified lines
485485 return ret;
486486 }
487487
488−static int proc_sctp_do_alpha_beta(struct ctl_table *ctl, int write,
488+static int proc_sctp_do_alpha_beta(const struct ctl_table *ctl, int write,
489489 void *buffer, size_t *lenp, loff_t *ppos)
490490 {
491491 if (write)
@@ -495,7 +495,7 @@ static int proc_sctp_do_alpha_beta(struct ctl_table *ctl, int write, · 3 unmodified lines
495495 return proc_dointvec_minmax(ctl, write, buffer, lenp, ppos);
496496 }
497497
498−static int proc_sctp_do_auth(struct ctl_table *ctl, int write,
498+static int proc_sctp_do_auth(const struct ctl_table *ctl, int write,
499499 void *buffer, size_t *lenp, loff_t *ppos)
500500 {
501501 struct net *net = current->nsproxy->net_ns;
@@ -524,7 +524,7 @@ static int proc_sctp_do_auth(struct ctl_table *ctl, int write, · 22 unmodified lines
524524 return ret;
525525 }
526526
527−static int proc_sctp_do_udp_port(struct ctl_table *ctl, int write,
527+static int proc_sctp_do_udp_port(const struct ctl_table *ctl, int write,
528528 void *buffer, size_t *lenp, loff_t *ppos)
529529 {
530530 struct net *net = current->nsproxy->net_ns;
@@ -565,7 +565,7 @@ static int proc_sctp_do_udp_port(struct ctl_table *ctl, int write, · 34 unmodified lines
565565 return ret;
566566 }
567567
568−static int proc_sctp_do_probe_interval(struct ctl_table *ctl, int write,
568+static int proc_sctp_do_probe_interval(const struct ctl_table *ctl, int write,
569569 void *buffer, size_t *lenp, loff_t *ppos)
570570 {
571571 struct net *net = current->nsproxy->net_ns;
net/sunrpc/sysctl.c+2−2
@@ -40,7 +40,7 @@ EXPORT_SYMBOL_GPL(nlm_debug); · 39 unmodified lines
4040
4141 #if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
4242
43−static int proc_do_xprt(struct ctl_table *table, int write,
43+static int proc_do_xprt(const struct ctl_table *table, int write,
4444 void *buffer, size_t *lenp, loff_t *ppos)
4545 {
4646 char tmpbuf[256];
@@ -62,7 +62,7 @@ static int proc_do_xprt(struct ctl_table *table, int write, · 15 unmodified lines
6262 }
6363
6464 static int
65−proc_dodebug(struct ctl_table *table, int write, void *buffer, size_t *lenp,
65+proc_dodebug(const struct ctl_table *table, int write, void *buffer, size_t *lenp,
6666 loff_t *ppos)
6767 {
6868 char tmpbuf[20], *s = NULL;
net/sunrpc/xprtrdma/svc_rdma.c+1−1
@@ -74,7 +74,7 @@ enum { · 73 unmodified lines
7474 SVCRDMA_COUNTER_BUFSIZ = sizeof(unsigned long long),
7575 };
7676
77−static int svcrdma_counter_handler(struct ctl_table *table, int write,
77+static int svcrdma_counter_handler(const struct ctl_table *table, int write,
7878 void *buffer, size_t *lenp, loff_t *ppos)
7979 {
8080 struct percpu_counter *stat = (struct percpu_counter *)table->data;
security/apparmor/lsm.c+1−1
@@ -2029,7 +2029,7 @@ static int __init alloc_buffers(void) · 2028 unmodified lines
20292029 }
20302030
20312031 #ifdef CONFIG_SYSCTL
2032−static int apparmor_dointvec(struct ctl_table *table, int write,
2032+static int apparmor_dointvec(const struct ctl_table *table, int write,
20332033 void *buffer, size_t *lenp, loff_t *ppos)
20342034 {
20352035 if (!aa_current_policy_admin_capable(NULL))
security/min_addr.c+1−1
@@ -29,7 +29,7 @@ static void update_mmap_min_addr(void) · 28 unmodified lines
2929 * sysctl handler which just sets dac_mmap_min_addr = the new value and then
3030 * calls update_mmap_min_addr() so non MAP_FIXED hints get rounded properly
3131 */
32−int mmap_min_addr_handler(struct ctl_table *table, int write,
32+int mmap_min_addr_handler(const struct ctl_table *table, int write,
3333 void *buffer, size_t *lenp, loff_t *ppos)
3434 {
3535 int ret;
security/yama/yama_lsm.c+1−1
@@ -436,7 +436,7 @@ static struct security_hook_list yama_hooks[] __ro_after_init = { · 435 unmodified lines
436436 };
437437
438438 #ifdef CONFIG_SYSCTL
439−static int yama_dointvec_minmax(struct ctl_table *table, int write,
439+static int yama_dointvec_minmax(const struct ctl_table *table, int write,
440440 void *buffer, size_t *lenp, loff_t *ppos)
441441 {
442442 struct ctl_table table_copy;