History

Merge branch 'work.sysctl' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull in Christoph Hellwig's series that changes the sysctl's ->proc_handler methods to take kernel pointers instead. It gets rid of the set_fs address space overrides used by BPF. As per discussion, pull in the feature branch into bpf-next as it relates to BPF sysctl progs.

Daniel Borkmann committed 6 years ago

Commit 0b541422 parents 8c1b2bf 329273991 files · +2241 −2505Browse files

Showing the changes to include/linux (21 of 91 files). Show all

Unified · Split

21 files
  1. include/linux/bpf-cgroup.h +4 −5
  2. include/linux/compaction.h +1 −1
  3. include/linux/coredump.h +4 −0
  4. include/linux/file.h +2 −0
  5. include/linux/fs.h +3 −3
  6. include/linux/ftrace.h +1 −2
  7. include/linux/hugetlb.h +7 −8
  8. include/linux/kprobes.h +1 −1
  9. include/linux/latencytop.h +2 −2
  10. include/linux/mm.h +8 −6
  11. include/linux/mmzone.h +13 −14
  12. include/linux/nmi.h +5 −10
  13. include/linux/perf_event.h +5 −8
  14. include/linux/pid.h +3 −0
  15. include/linux/printk.h +1 −1
  16. include/linux/sched/sysctl.h +15 −29
  17. include/linux/security.h +1 −1
  18. include/linux/sysctl.h +30 −31
  19. include/linux/timer.h +1 −2
  20. include/linux/vmstat.h +4 −4
  21. include/linux/writeback.h +11 −17
