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.
Showing the changes to include/linux (21 of 91 files). Show all
Unified · Split
| @@ -138,8 +138,7 @@ int __cgroup_bpf_check_dev_permission(short dev_type, u32 major, u32 minor, · 137 unmodified lines | ||
| 138 | 138 | |
| 139 | 139 | int __cgroup_bpf_run_filter_sysctl(struct ctl_table_header *head, |
| 140 | 140 | 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, | |
| 143 | 142 | enum bpf_attach_type type); |
| 144 | 143 | |
| 145 | 144 | 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 | ||
| 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 | 306 | int __ret = 0; \ |
| 308 | 307 | if (cgroup_bpf_enabled) \ |
| 309 | 308 | __ret = __cgroup_bpf_run_filter_sysctl(head, table, write, \ |
| 310 | − buf, count, pos, nbuf, \ | |
| 309 | + buf, count, pos, \ | |
| 311 | 310 | BPF_CGROUP_SYSCTL); \ |
| 312 | 311 | __ret; \ |
| 313 | 312 | }) |
| @@ -429,7 +428,7 @@ static inline int bpf_percpu_cgroup_storage_update(struct bpf_map *map, · 115 unmodified lines | ||
| 429 | 428 | #define BPF_CGROUP_RUN_PROG_UDP6_RECVMSG_LOCK(sk, uaddr) ({ 0; }) |
| 430 | 429 | #define BPF_CGROUP_RUN_PROG_SOCK_OPS(sock_ops) ({ 0; }) |
| 431 | 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 | 432 | #define BPF_CGROUP_GETSOCKOPT_MAX_OPTLEN(optlen) ({ 0; }) |
| 434 | 433 | #define BPF_CGROUP_RUN_PROG_GETSOCKOPT(sock, level, optname, optval, \ |
| 435 | 434 | optlen, max_optlen, retval) ({ retval; }) |
| @@ -86,7 +86,7 @@ static inline unsigned long compact_gap(unsigned int order) · 85 unmodified lines | ||
| 86 | 86 | #ifdef CONFIG_COMPACTION |
| 87 | 87 | extern int sysctl_compact_memory; |
| 88 | 88 | 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); | |
| 90 | 90 | extern int sysctl_extfrag_threshold; |
| 91 | 91 | extern int sysctl_compact_unevictable_allowed; |
| 92 | 92 | |
| @@ -22,4 +22,8 @@ extern void do_coredump(const kernel_siginfo_t *siginfo); · 21 unmodified lines | ||
| 22 | 22 | static inline void do_coredump(const kernel_siginfo_t *siginfo) {} |
| 23 | 23 | #endif |
| 24 | 24 | |
| 25 | +extern int core_uses_pid; | |
| 26 | +extern char core_pattern[]; | |
| 27 | +extern unsigned int core_pipe_limit; | |
| 28 | + | |
| 25 | 29 | #endif /* _LINUX_COREDUMP_H */ |
| @@ -94,4 +94,6 @@ extern void fd_install(unsigned int fd, struct file *file); · 93 unmodified lines | ||
| 94 | 94 | extern void flush_delayed_fput(void); |
| 95 | 95 | extern void __fput_sync(struct file *); |
| 96 | 96 | |
| 97 | +extern unsigned int sysctl_nr_open_min, sysctl_nr_open_max; | |
| 98 | + | |
| 97 | 99 | #endif /* __LINUX_FILE_H */ |
| @@ -3536,11 +3536,11 @@ ssize_t simple_attr_write(struct file *file, const char __user *buf, · 3535 unmodified lines | ||
| 3536 | 3536 | |
| 3537 | 3537 | struct ctl_table; |
| 3538 | 3538 | 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); | |
| 3540 | 3540 | 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); | |
| 3542 | 3542 | 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); | |
| 3544 | 3544 | int __init get_filesystem_list(char *buf); |
| 3545 | 3545 | |
| 3546 | 3546 | #define __FMODE_EXEC ((__force int) FMODE_EXEC) |
| @@ -1005,8 +1005,7 @@ extern void disable_trace_on_warning(void); · 1004 unmodified lines | ||
| 1005 | 1005 | extern int __disable_trace_on_warning; |
| 1006 | 1006 | |
| 1007 | 1007 | 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); | |
| 1010 | 1009 | |
| 1011 | 1010 | #else /* CONFIG_TRACING */ |
| 1012 | 1011 | static inline void disable_trace_on_warning(void) { } |
| @@ -105,14 +105,13 @@ struct hugepage_subpool *hugepage_new_subpool(struct hstate *h, long max_hpages, · 104 unmodified lines | ||
| 105 | 105 | void hugepage_put_subpool(struct hugepage_subpool *spool); |
| 106 | 106 | |
| 107 | 107 | 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 *); | |
| 116 | 115 | |
| 117 | 116 | int copy_hugetlb_page_range(struct mm_struct *, struct mm_struct *, struct vm_area_struct *); |
| 118 | 117 | long follow_hugetlb_page(struct mm_struct *, struct vm_area_struct *, |
| @@ -312,7 +312,7 @@ DEFINE_INSN_CACHE_OPS(optinsn); · 311 unmodified lines | ||
| 312 | 312 | #ifdef CONFIG_SYSCTL |
| 313 | 313 | extern int sysctl_kprobes_optimization; |
| 314 | 314 | extern int proc_kprobes_optimization_handler(struct ctl_table *table, |
| 315 | − int write, void __user *buffer, | |
| 315 | + int write, void *buffer, | |
| 316 | 316 | size_t *length, loff_t *ppos); |
| 317 | 317 | #endif |
| 318 | 318 | extern void wait_for_kprobe_optimizer(void); |
| @@ -38,8 +38,8 @@ account_scheduler_latency(struct task_struct *task, int usecs, int inter) · 37 unmodified lines | ||
| 38 | 38 | |
| 39 | 39 | void clear_tsk_latency_tracing(struct task_struct *p); |
| 40 | 40 | |
| 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); | |
| 43 | 43 | |
| 44 | 44 | #else |
| 45 | 45 | |
| @@ -201,10 +201,10 @@ extern int sysctl_overcommit_memory; · 200 unmodified lines | ||
| 201 | 201 | extern int sysctl_overcommit_ratio; |
| 202 | 202 | extern unsigned long sysctl_overcommit_kbytes; |
| 203 | 203 | |
| 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 *); | |
| 208 | 208 | |
| 209 | 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 | 2958 | #ifdef CONFIG_SYSCTL |
| 2959 | 2959 | 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 *); | |
| 2962 | 2962 | #endif |
| 2963 | 2963 | |
| 2964 | 2964 | void drop_slab(void); |
| @@ -3140,5 +3140,7 @@ unsigned long wp_shared_mapping_range(struct address_space *mapping, · 175 unmodified lines | ||
| 3140 | 3140 | pgoff_t first_index, pgoff_t nr); |
| 3141 | 3141 | #endif |
| 3142 | 3142 | |
| 3143 | +extern int sysctl_nr_trim_pages; | |
| 3144 | + | |
| 3143 | 3145 | #endif /* __KERNEL__ */ |
| 3144 | 3146 | #endif /* _LINUX_MM_H */ |
| @@ -909,24 +909,23 @@ static inline int is_highmem(struct zone *zone) · 908 unmodified lines | ||
| 909 | 909 | |
| 910 | 910 | /* These two functions are used to setup the per zone pages min values */ |
| 911 | 911 | 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 *); | |
| 918 | 917 | 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 *); | |
| 921 | 920 | int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *, int, |
| 922 | − void __user *, size_t *, loff_t *); | |
| 921 | + void *, size_t *, loff_t *); | |
| 923 | 922 | int sysctl_min_unmapped_ratio_sysctl_handler(struct ctl_table *, int, |
| 924 | − void __user *, size_t *, loff_t *); | |
| 923 | + void *, size_t *, loff_t *); | |
| 925 | 924 | 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; | |
| 930 | 929 | extern char numa_zonelist_order[]; |
| 931 | 930 | #define NUMA_ZONELIST_ORDER_LEN 16 |
| 932 | 931 | |
| @@ -202,16 +202,11 @@ static inline void watchdog_update_hrtimer_threshold(u64 period) { } · 201 unmodified lines | ||
| 202 | 202 | #endif |
| 203 | 203 | |
| 204 | 204 | 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 *); | |
| 215 | 210 | |
| 216 | 211 | #ifdef CONFIG_HAVE_ACPI_APEI_NMI |
| 217 | 212 | #include <asm/nmi.h> |
| @@ -1280,15 +1280,12 @@ extern int sysctl_perf_cpu_time_max_percent; · 1279 unmodified lines | ||
| 1280 | 1280 | |
| 1281 | 1281 | extern void perf_sample_event_took(u64 sample_len_ns); |
| 1282 | 1282 | |
| 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); | |
| 1290 | 1287 | 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); | |
| 1292 | 1289 | |
| 1293 | 1290 | /* Access to perf_event_open(2) syscall. */ |
| 1294 | 1291 | #define PERF_SECURITY_OPEN 0 |
| @@ -108,6 +108,9 @@ extern void transfer_pid(struct task_struct *old, struct task_struct *new, · 107 unmodified lines | ||
| 108 | 108 | struct pid_namespace; |
| 109 | 109 | extern struct pid_namespace init_pid_ns; |
| 110 | 110 | |
| 111 | +extern int pid_max; | |
| 112 | +extern int pid_max_min, pid_max_max; | |
| 113 | + | |
| 111 | 114 | /* |
| 112 | 115 | * look up a PID in the hash table. Must be called with the tasklist_lock |
| 113 | 116 | * or rcu_read_lock() held. |
| @@ -189,7 +189,7 @@ extern int printk_delay_msec; · 188 unmodified lines | ||
| 189 | 189 | extern int dmesg_restrict; |
| 190 | 190 | |
| 191 | 191 | 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, | |
| 193 | 193 | size_t *lenp, loff_t *ppos); |
| 194 | 194 | |
| 195 | 195 | extern void wake_up_klogd(void); |
| @@ -12,9 +12,8 @@ extern unsigned int sysctl_hung_task_panic; · 11 unmodified lines | ||
| 12 | 12 | extern unsigned long sysctl_hung_task_timeout_secs; |
| 13 | 13 | extern unsigned long sysctl_hung_task_check_interval_secs; |
| 14 | 14 | 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); | |
| 18 | 17 | #else |
| 19 | 18 | /* Avoid need for ifdefs elsewhere in the code */ |
| 20 | 19 | enum { sysctl_hung_task_timeout_secs = 0 }; |
| @@ -43,8 +42,7 @@ extern __read_mostly unsigned int sysctl_sched_migration_cost; · 22 unmodified lines | ||
| 43 | 42 | extern __read_mostly unsigned int sysctl_sched_nr_migrate; |
| 44 | 43 | |
| 45 | 44 | 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); | |
| 48 | 46 | #endif |
| 49 | 47 | |
| 50 | 48 | /* |
| @@ -72,33 +70,21 @@ extern unsigned int sysctl_sched_autogroup_enabled; · 21 unmodified lines | ||
| 72 | 70 | extern int sysctl_sched_rr_timeslice; |
| 73 | 71 | extern int sched_rr_timeslice; |
| 74 | 72 | |
| 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); | |
| 96 | 83 | |
| 97 | 84 | #if defined(CONFIG_ENERGY_MODEL) && defined(CONFIG_CPU_FREQ_GOV_SCHEDUTIL) |
| 98 | 85 | 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); | |
| 102 | 88 | #endif |
| 103 | 89 | |
| 104 | 90 | #endif /* _LINUX_SCHED_SYSCTL_H */ |
| @@ -211,7 +211,7 @@ struct request_sock; · 210 unmodified lines | ||
| 211 | 211 | |
| 212 | 212 | #ifdef CONFIG_MMU |
| 213 | 213 | 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); | |
| 215 | 215 | #endif |
| 216 | 216 | |
| 217 | 217 | /* security_inode_init_security callback function to write xattrs */ |
| @@ -44,35 +44,26 @@ struct ctl_dir; · 43 unmodified lines | ||
| 44 | 44 | |
| 45 | 45 | extern const int sysctl_vals[]; |
| 46 | 46 | |
| 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); | |
| 76 | 67 | |
| 77 | 68 | /* |
| 78 | 69 | * 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 | |
| 208 | 199 | extern int sysctl_init(void); |
| 209 | 200 | |
| 201 | +extern int pwrsw_enabled; | |
| 202 | +extern int unaligned_enabled; | |
| 203 | +extern int unaligned_dump_stack; | |
| 204 | +extern int no_unaligned_warning; | |
| 205 | + | |
| 210 | 206 | 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[]; | |
| 211 | 210 | |
| 212 | 211 | #else /* CONFIG_SYSCTL */ |
| 213 | 212 | 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 | ||
| 238 | 237 | |
| 239 | 238 | #endif /* CONFIG_SYSCTL */ |
| 240 | 239 | |
| 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); | |
| 243 | 242 | |
| 244 | 243 | #endif /* _LINUX_SYSCTL_H */ |
| @@ -201,8 +201,7 @@ struct ctl_table; · 200 unmodified lines | ||
| 201 | 201 | |
| 202 | 202 | extern unsigned int sysctl_timer_migration; |
| 203 | 203 | 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); | |
| 206 | 205 | #endif |
| 207 | 206 | |
| 208 | 207 | unsigned long __round_jiffies(unsigned long j, int cpu); |
| @@ -16,8 +16,8 @@ extern int sysctl_stat_interval; · 15 unmodified lines | ||
| 16 | 16 | #define DISABLE_NUMA_STAT 0 |
| 17 | 17 | extern int sysctl_vm_numa_stat; |
| 18 | 18 | 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); | |
| 21 | 21 | #endif |
| 22 | 22 | |
| 23 | 23 | struct reclaim_stat { |
| @@ -274,8 +274,8 @@ void cpu_vm_stats_fold(int cpu); · 250 unmodified lines | ||
| 274 | 274 | void refresh_zone_stat_thresholds(void); |
| 275 | 275 | |
| 276 | 276 | 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); | |
| 279 | 279 | |
| 280 | 280 | void drain_zonestat(struct zone *zone, struct per_cpu_pageset *); |
| 281 | 281 | |
| @@ -362,24 +362,18 @@ extern int vm_highmem_is_dirtyable; · 361 unmodified lines | ||
| 362 | 362 | extern int block_dump; |
| 363 | 363 | extern int laptop_mode; |
| 364 | 364 | |
| 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); | |
| 377 | 373 | 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); | |
| 383 | 377 | |
| 384 | 378 | void global_dirty_limits(unsigned long *pbackground, unsigned long *pdirty); |
| 385 | 379 | unsigned long wb_calc_thresh(struct bdi_writeback *wb, unsigned long thresh); |