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
138 138
139int __cgroup_bpf_run_filter_sysctl(struct ctl_table_header *head,139int __cgroup_bpf_run_filter_sysctl(struct ctl_table_header *head,
140 struct ctl_table *table, int write,140 struct ctl_table *table, int write,
141 void __user *buf, size_t *pcount,141 void **buf, size_t *pcount, loff_t *ppos,
142 loff_t *ppos, void **new_buf,
143 enum bpf_attach_type type);142 enum bpf_attach_type type);
144 143
145int __cgroup_bpf_run_filter_setsockopt(struct sock *sock, int *level,144int __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
302})301})
303 302
304 303
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) \
306({ \305({ \
307 int __ret = 0; \306 int __ret = 0; \
308 if (cgroup_bpf_enabled) \307 if (cgroup_bpf_enabled) \
309 __ret = __cgroup_bpf_run_filter_sysctl(head, table, write, \308 __ret = __cgroup_bpf_run_filter_sysctl(head, table, write, \
310 buf, count, pos, nbuf, \309 buf, count, pos, \
311 BPF_CGROUP_SYSCTL); \310 BPF_CGROUP_SYSCTL); \
312 __ret; \311 __ret; \
313})312})
@@ -429,7 +428,7 @@ static inline int bpf_percpu_cgroup_storage_update(struct bpf_map *map, · 115 unmodified lines
429#define BPF_CGROUP_RUN_PROG_UDP6_RECVMSG_LOCK(sk, uaddr) ({ 0; })428#define BPF_CGROUP_RUN_PROG_UDP6_RECVMSG_LOCK(sk, uaddr) ({ 0; })
430#define BPF_CGROUP_RUN_PROG_SOCK_OPS(sock_ops) ({ 0; })429#define BPF_CGROUP_RUN_PROG_SOCK_OPS(sock_ops) ({ 0; })
431#define BPF_CGROUP_RUN_PROG_DEVICE_CGROUP(type,major,minor,access) ({ 0; })430#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; })
433#define BPF_CGROUP_GETSOCKOPT_MAX_OPTLEN(optlen) ({ 0; })432#define BPF_CGROUP_GETSOCKOPT_MAX_OPTLEN(optlen) ({ 0; })
434#define BPF_CGROUP_RUN_PROG_GETSOCKOPT(sock, level, optname, optval, \433#define BPF_CGROUP_RUN_PROG_GETSOCKOPT(sock, level, optname, optval, \
435 optlen, max_optlen, retval) ({ retval; })434 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
86#ifdef CONFIG_COMPACTION86#ifdef CONFIG_COMPACTION
87extern int sysctl_compact_memory;87extern int sysctl_compact_memory;
88extern int sysctl_compaction_handler(struct ctl_table *table, int write,88extern 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);
90extern int sysctl_extfrag_threshold;90extern int sysctl_extfrag_threshold;
91extern int sysctl_compact_unevictable_allowed;91extern int sysctl_compact_unevictable_allowed;
92 92
include/linux/coredump.h+4−0
@@ -22,4 +22,8 @@ extern void do_coredump(const kernel_siginfo_t *siginfo); · 21 unmodified lines
22static inline void do_coredump(const kernel_siginfo_t *siginfo) {}22static inline void do_coredump(const kernel_siginfo_t *siginfo) {}
23#endif23#endif
24 24
25extern int core_uses_pid;
26extern char core_pattern[];
27extern unsigned int core_pipe_limit;
28
25#endif /* _LINUX_COREDUMP_H */29#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
94extern void flush_delayed_fput(void);94extern void flush_delayed_fput(void);
95extern void __fput_sync(struct file *);95extern void __fput_sync(struct file *);
96 96
97extern unsigned int sysctl_nr_open_min, sysctl_nr_open_max;
98
97#endif /* __LINUX_FILE_H */99#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
3536 3536
3537struct ctl_table;3537struct ctl_table;
3538int proc_nr_files(struct ctl_table *table, int write,3538int 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);
3540int proc_nr_dentry(struct ctl_table *table, int write,3540int 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);
3542int proc_nr_inodes(struct ctl_table *table, int write,3542int 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);
3544int __init get_filesystem_list(char *buf);3544int __init get_filesystem_list(char *buf);
3545 3545
3546#define __FMODE_EXEC ((__force int) FMODE_EXEC)3546#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
1005extern int __disable_trace_on_warning;1005extern int __disable_trace_on_warning;
1006 1006
1007int tracepoint_printk_sysctl(struct ctl_table *table, int write,1007int tracepoint_printk_sysctl(struct ctl_table *table, int write,
1008 void __user *buffer, size_t *lenp,1008 void *buffer, size_t *lenp, loff_t *ppos);
1009 loff_t *ppos);
1010 1009
1011#else /* CONFIG_TRACING */1010#else /* CONFIG_TRACING */
1012static inline void disable_trace_on_warning(void) { }1011static 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
105void hugepage_put_subpool(struct hugepage_subpool *spool);105void hugepage_put_subpool(struct hugepage_subpool *spool);
106 106
107void reset_vma_resv_huge_pages(struct vm_area_struct *vma);107void reset_vma_resv_huge_pages(struct vm_area_struct *vma);
108int hugetlb_sysctl_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *);108int hugetlb_sysctl_handler(struct ctl_table *, int, void *, size_t *, loff_t *);
109int hugetlb_overcommit_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *);109int hugetlb_overcommit_handler(struct ctl_table *, int, void *, size_t *,
110int hugetlb_treat_movable_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *);110 loff_t *);
111 111int hugetlb_treat_movable_handler(struct ctl_table *, int, void *, size_t *,
112#ifdef CONFIG_NUMA112 loff_t *);
113int hugetlb_mempolicy_sysctl_handler(struct ctl_table *, int,113int hugetlb_mempolicy_sysctl_handler(struct ctl_table *, int, void *, size_t *,
114 void __user *, size_t *, loff_t *);114 loff_t *);
115#endif
116 115
117int copy_hugetlb_page_range(struct mm_struct *, struct mm_struct *, struct vm_area_struct *);116int copy_hugetlb_page_range(struct mm_struct *, struct mm_struct *, struct vm_area_struct *);
118long follow_hugetlb_page(struct mm_struct *, struct vm_area_struct *,117long 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
312#ifdef CONFIG_SYSCTL312#ifdef CONFIG_SYSCTL
313extern int sysctl_kprobes_optimization;313extern int sysctl_kprobes_optimization;
314extern int proc_kprobes_optimization_handler(struct ctl_table *table,314extern int proc_kprobes_optimization_handler(struct ctl_table *table,
315 int write, void __user *buffer,315 int write, void *buffer,
316 size_t *length, loff_t *ppos);316 size_t *length, loff_t *ppos);
317#endif317#endif
318extern void wait_for_kprobe_optimizer(void);318extern 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
38 38
39void clear_tsk_latency_tracing(struct task_struct *p);39void clear_tsk_latency_tracing(struct task_struct *p);
40 40
41extern int sysctl_latencytop(struct ctl_table *table, int write,41int sysctl_latencytop(struct ctl_table *table, int write, void *buffer,
42 void __user *buffer, size_t *lenp, loff_t *ppos);42 size_t *lenp, loff_t *ppos);
43 43
44#else44#else
45 45
include/linux/mm.h+8−6
@@ -201,10 +201,10 @@ extern int sysctl_overcommit_memory; · 200 unmodified lines
201extern int sysctl_overcommit_ratio;201extern int sysctl_overcommit_ratio;
202extern unsigned long sysctl_overcommit_kbytes;202extern unsigned long sysctl_overcommit_kbytes;
203 203
204extern int overcommit_ratio_handler(struct ctl_table *, int, void __user *,204int overcommit_ratio_handler(struct ctl_table *, int, void *, size_t *,
205 size_t *, loff_t *);205 loff_t *);
206extern int overcommit_kbytes_handler(struct ctl_table *, int, void __user *,206int overcommit_kbytes_handler(struct ctl_table *, int, void *, size_t *,
207 size_t *, loff_t *);207 loff_t *);
208 208
209#define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))209#define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))
210 210
@@ -2957,8 +2957,8 @@ extern bool process_shares_mm(struct task_struct *p, struct mm_struct *mm); · 2746 unmodified lines
2957 2957
2958#ifdef CONFIG_SYSCTL2958#ifdef CONFIG_SYSCTL
2959extern int sysctl_drop_caches;2959extern int sysctl_drop_caches;
2960int drop_caches_sysctl_handler(struct ctl_table *, int,2960int drop_caches_sysctl_handler(struct ctl_table *, int, void *, size_t *,
2961 void __user *, size_t *, loff_t *);2961 loff_t *);
2962#endif2962#endif
2963 2963
2964void drop_slab(void);2964void drop_slab(void);
@@ -3140,5 +3140,7 @@ unsigned long wp_shared_mapping_range(struct address_space *mapping, · 175 unmodified lines
3140 pgoff_t first_index, pgoff_t nr);3140 pgoff_t first_index, pgoff_t nr);
3141#endif3141#endif
3142 3142
3143extern int sysctl_nr_trim_pages;
3144
3143#endif /* __KERNEL__ */3145#endif /* __KERNEL__ */
3144#endif /* _LINUX_MM_H */3146#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
909 909
910/* These two functions are used to setup the per zone pages min values */910/* These two functions are used to setup the per zone pages min values */
911struct ctl_table;911struct ctl_table;
912int min_free_kbytes_sysctl_handler(struct ctl_table *, int,912
913 void __user *, size_t *, loff_t *);913int min_free_kbytes_sysctl_handler(struct ctl_table *, int, void *, size_t *,
914int watermark_boost_factor_sysctl_handler(struct ctl_table *, int,914 loff_t *);
915 void __user *, size_t *, loff_t *);915int watermark_scale_factor_sysctl_handler(struct ctl_table *, int, void *,
916int watermark_scale_factor_sysctl_handler(struct ctl_table *, int,916 size_t *, loff_t *);
917 void __user *, size_t *, loff_t *);
918extern int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES];917extern int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES];
919int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int,918int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int, void *,
920 void __user *, size_t *, loff_t *);919 size_t *, loff_t *);
921int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *, int,920int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *, int,
922 void __user *, size_t *, loff_t *);921 void *, size_t *, loff_t *);
923int sysctl_min_unmapped_ratio_sysctl_handler(struct ctl_table *, int,922int sysctl_min_unmapped_ratio_sysctl_handler(struct ctl_table *, int,
924 void __user *, size_t *, loff_t *);923 void *, size_t *, loff_t *);
925int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *, int,924int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *, int,
926 void __user *, size_t *, loff_t *);925 void *, size_t *, loff_t *);
927 926int numa_zonelist_order_handler(struct ctl_table *, int,
928extern int numa_zonelist_order_handler(struct ctl_table *, int,927 void *, size_t *, loff_t *);
929 void __user *, size_t *, loff_t *);928extern int percpu_pagelist_fraction;
930extern char numa_zonelist_order[];929extern char numa_zonelist_order[];
931#define NUMA_ZONELIST_ORDER_LEN 16930#define NUMA_ZONELIST_ORDER_LEN 16
932 931
include/linux/nmi.h+5−10
@@ -202,16 +202,11 @@ static inline void watchdog_update_hrtimer_threshold(u64 period) { } · 201 unmodified lines
202#endif202#endif
203 203
204struct ctl_table;204struct ctl_table;
205extern int proc_watchdog(struct ctl_table *, int ,205int proc_watchdog(struct ctl_table *, int, void *, size_t *, loff_t *);
206 void __user *, size_t *, loff_t *);206int proc_nmi_watchdog(struct ctl_table *, int , void *, size_t *, loff_t *);
207extern int proc_nmi_watchdog(struct ctl_table *, int ,207int proc_soft_watchdog(struct ctl_table *, int , void *, size_t *, loff_t *);
208 void __user *, size_t *, loff_t *);208int proc_watchdog_thresh(struct ctl_table *, int , void *, size_t *, loff_t *);
209extern int proc_soft_watchdog(struct ctl_table *, int ,209int proc_watchdog_cpumask(struct ctl_table *, int, void *, size_t *, loff_t *);
210 void __user *, size_t *, loff_t *);
211extern int proc_watchdog_thresh(struct ctl_table *, int ,
212 void __user *, size_t *, loff_t *);
213extern int proc_watchdog_cpumask(struct ctl_table *, int,
214 void __user *, size_t *, loff_t *);
215 210
216#ifdef CONFIG_HAVE_ACPI_APEI_NMI211#ifdef CONFIG_HAVE_ACPI_APEI_NMI
217#include <asm/nmi.h>212#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
1280 1280
1281extern void perf_sample_event_took(u64 sample_len_ns);1281extern void perf_sample_event_took(u64 sample_len_ns);
1282 1282
1283extern int perf_proc_update_handler(struct ctl_table *table, int write,1283int perf_proc_update_handler(struct ctl_table *table, int write,
1284 void __user *buffer, size_t *lenp,1284 void *buffer, size_t *lenp, loff_t *ppos);
1285 loff_t *ppos);1285int perf_cpu_time_max_percent_handler(struct ctl_table *table, int write,
1286extern int perf_cpu_time_max_percent_handler(struct ctl_table *table, int write,1286 void *buffer, size_t *lenp, loff_t *ppos);
1287 void __user *buffer, size_t *lenp,
1288 loff_t *ppos);
1289
1290int perf_event_max_stack_handler(struct ctl_table *table, int write,1287int 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);
1292 1289
1293/* Access to perf_event_open(2) syscall. */1290/* Access to perf_event_open(2) syscall. */
1294#define PERF_SECURITY_OPEN 01291#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
108struct pid_namespace;108struct pid_namespace;
109extern struct pid_namespace init_pid_ns;109extern struct pid_namespace init_pid_ns;
110 110
111extern int pid_max;
112extern int pid_max_min, pid_max_max;
113
111/*114/*
112 * look up a PID in the hash table. Must be called with the tasklist_lock115 * look up a PID in the hash table. Must be called with the tasklist_lock
113 * or rcu_read_lock() held.116 * or rcu_read_lock() held.
include/linux/printk.h+1−1
@@ -189,7 +189,7 @@ extern int printk_delay_msec; · 188 unmodified lines
189extern int dmesg_restrict;189extern int dmesg_restrict;
190 190
191extern int191extern int
192devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write, void __user *buf,192devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write, void *buf,
193 size_t *lenp, loff_t *ppos);193 size_t *lenp, loff_t *ppos);
194 194
195extern void wake_up_klogd(void);195extern 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
12extern unsigned long sysctl_hung_task_timeout_secs;12extern unsigned long sysctl_hung_task_timeout_secs;
13extern unsigned long sysctl_hung_task_check_interval_secs;13extern unsigned long sysctl_hung_task_check_interval_secs;
14extern int sysctl_hung_task_warnings;14extern int sysctl_hung_task_warnings;
15extern int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,15int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,
16 void __user *buffer,16 void *buffer, size_t *lenp, loff_t *ppos);
17 size_t *lenp, loff_t *ppos);
18#else17#else
19/* Avoid need for ifdefs elsewhere in the code */18/* Avoid need for ifdefs elsewhere in the code */
20enum { sysctl_hung_task_timeout_secs = 0 };19enum { sysctl_hung_task_timeout_secs = 0 };
@@ -43,8 +42,7 @@ extern __read_mostly unsigned int sysctl_sched_migration_cost; · 22 unmodified lines
43extern __read_mostly unsigned int sysctl_sched_nr_migrate;42extern __read_mostly unsigned int sysctl_sched_nr_migrate;
44 43
45int sched_proc_update_handler(struct ctl_table *table, int write,44int sched_proc_update_handler(struct ctl_table *table, int write,
46 void __user *buffer, size_t *length,45 void *buffer, size_t *length, loff_t *ppos);
47 loff_t *ppos);
48#endif46#endif
49 47
50/*48/*
@@ -72,33 +70,21 @@ extern unsigned int sysctl_sched_autogroup_enabled; · 21 unmodified lines
72extern int sysctl_sched_rr_timeslice;70extern int sysctl_sched_rr_timeslice;
73extern int sched_rr_timeslice;71extern int sched_rr_timeslice;
74 72
75extern int sched_rr_handler(struct ctl_table *table, int write,73int sched_rr_handler(struct ctl_table *table, int write, void *buffer,
76 void __user *buffer, size_t *lenp,74 size_t *lenp, loff_t *ppos);
77 loff_t *ppos);75int sched_rt_handler(struct ctl_table *table, int write, void *buffer,
78 76 size_t *lenp, loff_t *ppos);
79extern int sched_rt_handler(struct ctl_table *table, int write,77int sysctl_sched_uclamp_handler(struct ctl_table *table, int write,
80 void __user *buffer, size_t *lenp,78 void *buffer, size_t *lenp, loff_t *ppos);
81 loff_t *ppos);79int sysctl_numa_balancing(struct ctl_table *table, int write, void *buffer,
82 80 size_t *lenp, loff_t *ppos);
83#ifdef CONFIG_UCLAMP_TASK81int sysctl_schedstats(struct ctl_table *table, int write, void *buffer,
84extern int sysctl_sched_uclamp_handler(struct ctl_table *table, int write,82 size_t *lenp, loff_t *ppos);
85 void __user *buffer, size_t *lenp,
86 loff_t *ppos);
87#endif
88
89extern int sysctl_numa_balancing(struct ctl_table *table, int write,
90 void __user *buffer, size_t *lenp,
91 loff_t *ppos);
92
93extern int sysctl_schedstats(struct ctl_table *table, int write,
94 void __user *buffer, size_t *lenp,
95 loff_t *ppos);
96 83
97#if defined(CONFIG_ENERGY_MODEL) && defined(CONFIG_CPU_FREQ_GOV_SCHEDUTIL)84#if defined(CONFIG_ENERGY_MODEL) && defined(CONFIG_CPU_FREQ_GOV_SCHEDUTIL)
98extern unsigned int sysctl_sched_energy_aware;85extern unsigned int sysctl_sched_energy_aware;
99extern int sched_energy_aware_handler(struct ctl_table *table, int write,86int sched_energy_aware_handler(struct ctl_table *table, int write,
100 void __user *buffer, size_t *lenp,87 void *buffer, size_t *lenp, loff_t *ppos);
101 loff_t *ppos);
102#endif88#endif
103 89
104#endif /* _LINUX_SCHED_SYSCTL_H */90#endif /* _LINUX_SCHED_SYSCTL_H */
include/linux/security.h+1−1
@@ -211,7 +211,7 @@ struct request_sock; · 210 unmodified lines
211 211
212#ifdef CONFIG_MMU212#ifdef CONFIG_MMU
213extern int mmap_min_addr_handler(struct ctl_table *table, int write,213extern 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);
215#endif215#endif
216 216
217/* security_inode_init_security callback function to write xattrs */217/* 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
44 44
45extern const int sysctl_vals[];45extern const int sysctl_vals[];
46 46
47typedef int proc_handler (struct ctl_table *ctl, int write,47typedef int proc_handler(struct ctl_table *ctl, int write, void *buffer,
48 void __user *buffer, size_t *lenp, loff_t *ppos);48 size_t *lenp, loff_t *ppos);
49 49
50extern int proc_dostring(struct ctl_table *, int,50int proc_dostring(struct ctl_table *, int, void *, size_t *, loff_t *);
51 void __user *, size_t *, loff_t *);51int proc_dointvec(struct ctl_table *, int, void *, size_t *, loff_t *);
52extern int proc_dointvec(struct ctl_table *, int,52int proc_douintvec(struct ctl_table *, int, void *, size_t *, loff_t *);
53 void __user *, size_t *, loff_t *);53int proc_dointvec_minmax(struct ctl_table *, int, void *, size_t *, loff_t *);
54extern int proc_douintvec(struct ctl_table *, int,54int proc_douintvec_minmax(struct ctl_table *table, int write, void *buffer,
55 void __user *, size_t *, loff_t *);55 size_t *lenp, loff_t *ppos);
56extern int proc_dointvec_minmax(struct ctl_table *, int,56int proc_dointvec_jiffies(struct ctl_table *, int, void *, size_t *, loff_t *);
57 void __user *, size_t *, loff_t *);57int proc_dointvec_userhz_jiffies(struct ctl_table *, int, void *, size_t *,
58extern int proc_douintvec_minmax(struct ctl_table *table, int write,58 loff_t *);
59 void __user *buffer, size_t *lenp,59int proc_dointvec_ms_jiffies(struct ctl_table *, int, void *, size_t *,
60 loff_t *ppos);60 loff_t *);
61extern int proc_dointvec_jiffies(struct ctl_table *, int,61int proc_doulongvec_minmax(struct ctl_table *, int, void *, size_t *, loff_t *);
62 void __user *, size_t *, loff_t *);62int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int, void *,
63extern int proc_dointvec_userhz_jiffies(struct ctl_table *, int,63 size_t *, loff_t *);
64 void __user *, size_t *, loff_t *);64int proc_do_large_bitmap(struct ctl_table *, int, void *, size_t *, loff_t *);
65extern int proc_dointvec_ms_jiffies(struct ctl_table *, int,65int proc_do_static_key(struct ctl_table *table, int write, void *buffer,
66 void __user *, size_t *, loff_t *);66 size_t *lenp, loff_t *ppos);
67extern int proc_doulongvec_minmax(struct ctl_table *, int,
68 void __user *, size_t *, loff_t *);
69extern int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int,
70 void __user *, size_t *, loff_t *);
71extern int proc_do_large_bitmap(struct ctl_table *, int,
72 void __user *, size_t *, loff_t *);
73extern int proc_do_static_key(struct ctl_table *table, int write,
74 void __user *buffer, size_t *lenp,
75 loff_t *ppos);
76 67
77/*68/*
78 * Register a set of sysctl names by calling register_sysctl_table69 * 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
207 198
208extern int sysctl_init(void);199extern int sysctl_init(void);
209 200
201extern int pwrsw_enabled;
202extern int unaligned_enabled;
203extern int unaligned_dump_stack;
204extern int no_unaligned_warning;
205
210extern struct ctl_table sysctl_mount_point[];206extern struct ctl_table sysctl_mount_point[];
207extern struct ctl_table random_table[];
208extern struct ctl_table firmware_config_table[];
209extern struct ctl_table epoll_table[];
211 210
212#else /* CONFIG_SYSCTL */211#else /* CONFIG_SYSCTL */
213static inline struct ctl_table_header *register_sysctl_table(struct ctl_table * table)212static 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
238 237
239#endif /* CONFIG_SYSCTL */238#endif /* CONFIG_SYSCTL */
240 239
241int sysctl_max_threads(struct ctl_table *table, int write,240int sysctl_max_threads(struct ctl_table *table, int write, void *buffer,
242 void __user *buffer, size_t *lenp, loff_t *ppos);241 size_t *lenp, loff_t *ppos);
243 242
244#endif /* _LINUX_SYSCTL_H */243#endif /* _LINUX_SYSCTL_H */
include/linux/timer.h+1−2
@@ -201,8 +201,7 @@ struct ctl_table; · 200 unmodified lines
201 201
202extern unsigned int sysctl_timer_migration;202extern unsigned int sysctl_timer_migration;
203int timer_migration_handler(struct ctl_table *table, int write,203int timer_migration_handler(struct ctl_table *table, int write,
204 void __user *buffer, size_t *lenp,204 void *buffer, size_t *lenp, loff_t *ppos);
205 loff_t *ppos);
206#endif205#endif
207 206
208unsigned long __round_jiffies(unsigned long j, int cpu);207unsigned 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
16#define DISABLE_NUMA_STAT 016#define DISABLE_NUMA_STAT 0
17extern int sysctl_vm_numa_stat;17extern int sysctl_vm_numa_stat;
18DECLARE_STATIC_KEY_TRUE(vm_numa_stat_key);18DECLARE_STATIC_KEY_TRUE(vm_numa_stat_key);
19extern int sysctl_vm_numa_stat_handler(struct ctl_table *table,19int sysctl_vm_numa_stat_handler(struct ctl_table *table, int write,
20 int write, void __user *buffer, size_t *length, loff_t *ppos);20 void *buffer, size_t *length, loff_t *ppos);
21#endif21#endif
22 22
23struct reclaim_stat {23struct reclaim_stat {
@@ -274,8 +274,8 @@ void cpu_vm_stats_fold(int cpu); · 250 unmodified lines
274void refresh_zone_stat_thresholds(void);274void refresh_zone_stat_thresholds(void);
275 275
276struct ctl_table;276struct ctl_table;
277int vmstat_refresh(struct ctl_table *, int write,277int vmstat_refresh(struct ctl_table *, int write, void *buffer, size_t *lenp,
278 void __user *buffer, size_t *lenp, loff_t *ppos);278 loff_t *ppos);
279 279
280void drain_zonestat(struct zone *zone, struct per_cpu_pageset *);280void drain_zonestat(struct zone *zone, struct per_cpu_pageset *);
281 281
include/linux/writeback.h+11−17
@@ -362,24 +362,18 @@ extern int vm_highmem_is_dirtyable; · 361 unmodified lines
362extern int block_dump;362extern int block_dump;
363extern int laptop_mode;363extern int laptop_mode;
364 364
365extern int dirty_background_ratio_handler(struct ctl_table *table, int write,365int dirty_background_ratio_handler(struct ctl_table *table, int write,
366 void __user *buffer, size_t *lenp,366 void *buffer, size_t *lenp, loff_t *ppos);
367 loff_t *ppos);367int dirty_background_bytes_handler(struct ctl_table *table, int write,
368extern int dirty_background_bytes_handler(struct ctl_table *table, int write,368 void *buffer, size_t *lenp, loff_t *ppos);
369 void __user *buffer, size_t *lenp,369int dirty_ratio_handler(struct ctl_table *table, int write,
370 loff_t *ppos);370 void *buffer, size_t *lenp, loff_t *ppos);
371extern int dirty_ratio_handler(struct ctl_table *table, int write,371int dirty_bytes_handler(struct ctl_table *table, int write,
372 void __user *buffer, size_t *lenp,372 void *buffer, size_t *lenp, loff_t *ppos);
373 loff_t *ppos);
374extern int dirty_bytes_handler(struct ctl_table *table, int write,
375 void __user *buffer, size_t *lenp,
376 loff_t *ppos);
377int dirtytime_interval_handler(struct ctl_table *table, int write,373int dirtytime_interval_handler(struct ctl_table *table, int write,
378 void __user *buffer, size_t *lenp, loff_t *ppos);374 void *buffer, size_t *lenp, loff_t *ppos);
379 375int dirty_writeback_centisecs_handler(struct ctl_table *table, int write,
380struct ctl_table;376 void *buffer, size_t *lenp, loff_t *ppos);
381int dirty_writeback_centisecs_handler(struct ctl_table *, int,
382 void __user *, size_t *, loff_t *);
383 377
384void global_dirty_limits(unsigned long *pbackground, unsigned long *pdirty);378void global_dirty_limits(unsigned long *pbackground, unsigned long *pdirty);
385unsigned long wb_calc_thresh(struct bdi_writeback *wb, unsigned long thresh);379unsigned long wb_calc_thresh(struct bdi_writeback *wb, unsigned long thresh);