include/linux/bpf-cgroup.h+4−5
@@ -138,8 +138,7 @@ int __cgroup_bpf_check_dev_permission(short dev_type, u32 major, u32 minor, · 137 unmodified lines
138138
139139 int __cgroup_bpf_run_filter_sysctl(struct ctl_table_header *head,
140140 struct ctl_table *table, int write,
141− void __user *buf, size_t *pcount,
142− loff_t *ppos, void **new_buf,
141+ void **buf, size_t *pcount, loff_t *ppos,
143142 enum bpf_attach_type type);
144143
145144 int __cgroup_bpf_run_filter_setsockopt(struct sock *sock, int *level,
@@ -302,12 +301,12 @@ int bpf_percpu_cgroup_storage_update(struct bpf_map *map, void *key, · 156 unmodified lines
302301 })
303302
304303
305−#define BPF_CGROUP_RUN_PROG_SYSCTL(head, table, write, buf, count, pos, nbuf) \
304+#define BPF_CGROUP_RUN_PROG_SYSCTL(head, table, write, buf, count, pos) \
306305 ({ \
307306 int __ret = 0; \
308307 if (cgroup_bpf_enabled) \
309308 __ret = __cgroup_bpf_run_filter_sysctl(head, table, write, \
310− buf, count, pos, nbuf, \
309+ buf, count, pos, \
311310 BPF_CGROUP_SYSCTL); \
312311 __ret; \
313312 })
@@ -429,7 +428,7 @@ static inline int bpf_percpu_cgroup_storage_update(struct bpf_map *map, · 115 unmodified lines
429428 #define BPF_CGROUP_RUN_PROG_UDP6_RECVMSG_LOCK(sk, uaddr) ({ 0; })
430429 #define BPF_CGROUP_RUN_PROG_SOCK_OPS(sock_ops) ({ 0; })
431430 #define BPF_CGROUP_RUN_PROG_DEVICE_CGROUP(type,major,minor,access) ({ 0; })
432−#define BPF_CGROUP_RUN_PROG_SYSCTL(head,table,write,buf,count,pos,nbuf) ({ 0; })
431+#define BPF_CGROUP_RUN_PROG_SYSCTL(head,table,write,buf,count,pos) ({ 0; })
433432 #define BPF_CGROUP_GETSOCKOPT_MAX_OPTLEN(optlen) ({ 0; })
434433 #define BPF_CGROUP_RUN_PROG_GETSOCKOPT(sock, level, optname, optval, \
435434 optlen, max_optlen, retval) ({ retval; })
include/linux/compaction.h+1−1
@@ -86,7 +86,7 @@ static inline unsigned long compact_gap(unsigned int order) · 85 unmodified lines
8686 #ifdef CONFIG_COMPACTION
8787 extern int sysctl_compact_memory;
8888 extern int sysctl_compaction_handler(struct ctl_table *table, int write,
89− void __user *buffer, size_t *length, loff_t *ppos);
89+ void *buffer, size_t *length, loff_t *ppos);
9090 extern int sysctl_extfrag_threshold;
9191 extern int sysctl_compact_unevictable_allowed;
9292
include/linux/coredump.h+4−0
@@ -22,4 +22,8 @@ extern void do_coredump(const kernel_siginfo_t *siginfo); · 21 unmodified lines
2222 static inline void do_coredump(const kernel_siginfo_t *siginfo) {}
2323 #endif
2424
25+extern int core_uses_pid;
26+extern char core_pattern[];
27+extern unsigned int core_pipe_limit;
28+
2529 #endif /* _LINUX_COREDUMP_H */
include/linux/file.h+2−0
@@ -94,4 +94,6 @@ extern void fd_install(unsigned int fd, struct file *file); · 93 unmodified lines
9494 extern void flush_delayed_fput(void);
9595 extern void __fput_sync(struct file *);
9696
97+extern unsigned int sysctl_nr_open_min, sysctl_nr_open_max;
98+
9799 #endif /* __LINUX_FILE_H */
include/linux/fs.h+3−3
@@ -3536,11 +3536,11 @@ ssize_t simple_attr_write(struct file *file, const char __user *buf, · 3535 unmodified lines
35363536
35373537 struct ctl_table;
35383538 int proc_nr_files(struct ctl_table *table, int write,
3539− void __user *buffer, size_t *lenp, loff_t *ppos);
3539+ void *buffer, size_t *lenp, loff_t *ppos);
35403540 int proc_nr_dentry(struct ctl_table *table, int write,
3541− void __user *buffer, size_t *lenp, loff_t *ppos);
3541+ void *buffer, size_t *lenp, loff_t *ppos);
35423542 int proc_nr_inodes(struct ctl_table *table, int write,
3543− void __user *buffer, size_t *lenp, loff_t *ppos);
3543+ void *buffer, size_t *lenp, loff_t *ppos);
35443544 int __init get_filesystem_list(char *buf);
35453545
35463546 #define __FMODE_EXEC ((__force int) FMODE_EXEC)
include/linux/ftrace.h+1−2
@@ -1005,8 +1005,7 @@ extern void disable_trace_on_warning(void); · 1004 unmodified lines
10051005 extern int __disable_trace_on_warning;
10061006
10071007 int tracepoint_printk_sysctl(struct ctl_table *table, int write,
1008− void __user *buffer, size_t *lenp,
1009− loff_t *ppos);
1008+ void *buffer, size_t *lenp, loff_t *ppos);
10101009
10111010 #else /* CONFIG_TRACING */
10121011 static inline void disable_trace_on_warning(void) { }
include/linux/hugetlb.h+7−8
@@ -105,14 +105,13 @@ struct hugepage_subpool *hugepage_new_subpool(struct hstate *h, long max_hpages, · 104 unmodified lines
105105 void hugepage_put_subpool(struct hugepage_subpool *spool);
106106
107107 void reset_vma_resv_huge_pages(struct vm_area_struct *vma);
108−int hugetlb_sysctl_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *);
109−int hugetlb_overcommit_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *);
110−int hugetlb_treat_movable_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *);
111−
112−#ifdef CONFIG_NUMA
113−int hugetlb_mempolicy_sysctl_handler(struct ctl_table *, int,
114− void __user *, size_t *, loff_t *);
115−#endif
108+int hugetlb_sysctl_handler(struct ctl_table *, int, void *, size_t *, loff_t *);
109+int hugetlb_overcommit_handler(struct ctl_table *, int, void *, size_t *,
110+ loff_t *);
111+int hugetlb_treat_movable_handler(struct ctl_table *, int, void *, size_t *,
112+ loff_t *);
113+int hugetlb_mempolicy_sysctl_handler(struct ctl_table *, int, void *, size_t *,
114+ loff_t *);
116115
117116 int copy_hugetlb_page_range(struct mm_struct *, struct mm_struct *, struct vm_area_struct *);
118117 long follow_hugetlb_page(struct mm_struct *, struct vm_area_struct *,
include/linux/kprobes.h+1−1
@@ -312,7 +312,7 @@ DEFINE_INSN_CACHE_OPS(optinsn); · 311 unmodified lines
312312 #ifdef CONFIG_SYSCTL
313313 extern int sysctl_kprobes_optimization;
314314 extern int proc_kprobes_optimization_handler(struct ctl_table *table,
315− int write, void __user *buffer,
315+ int write, void *buffer,
316316 size_t *length, loff_t *ppos);
317317 #endif
318318 extern void wait_for_kprobe_optimizer(void);
include/linux/latencytop.h+2−2
@@ -38,8 +38,8 @@ account_scheduler_latency(struct task_struct *task, int usecs, int inter) · 37 unmodified lines
3838
3939 void clear_tsk_latency_tracing(struct task_struct *p);
4040
41−extern int sysctl_latencytop(struct ctl_table *table, int write,
42− void __user *buffer, size_t *lenp, loff_t *ppos);
41+int sysctl_latencytop(struct ctl_table *table, int write, void *buffer,
42+ size_t *lenp, loff_t *ppos);
4343
4444 #else
4545
include/linux/mm.h+8−6
@@ -201,10 +201,10 @@ extern int sysctl_overcommit_memory; · 200 unmodified lines
201201 extern int sysctl_overcommit_ratio;
202202 extern unsigned long sysctl_overcommit_kbytes;
203203
204−extern int overcommit_ratio_handler(struct ctl_table *, int, void __user *,
205− size_t *, loff_t *);
206−extern int overcommit_kbytes_handler(struct ctl_table *, int, void __user *,
207− size_t *, loff_t *);
204+int overcommit_ratio_handler(struct ctl_table *, int, void *, size_t *,
205+ loff_t *);
206+int overcommit_kbytes_handler(struct ctl_table *, int, void *, size_t *,
207+ loff_t *);
208208
209209 #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))
210210
@@ -2957,8 +2957,8 @@ extern bool process_shares_mm(struct task_struct *p, struct mm_struct *mm); · 2746 unmodified lines
29572957
29582958 #ifdef CONFIG_SYSCTL
29592959 extern int sysctl_drop_caches;
2960−int drop_caches_sysctl_handler(struct ctl_table *, int,
2961− void __user *, size_t *, loff_t *);
2960+int drop_caches_sysctl_handler(struct ctl_table *, int, void *, size_t *,
2961+ loff_t *);
29622962 #endif
29632963
29642964 void drop_slab(void);
@@ -3140,5 +3140,7 @@ unsigned long wp_shared_mapping_range(struct address_space *mapping, · 175 unmodified lines
31403140 pgoff_t first_index, pgoff_t nr);
31413141 #endif
31423142
3143+extern int sysctl_nr_trim_pages;
3144+
31433145 #endif /* __KERNEL__ */
31443146 #endif /* _LINUX_MM_H */
include/linux/mmzone.h+13−14
@@ -909,24 +909,23 @@ static inline int is_highmem(struct zone *zone) · 908 unmodified lines
909909
910910 /* These two functions are used to setup the per zone pages min values */
911911 struct ctl_table;
912−int min_free_kbytes_sysctl_handler(struct ctl_table *, int,
913− void __user *, size_t *, loff_t *);
914−int watermark_boost_factor_sysctl_handler(struct ctl_table *, int,
915− void __user *, size_t *, loff_t *);
916−int watermark_scale_factor_sysctl_handler(struct ctl_table *, int,
917− void __user *, size_t *, loff_t *);
912+
913+int min_free_kbytes_sysctl_handler(struct ctl_table *, int, void *, size_t *,
914+ loff_t *);
915+int watermark_scale_factor_sysctl_handler(struct ctl_table *, int, void *,
916+ size_t *, loff_t *);
918917 extern int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES];
919−int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int,
920− void __user *, size_t *, loff_t *);
918+int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int, void *,
919+ size_t *, loff_t *);
921920 int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *, int,
922− void __user *, size_t *, loff_t *);
921+ void *, size_t *, loff_t *);
923922 int sysctl_min_unmapped_ratio_sysctl_handler(struct ctl_table *, int,
924− void __user *, size_t *, loff_t *);
923+ void *, size_t *, loff_t *);
925924 int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *, int,
926− void __user *, size_t *, loff_t *);
927−
928−extern int numa_zonelist_order_handler(struct ctl_table *, int,
929− void __user *, size_t *, loff_t *);
925+ void *, size_t *, loff_t *);
926+int numa_zonelist_order_handler(struct ctl_table *, int,
927+ void *, size_t *, loff_t *);
928+extern int percpu_pagelist_fraction;
930929 extern char numa_zonelist_order[];
931930 #define NUMA_ZONELIST_ORDER_LEN 16
932931
include/linux/nmi.h+5−10
@@ -202,16 +202,11 @@ static inline void watchdog_update_hrtimer_threshold(u64 period) { } · 201 unmodified lines
202202 #endif
203203
204204 struct ctl_table;
205−extern int proc_watchdog(struct ctl_table *, int ,
206− void __user *, size_t *, loff_t *);
207−extern int proc_nmi_watchdog(struct ctl_table *, int ,
208− void __user *, size_t *, loff_t *);
209−extern int proc_soft_watchdog(struct ctl_table *, int ,
210− void __user *, size_t *, loff_t *);
211−extern int proc_watchdog_thresh(struct ctl_table *, int ,
212− void __user *, size_t *, loff_t *);
213−extern int proc_watchdog_cpumask(struct ctl_table *, int,
214− void __user *, size_t *, loff_t *);
205+int proc_watchdog(struct ctl_table *, int, void *, size_t *, loff_t *);
206+int proc_nmi_watchdog(struct ctl_table *, int , void *, size_t *, loff_t *);
207+int proc_soft_watchdog(struct ctl_table *, int , void *, size_t *, loff_t *);
208+int proc_watchdog_thresh(struct ctl_table *, int , void *, size_t *, loff_t *);
209+int proc_watchdog_cpumask(struct ctl_table *, int, void *, size_t *, loff_t *);
215210
216211 #ifdef CONFIG_HAVE_ACPI_APEI_NMI
217212 #include <asm/nmi.h>
include/linux/perf_event.h+5−8
@@ -1280,15 +1280,12 @@ extern int sysctl_perf_cpu_time_max_percent; · 1279 unmodified lines
12801280
12811281 extern void perf_sample_event_took(u64 sample_len_ns);
12821282
1283−extern int perf_proc_update_handler(struct ctl_table *table, int write,
1284− void __user *buffer, size_t *lenp,
1285− loff_t *ppos);
1286−extern int perf_cpu_time_max_percent_handler(struct ctl_table *table, int write,
1287− void __user *buffer, size_t *lenp,
1288− loff_t *ppos);
1289−
1283+int perf_proc_update_handler(struct ctl_table *table, int write,
1284+ void *buffer, size_t *lenp, loff_t *ppos);
1285+int perf_cpu_time_max_percent_handler(struct ctl_table *table, int write,
1286+ void *buffer, size_t *lenp, loff_t *ppos);
12901287 int perf_event_max_stack_handler(struct ctl_table *table, int write,
1291− void __user *buffer, size_t *lenp, loff_t *ppos);
1288+ void *buffer, size_t *lenp, loff_t *ppos);
12921289
12931290 /* Access to perf_event_open(2) syscall. */
12941291 #define PERF_SECURITY_OPEN 0
include/linux/pid.h+3−0
@@ -108,6 +108,9 @@ extern void transfer_pid(struct task_struct *old, struct task_struct *new, · 107 unmodified lines
108108 struct pid_namespace;
109109 extern struct pid_namespace init_pid_ns;
110110
111+extern int pid_max;
112+extern int pid_max_min, pid_max_max;
113+
111114 /*
112115 * look up a PID in the hash table. Must be called with the tasklist_lock
113116 * or rcu_read_lock() held.
include/linux/printk.h+1−1
@@ -189,7 +189,7 @@ extern int printk_delay_msec; · 188 unmodified lines
189189 extern int dmesg_restrict;
190190
191191 extern int
192−devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write, void __user *buf,
192+devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write, void *buf,
193193 size_t *lenp, loff_t *ppos);
194194
195195 extern void wake_up_klogd(void);
include/linux/sched/sysctl.h+15−29
@@ -12,9 +12,8 @@ extern unsigned int sysctl_hung_task_panic; · 11 unmodified lines
1212 extern unsigned long sysctl_hung_task_timeout_secs;
1313 extern unsigned long sysctl_hung_task_check_interval_secs;
1414 extern int sysctl_hung_task_warnings;
15−extern int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,
16− void __user *buffer,
17− size_t *lenp, loff_t *ppos);
15+int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,
16+ void *buffer, size_t *lenp, loff_t *ppos);
1817 #else
1918 /* Avoid need for ifdefs elsewhere in the code */
2019 enum { sysctl_hung_task_timeout_secs = 0 };
@@ -43,8 +42,7 @@ extern __read_mostly unsigned int sysctl_sched_migration_cost; · 22 unmodified lines
4342 extern __read_mostly unsigned int sysctl_sched_nr_migrate;
4443
4544 int sched_proc_update_handler(struct ctl_table *table, int write,
46− void __user *buffer, size_t *length,
47− loff_t *ppos);
45+ void *buffer, size_t *length, loff_t *ppos);
4846 #endif
4947
5048 /*
@@ -72,33 +70,21 @@ extern unsigned int sysctl_sched_autogroup_enabled; · 21 unmodified lines
7270 extern int sysctl_sched_rr_timeslice;
7371 extern int sched_rr_timeslice;
7472
75−extern int sched_rr_handler(struct ctl_table *table, int write,
76− void __user *buffer, size_t *lenp,
77− loff_t *ppos);
78−
79−extern int sched_rt_handler(struct ctl_table *table, int write,
80− void __user *buffer, size_t *lenp,
81− loff_t *ppos);
82−
83−#ifdef CONFIG_UCLAMP_TASK
84−extern int sysctl_sched_uclamp_handler(struct ctl_table *table, int write,
85− void __user *buffer, size_t *lenp,
86− loff_t *ppos);
87−#endif
88−
89−extern int sysctl_numa_balancing(struct ctl_table *table, int write,
90− void __user *buffer, size_t *lenp,
91− loff_t *ppos);
92−
93−extern int sysctl_schedstats(struct ctl_table *table, int write,
94− void __user *buffer, size_t *lenp,
95− loff_t *ppos);
73+int sched_rr_handler(struct ctl_table *table, int write, void *buffer,
74+ size_t *lenp, loff_t *ppos);
75+int sched_rt_handler(struct ctl_table *table, int write, void *buffer,
76+ size_t *lenp, loff_t *ppos);
77+int sysctl_sched_uclamp_handler(struct ctl_table *table, int write,
78+ void *buffer, size_t *lenp, loff_t *ppos);
79+int sysctl_numa_balancing(struct ctl_table *table, int write, void *buffer,
80+ size_t *lenp, loff_t *ppos);
81+int sysctl_schedstats(struct ctl_table *table, int write, void *buffer,
82+ size_t *lenp, loff_t *ppos);
9683
9784 #if defined(CONFIG_ENERGY_MODEL) && defined(CONFIG_CPU_FREQ_GOV_SCHEDUTIL)
9885 extern unsigned int sysctl_sched_energy_aware;
99−extern int sched_energy_aware_handler(struct ctl_table *table, int write,
100− void __user *buffer, size_t *lenp,
101− loff_t *ppos);
86+int sched_energy_aware_handler(struct ctl_table *table, int write,
87+ void *buffer, size_t *lenp, loff_t *ppos);
10288 #endif
10389
10490 #endif /* _LINUX_SCHED_SYSCTL_H */
include/linux/security.h+1−1
@@ -211,7 +211,7 @@ struct request_sock; · 210 unmodified lines
211211
212212 #ifdef CONFIG_MMU
213213 extern int mmap_min_addr_handler(struct ctl_table *table, int write,
214− void __user *buffer, size_t *lenp, loff_t *ppos);
214+ void *buffer, size_t *lenp, loff_t *ppos);
215215 #endif
216216
217217 /* security_inode_init_security callback function to write xattrs */
include/linux/sysctl.h+30−31
@@ -44,35 +44,26 @@ struct ctl_dir; · 43 unmodified lines
4444
4545 extern const int sysctl_vals[];
4646
47−typedef int proc_handler (struct ctl_table *ctl, int write,
48− void __user *buffer, size_t *lenp, loff_t *ppos);
49−
50−extern int proc_dostring(struct ctl_table *, int,
51− void __user *, size_t *, loff_t *);
52−extern int proc_dointvec(struct ctl_table *, int,
53− void __user *, size_t *, loff_t *);
54−extern int proc_douintvec(struct ctl_table *, int,
55− void __user *, size_t *, loff_t *);
56−extern int proc_dointvec_minmax(struct ctl_table *, int,
57− void __user *, size_t *, loff_t *);
58−extern int proc_douintvec_minmax(struct ctl_table *table, int write,
59− void __user *buffer, size_t *lenp,
60− loff_t *ppos);
61−extern int proc_dointvec_jiffies(struct ctl_table *, int,
62− void __user *, size_t *, loff_t *);
63−extern int proc_dointvec_userhz_jiffies(struct ctl_table *, int,
64− void __user *, size_t *, loff_t *);
65−extern int proc_dointvec_ms_jiffies(struct ctl_table *, int,
66− void __user *, size_t *, loff_t *);
67−extern int proc_doulongvec_minmax(struct ctl_table *, int,
68− void __user *, size_t *, loff_t *);
69−extern int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int,
70− void __user *, size_t *, loff_t *);
71−extern int proc_do_large_bitmap(struct ctl_table *, int,
72− void __user *, size_t *, loff_t *);
73−extern int proc_do_static_key(struct ctl_table *table, int write,
74− void __user *buffer, size_t *lenp,
75− loff_t *ppos);
47+typedef int proc_handler(struct ctl_table *ctl, int write, void *buffer,
48+ size_t *lenp, loff_t *ppos);
49+
50+int proc_dostring(struct ctl_table *, int, void *, size_t *, loff_t *);
51+int proc_dointvec(struct ctl_table *, int, void *, size_t *, loff_t *);
52+int proc_douintvec(struct ctl_table *, int, void *, size_t *, loff_t *);
53+int proc_dointvec_minmax(struct ctl_table *, int, void *, size_t *, loff_t *);
54+int proc_douintvec_minmax(struct ctl_table *table, int write, void *buffer,
55+ size_t *lenp, loff_t *ppos);
56+int proc_dointvec_jiffies(struct ctl_table *, int, void *, size_t *, loff_t *);
57+int proc_dointvec_userhz_jiffies(struct ctl_table *, int, void *, size_t *,
58+ loff_t *);
59+int proc_dointvec_ms_jiffies(struct ctl_table *, int, void *, size_t *,
60+ loff_t *);
61+int proc_doulongvec_minmax(struct ctl_table *, int, void *, size_t *, loff_t *);
62+int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int, void *,
63+ size_t *, loff_t *);
64+int proc_do_large_bitmap(struct ctl_table *, int, void *, size_t *, loff_t *);
65+int proc_do_static_key(struct ctl_table *table, int write, void *buffer,
66+ size_t *lenp, loff_t *ppos);
7667
7768 /*
7869 * Register a set of sysctl names by calling register_sysctl_table
@@ -207,7 +198,15 @@ void unregister_sysctl_table(struct ctl_table_header * table); · 128 unmodified lines
207198
208199 extern int sysctl_init(void);
209200
201+extern int pwrsw_enabled;
202+extern int unaligned_enabled;
203+extern int unaligned_dump_stack;
204+extern int no_unaligned_warning;
205+
210206 extern struct ctl_table sysctl_mount_point[];
207+extern struct ctl_table random_table[];
208+extern struct ctl_table firmware_config_table[];
209+extern struct ctl_table epoll_table[];
211210
212211 #else /* CONFIG_SYSCTL */
213212 static inline struct ctl_table_header *register_sysctl_table(struct ctl_table * table)
@@ -238,7 +237,7 @@ static inline void setup_sysctl_set(struct ctl_table_set *p, · 24 unmodified lines
238237
239238 #endif /* CONFIG_SYSCTL */
240239
241−int sysctl_max_threads(struct ctl_table *table, int write,
242− void __user *buffer, size_t *lenp, loff_t *ppos);
240+int sysctl_max_threads(struct ctl_table *table, int write, void *buffer,
241+ size_t *lenp, loff_t *ppos);
243242
244243 #endif /* _LINUX_SYSCTL_H */
include/linux/timer.h+1−2
@@ -201,8 +201,7 @@ struct ctl_table; · 200 unmodified lines
201201
202202 extern unsigned int sysctl_timer_migration;
203203 int timer_migration_handler(struct ctl_table *table, int write,
204− void __user *buffer, size_t *lenp,
205− loff_t *ppos);
204+ void *buffer, size_t *lenp, loff_t *ppos);
206205 #endif
207206
208207 unsigned long __round_jiffies(unsigned long j, int cpu);
include/linux/vmstat.h+4−4
@@ -16,8 +16,8 @@ extern int sysctl_stat_interval; · 15 unmodified lines
1616 #define DISABLE_NUMA_STAT 0
1717 extern int sysctl_vm_numa_stat;
1818 DECLARE_STATIC_KEY_TRUE(vm_numa_stat_key);
19−extern int sysctl_vm_numa_stat_handler(struct ctl_table *table,
20− int write, void __user *buffer, size_t *length, loff_t *ppos);
19+int sysctl_vm_numa_stat_handler(struct ctl_table *table, int write,
20+ void *buffer, size_t *length, loff_t *ppos);
2121 #endif
2222
2323 struct reclaim_stat {
@@ -274,8 +274,8 @@ void cpu_vm_stats_fold(int cpu); · 250 unmodified lines
274274 void refresh_zone_stat_thresholds(void);
275275
276276 struct ctl_table;
277−int vmstat_refresh(struct ctl_table *, int write,
278− void __user *buffer, size_t *lenp, loff_t *ppos);
277+int vmstat_refresh(struct ctl_table *, int write, void *buffer, size_t *lenp,
278+ loff_t *ppos);
279279
280280 void drain_zonestat(struct zone *zone, struct per_cpu_pageset *);
281281
include/linux/writeback.h+11−17
@@ -362,24 +362,18 @@ extern int vm_highmem_is_dirtyable; · 361 unmodified lines
362362 extern int block_dump;
363363 extern int laptop_mode;
364364
365−extern int dirty_background_ratio_handler(struct ctl_table *table, int write,
366− void __user *buffer, size_t *lenp,
367− loff_t *ppos);
368−extern int dirty_background_bytes_handler(struct ctl_table *table, int write,
369− void __user *buffer, size_t *lenp,
370− loff_t *ppos);
371−extern int dirty_ratio_handler(struct ctl_table *table, int write,
372− void __user *buffer, size_t *lenp,
373− loff_t *ppos);
374−extern int dirty_bytes_handler(struct ctl_table *table, int write,
375− void __user *buffer, size_t *lenp,
376− loff_t *ppos);
365+int dirty_background_ratio_handler(struct ctl_table *table, int write,
366+ void *buffer, size_t *lenp, loff_t *ppos);
367+int dirty_background_bytes_handler(struct ctl_table *table, int write,
368+ void *buffer, size_t *lenp, loff_t *ppos);
369+int dirty_ratio_handler(struct ctl_table *table, int write,
370+ void *buffer, size_t *lenp, loff_t *ppos);
371+int dirty_bytes_handler(struct ctl_table *table, int write,
372+ void *buffer, size_t *lenp, loff_t *ppos);
377373 int dirtytime_interval_handler(struct ctl_table *table, int write,
378− void __user *buffer, size_t *lenp, loff_t *ppos);
379−
380−struct ctl_table;
381−int dirty_writeback_centisecs_handler(struct ctl_table *, int,
382− void __user *, size_t *, loff_t *);
374+ void *buffer, size_t *lenp, loff_t *ppos);
375+int dirty_writeback_centisecs_handler(struct ctl_table *table, int write,
376+ void *buffer, size_t *lenp, loff_t *ppos);
383377
384378 void global_dirty_limits(unsigned long *pbackground, unsigned long *pdirty);
385379 unsigned long wb_calc_thresh(struct bdi_writeback *wb, unsigned long thresh);