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. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20200427071508.GV23230@ZenIV.linux.org.uk/T/
This commit is contained in:
commit
0b54142e4b
91 changed files with 1839 additions and 2103 deletions
|
|
@ -138,8 +138,7 @@ int __cgroup_bpf_check_dev_permission(short dev_type, u32 major, u32 minor,
|
|||
|
||||
int __cgroup_bpf_run_filter_sysctl(struct ctl_table_header *head,
|
||||
struct ctl_table *table, int write,
|
||||
void __user *buf, size_t *pcount,
|
||||
loff_t *ppos, void **new_buf,
|
||||
void **buf, size_t *pcount, loff_t *ppos,
|
||||
enum bpf_attach_type type);
|
||||
|
||||
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,
|
|||
})
|
||||
|
||||
|
||||
#define BPF_CGROUP_RUN_PROG_SYSCTL(head, table, write, buf, count, pos, nbuf) \
|
||||
#define BPF_CGROUP_RUN_PROG_SYSCTL(head, table, write, buf, count, pos) \
|
||||
({ \
|
||||
int __ret = 0; \
|
||||
if (cgroup_bpf_enabled) \
|
||||
__ret = __cgroup_bpf_run_filter_sysctl(head, table, write, \
|
||||
buf, count, pos, nbuf, \
|
||||
buf, count, pos, \
|
||||
BPF_CGROUP_SYSCTL); \
|
||||
__ret; \
|
||||
})
|
||||
|
|
@ -429,7 +428,7 @@ static inline int bpf_percpu_cgroup_storage_update(struct bpf_map *map,
|
|||
#define BPF_CGROUP_RUN_PROG_UDP6_RECVMSG_LOCK(sk, uaddr) ({ 0; })
|
||||
#define BPF_CGROUP_RUN_PROG_SOCK_OPS(sock_ops) ({ 0; })
|
||||
#define BPF_CGROUP_RUN_PROG_DEVICE_CGROUP(type,major,minor,access) ({ 0; })
|
||||
#define BPF_CGROUP_RUN_PROG_SYSCTL(head,table,write,buf,count,pos,nbuf) ({ 0; })
|
||||
#define BPF_CGROUP_RUN_PROG_SYSCTL(head,table,write,buf,count,pos) ({ 0; })
|
||||
#define BPF_CGROUP_GETSOCKOPT_MAX_OPTLEN(optlen) ({ 0; })
|
||||
#define BPF_CGROUP_RUN_PROG_GETSOCKOPT(sock, level, optname, optval, \
|
||||
optlen, max_optlen, retval) ({ retval; })
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ static inline unsigned long compact_gap(unsigned int order)
|
|||
#ifdef CONFIG_COMPACTION
|
||||
extern int sysctl_compact_memory;
|
||||
extern int sysctl_compaction_handler(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *length, loff_t *ppos);
|
||||
void *buffer, size_t *length, loff_t *ppos);
|
||||
extern int sysctl_extfrag_threshold;
|
||||
extern int sysctl_compact_unevictable_allowed;
|
||||
|
||||
|
|
|
|||
|
|
@ -22,4 +22,8 @@ extern void do_coredump(const kernel_siginfo_t *siginfo);
|
|||
static inline void do_coredump(const kernel_siginfo_t *siginfo) {}
|
||||
#endif
|
||||
|
||||
extern int core_uses_pid;
|
||||
extern char core_pattern[];
|
||||
extern unsigned int core_pipe_limit;
|
||||
|
||||
#endif /* _LINUX_COREDUMP_H */
|
||||
|
|
|
|||
|
|
@ -94,4 +94,6 @@ extern void fd_install(unsigned int fd, struct file *file);
|
|||
extern void flush_delayed_fput(void);
|
||||
extern void __fput_sync(struct file *);
|
||||
|
||||
extern unsigned int sysctl_nr_open_min, sysctl_nr_open_max;
|
||||
|
||||
#endif /* __LINUX_FILE_H */
|
||||
|
|
|
|||
|
|
@ -3536,11 +3536,11 @@ ssize_t simple_attr_write(struct file *file, const char __user *buf,
|
|||
|
||||
struct ctl_table;
|
||||
int proc_nr_files(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp, loff_t *ppos);
|
||||
void *buffer, size_t *lenp, loff_t *ppos);
|
||||
int proc_nr_dentry(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp, loff_t *ppos);
|
||||
void *buffer, size_t *lenp, loff_t *ppos);
|
||||
int proc_nr_inodes(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp, loff_t *ppos);
|
||||
void *buffer, size_t *lenp, loff_t *ppos);
|
||||
int __init get_filesystem_list(char *buf);
|
||||
|
||||
#define __FMODE_EXEC ((__force int) FMODE_EXEC)
|
||||
|
|
|
|||
|
|
@ -1005,8 +1005,7 @@ extern void disable_trace_on_warning(void);
|
|||
extern int __disable_trace_on_warning;
|
||||
|
||||
int tracepoint_printk_sysctl(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos);
|
||||
void *buffer, size_t *lenp, loff_t *ppos);
|
||||
|
||||
#else /* CONFIG_TRACING */
|
||||
static inline void disable_trace_on_warning(void) { }
|
||||
|
|
|
|||
|
|
@ -105,14 +105,13 @@ struct hugepage_subpool *hugepage_new_subpool(struct hstate *h, long max_hpages,
|
|||
void hugepage_put_subpool(struct hugepage_subpool *spool);
|
||||
|
||||
void reset_vma_resv_huge_pages(struct vm_area_struct *vma);
|
||||
int hugetlb_sysctl_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *);
|
||||
int hugetlb_overcommit_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *);
|
||||
int hugetlb_treat_movable_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *);
|
||||
|
||||
#ifdef CONFIG_NUMA
|
||||
int hugetlb_mempolicy_sysctl_handler(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
#endif
|
||||
int hugetlb_sysctl_handler(struct ctl_table *, int, void *, size_t *, loff_t *);
|
||||
int hugetlb_overcommit_handler(struct ctl_table *, int, void *, size_t *,
|
||||
loff_t *);
|
||||
int hugetlb_treat_movable_handler(struct ctl_table *, int, void *, size_t *,
|
||||
loff_t *);
|
||||
int hugetlb_mempolicy_sysctl_handler(struct ctl_table *, int, void *, size_t *,
|
||||
loff_t *);
|
||||
|
||||
int copy_hugetlb_page_range(struct mm_struct *, struct mm_struct *, struct vm_area_struct *);
|
||||
long follow_hugetlb_page(struct mm_struct *, struct vm_area_struct *,
|
||||
|
|
|
|||
|
|
@ -312,7 +312,7 @@ DEFINE_INSN_CACHE_OPS(optinsn);
|
|||
#ifdef CONFIG_SYSCTL
|
||||
extern int sysctl_kprobes_optimization;
|
||||
extern int proc_kprobes_optimization_handler(struct ctl_table *table,
|
||||
int write, void __user *buffer,
|
||||
int write, void *buffer,
|
||||
size_t *length, loff_t *ppos);
|
||||
#endif
|
||||
extern void wait_for_kprobe_optimizer(void);
|
||||
|
|
|
|||
|
|
@ -38,8 +38,8 @@ account_scheduler_latency(struct task_struct *task, int usecs, int inter)
|
|||
|
||||
void clear_tsk_latency_tracing(struct task_struct *p);
|
||||
|
||||
extern int sysctl_latencytop(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp, loff_t *ppos);
|
||||
int sysctl_latencytop(struct ctl_table *table, int write, void *buffer,
|
||||
size_t *lenp, loff_t *ppos);
|
||||
|
||||
#else
|
||||
|
||||
|
|
|
|||
|
|
@ -201,10 +201,10 @@ extern int sysctl_overcommit_memory;
|
|||
extern int sysctl_overcommit_ratio;
|
||||
extern unsigned long sysctl_overcommit_kbytes;
|
||||
|
||||
extern int overcommit_ratio_handler(struct ctl_table *, int, void __user *,
|
||||
size_t *, loff_t *);
|
||||
extern int overcommit_kbytes_handler(struct ctl_table *, int, void __user *,
|
||||
size_t *, loff_t *);
|
||||
int overcommit_ratio_handler(struct ctl_table *, int, void *, size_t *,
|
||||
loff_t *);
|
||||
int overcommit_kbytes_handler(struct ctl_table *, int, void *, size_t *,
|
||||
loff_t *);
|
||||
|
||||
#define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))
|
||||
|
||||
|
|
@ -2957,8 +2957,8 @@ extern bool process_shares_mm(struct task_struct *p, struct mm_struct *mm);
|
|||
|
||||
#ifdef CONFIG_SYSCTL
|
||||
extern int sysctl_drop_caches;
|
||||
int drop_caches_sysctl_handler(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
int drop_caches_sysctl_handler(struct ctl_table *, int, void *, size_t *,
|
||||
loff_t *);
|
||||
#endif
|
||||
|
||||
void drop_slab(void);
|
||||
|
|
@ -3140,5 +3140,7 @@ unsigned long wp_shared_mapping_range(struct address_space *mapping,
|
|||
pgoff_t first_index, pgoff_t nr);
|
||||
#endif
|
||||
|
||||
extern int sysctl_nr_trim_pages;
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _LINUX_MM_H */
|
||||
|
|
|
|||
|
|
@ -909,24 +909,23 @@ static inline int is_highmem(struct zone *zone)
|
|||
|
||||
/* These two functions are used to setup the per zone pages min values */
|
||||
struct ctl_table;
|
||||
int min_free_kbytes_sysctl_handler(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
int watermark_boost_factor_sysctl_handler(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
int watermark_scale_factor_sysctl_handler(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
extern int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES];
|
||||
int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
int sysctl_min_unmapped_ratio_sysctl_handler(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
|
||||
extern int numa_zonelist_order_handler(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
int min_free_kbytes_sysctl_handler(struct ctl_table *, int, void *, size_t *,
|
||||
loff_t *);
|
||||
int watermark_scale_factor_sysctl_handler(struct ctl_table *, int, void *,
|
||||
size_t *, loff_t *);
|
||||
extern int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES];
|
||||
int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int, void *,
|
||||
size_t *, loff_t *);
|
||||
int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *, int,
|
||||
void *, size_t *, loff_t *);
|
||||
int sysctl_min_unmapped_ratio_sysctl_handler(struct ctl_table *, int,
|
||||
void *, size_t *, loff_t *);
|
||||
int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *, int,
|
||||
void *, size_t *, loff_t *);
|
||||
int numa_zonelist_order_handler(struct ctl_table *, int,
|
||||
void *, size_t *, loff_t *);
|
||||
extern int percpu_pagelist_fraction;
|
||||
extern char numa_zonelist_order[];
|
||||
#define NUMA_ZONELIST_ORDER_LEN 16
|
||||
|
||||
|
|
|
|||
|
|
@ -202,16 +202,11 @@ static inline void watchdog_update_hrtimer_threshold(u64 period) { }
|
|||
#endif
|
||||
|
||||
struct ctl_table;
|
||||
extern int proc_watchdog(struct ctl_table *, int ,
|
||||
void __user *, size_t *, loff_t *);
|
||||
extern int proc_nmi_watchdog(struct ctl_table *, int ,
|
||||
void __user *, size_t *, loff_t *);
|
||||
extern int proc_soft_watchdog(struct ctl_table *, int ,
|
||||
void __user *, size_t *, loff_t *);
|
||||
extern int proc_watchdog_thresh(struct ctl_table *, int ,
|
||||
void __user *, size_t *, loff_t *);
|
||||
extern int proc_watchdog_cpumask(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
int proc_watchdog(struct ctl_table *, int, void *, size_t *, loff_t *);
|
||||
int proc_nmi_watchdog(struct ctl_table *, int , void *, size_t *, loff_t *);
|
||||
int proc_soft_watchdog(struct ctl_table *, int , void *, size_t *, loff_t *);
|
||||
int proc_watchdog_thresh(struct ctl_table *, int , void *, size_t *, loff_t *);
|
||||
int proc_watchdog_cpumask(struct ctl_table *, int, void *, size_t *, loff_t *);
|
||||
|
||||
#ifdef CONFIG_HAVE_ACPI_APEI_NMI
|
||||
#include <asm/nmi.h>
|
||||
|
|
|
|||
|
|
@ -1280,15 +1280,12 @@ extern int sysctl_perf_cpu_time_max_percent;
|
|||
|
||||
extern void perf_sample_event_took(u64 sample_len_ns);
|
||||
|
||||
extern int perf_proc_update_handler(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos);
|
||||
extern int perf_cpu_time_max_percent_handler(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos);
|
||||
|
||||
int perf_proc_update_handler(struct ctl_table *table, int write,
|
||||
void *buffer, size_t *lenp, loff_t *ppos);
|
||||
int perf_cpu_time_max_percent_handler(struct ctl_table *table, int write,
|
||||
void *buffer, size_t *lenp, loff_t *ppos);
|
||||
int perf_event_max_stack_handler(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp, loff_t *ppos);
|
||||
void *buffer, size_t *lenp, loff_t *ppos);
|
||||
|
||||
/* Access to perf_event_open(2) syscall. */
|
||||
#define PERF_SECURITY_OPEN 0
|
||||
|
|
|
|||
|
|
@ -108,6 +108,9 @@ extern void transfer_pid(struct task_struct *old, struct task_struct *new,
|
|||
struct pid_namespace;
|
||||
extern struct pid_namespace init_pid_ns;
|
||||
|
||||
extern int pid_max;
|
||||
extern int pid_max_min, pid_max_max;
|
||||
|
||||
/*
|
||||
* look up a PID in the hash table. Must be called with the tasklist_lock
|
||||
* or rcu_read_lock() held.
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ extern int printk_delay_msec;
|
|||
extern int dmesg_restrict;
|
||||
|
||||
extern int
|
||||
devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write, void __user *buf,
|
||||
devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write, void *buf,
|
||||
size_t *lenp, loff_t *ppos);
|
||||
|
||||
extern void wake_up_klogd(void);
|
||||
|
|
|
|||
|
|
@ -12,9 +12,8 @@ extern unsigned int sysctl_hung_task_panic;
|
|||
extern unsigned long sysctl_hung_task_timeout_secs;
|
||||
extern unsigned long sysctl_hung_task_check_interval_secs;
|
||||
extern int sysctl_hung_task_warnings;
|
||||
extern int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,
|
||||
void __user *buffer,
|
||||
size_t *lenp, loff_t *ppos);
|
||||
int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,
|
||||
void *buffer, size_t *lenp, loff_t *ppos);
|
||||
#else
|
||||
/* Avoid need for ifdefs elsewhere in the code */
|
||||
enum { sysctl_hung_task_timeout_secs = 0 };
|
||||
|
|
@ -43,8 +42,7 @@ extern __read_mostly unsigned int sysctl_sched_migration_cost;
|
|||
extern __read_mostly unsigned int sysctl_sched_nr_migrate;
|
||||
|
||||
int sched_proc_update_handler(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *length,
|
||||
loff_t *ppos);
|
||||
void *buffer, size_t *length, loff_t *ppos);
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
@ -72,33 +70,21 @@ extern unsigned int sysctl_sched_autogroup_enabled;
|
|||
extern int sysctl_sched_rr_timeslice;
|
||||
extern int sched_rr_timeslice;
|
||||
|
||||
extern int sched_rr_handler(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos);
|
||||
|
||||
extern int sched_rt_handler(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos);
|
||||
|
||||
#ifdef CONFIG_UCLAMP_TASK
|
||||
extern int sysctl_sched_uclamp_handler(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos);
|
||||
#endif
|
||||
|
||||
extern int sysctl_numa_balancing(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos);
|
||||
|
||||
extern int sysctl_schedstats(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos);
|
||||
int sched_rr_handler(struct ctl_table *table, int write, void *buffer,
|
||||
size_t *lenp, loff_t *ppos);
|
||||
int sched_rt_handler(struct ctl_table *table, int write, void *buffer,
|
||||
size_t *lenp, loff_t *ppos);
|
||||
int sysctl_sched_uclamp_handler(struct ctl_table *table, int write,
|
||||
void *buffer, size_t *lenp, loff_t *ppos);
|
||||
int sysctl_numa_balancing(struct ctl_table *table, int write, void *buffer,
|
||||
size_t *lenp, loff_t *ppos);
|
||||
int sysctl_schedstats(struct ctl_table *table, int write, void *buffer,
|
||||
size_t *lenp, loff_t *ppos);
|
||||
|
||||
#if defined(CONFIG_ENERGY_MODEL) && defined(CONFIG_CPU_FREQ_GOV_SCHEDUTIL)
|
||||
extern unsigned int sysctl_sched_energy_aware;
|
||||
extern int sched_energy_aware_handler(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos);
|
||||
int sched_energy_aware_handler(struct ctl_table *table, int write,
|
||||
void *buffer, size_t *lenp, loff_t *ppos);
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_SCHED_SYSCTL_H */
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ struct request_sock;
|
|||
|
||||
#ifdef CONFIG_MMU
|
||||
extern int mmap_min_addr_handler(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp, loff_t *ppos);
|
||||
void *buffer, size_t *lenp, loff_t *ppos);
|
||||
#endif
|
||||
|
||||
/* security_inode_init_security callback function to write xattrs */
|
||||
|
|
|
|||
|
|
@ -44,35 +44,26 @@ struct ctl_dir;
|
|||
|
||||
extern const int sysctl_vals[];
|
||||
|
||||
typedef int proc_handler (struct ctl_table *ctl, int write,
|
||||
void __user *buffer, size_t *lenp, loff_t *ppos);
|
||||
typedef int proc_handler(struct ctl_table *ctl, int write, void *buffer,
|
||||
size_t *lenp, loff_t *ppos);
|
||||
|
||||
extern int proc_dostring(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
extern int proc_dointvec(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
extern int proc_douintvec(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
extern int proc_dointvec_minmax(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
extern int proc_douintvec_minmax(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos);
|
||||
extern int proc_dointvec_jiffies(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
extern int proc_dointvec_userhz_jiffies(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
extern int proc_dointvec_ms_jiffies(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
extern int proc_doulongvec_minmax(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
extern int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
extern int proc_do_large_bitmap(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
extern int proc_do_static_key(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos);
|
||||
int proc_dostring(struct ctl_table *, int, void *, size_t *, loff_t *);
|
||||
int proc_dointvec(struct ctl_table *, int, void *, size_t *, loff_t *);
|
||||
int proc_douintvec(struct ctl_table *, int, void *, size_t *, loff_t *);
|
||||
int proc_dointvec_minmax(struct ctl_table *, int, void *, size_t *, loff_t *);
|
||||
int proc_douintvec_minmax(struct ctl_table *table, int write, void *buffer,
|
||||
size_t *lenp, loff_t *ppos);
|
||||
int proc_dointvec_jiffies(struct ctl_table *, int, void *, size_t *, loff_t *);
|
||||
int proc_dointvec_userhz_jiffies(struct ctl_table *, int, void *, size_t *,
|
||||
loff_t *);
|
||||
int proc_dointvec_ms_jiffies(struct ctl_table *, int, void *, size_t *,
|
||||
loff_t *);
|
||||
int proc_doulongvec_minmax(struct ctl_table *, int, void *, size_t *, loff_t *);
|
||||
int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int, void *,
|
||||
size_t *, loff_t *);
|
||||
int proc_do_large_bitmap(struct ctl_table *, int, void *, size_t *, loff_t *);
|
||||
int proc_do_static_key(struct ctl_table *table, int write, void *buffer,
|
||||
size_t *lenp, loff_t *ppos);
|
||||
|
||||
/*
|
||||
* Register a set of sysctl names by calling register_sysctl_table
|
||||
|
|
@ -207,7 +198,15 @@ void unregister_sysctl_table(struct ctl_table_header * table);
|
|||
|
||||
extern int sysctl_init(void);
|
||||
|
||||
extern int pwrsw_enabled;
|
||||
extern int unaligned_enabled;
|
||||
extern int unaligned_dump_stack;
|
||||
extern int no_unaligned_warning;
|
||||
|
||||
extern struct ctl_table sysctl_mount_point[];
|
||||
extern struct ctl_table random_table[];
|
||||
extern struct ctl_table firmware_config_table[];
|
||||
extern struct ctl_table epoll_table[];
|
||||
|
||||
#else /* CONFIG_SYSCTL */
|
||||
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,
|
|||
|
||||
#endif /* CONFIG_SYSCTL */
|
||||
|
||||
int sysctl_max_threads(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp, loff_t *ppos);
|
||||
int sysctl_max_threads(struct ctl_table *table, int write, void *buffer,
|
||||
size_t *lenp, loff_t *ppos);
|
||||
|
||||
#endif /* _LINUX_SYSCTL_H */
|
||||
|
|
|
|||
|
|
@ -201,8 +201,7 @@ struct ctl_table;
|
|||
|
||||
extern unsigned int sysctl_timer_migration;
|
||||
int timer_migration_handler(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos);
|
||||
void *buffer, size_t *lenp, loff_t *ppos);
|
||||
#endif
|
||||
|
||||
unsigned long __round_jiffies(unsigned long j, int cpu);
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ extern int sysctl_stat_interval;
|
|||
#define DISABLE_NUMA_STAT 0
|
||||
extern int sysctl_vm_numa_stat;
|
||||
DECLARE_STATIC_KEY_TRUE(vm_numa_stat_key);
|
||||
extern int sysctl_vm_numa_stat_handler(struct ctl_table *table,
|
||||
int write, void __user *buffer, size_t *length, loff_t *ppos);
|
||||
int sysctl_vm_numa_stat_handler(struct ctl_table *table, int write,
|
||||
void *buffer, size_t *length, loff_t *ppos);
|
||||
#endif
|
||||
|
||||
struct reclaim_stat {
|
||||
|
|
@ -274,8 +274,8 @@ void cpu_vm_stats_fold(int cpu);
|
|||
void refresh_zone_stat_thresholds(void);
|
||||
|
||||
struct ctl_table;
|
||||
int vmstat_refresh(struct ctl_table *, int write,
|
||||
void __user *buffer, size_t *lenp, loff_t *ppos);
|
||||
int vmstat_refresh(struct ctl_table *, int write, void *buffer, size_t *lenp,
|
||||
loff_t *ppos);
|
||||
|
||||
void drain_zonestat(struct zone *zone, struct per_cpu_pageset *);
|
||||
|
||||
|
|
|
|||
|
|
@ -362,24 +362,18 @@ extern int vm_highmem_is_dirtyable;
|
|||
extern int block_dump;
|
||||
extern int laptop_mode;
|
||||
|
||||
extern int dirty_background_ratio_handler(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos);
|
||||
extern int dirty_background_bytes_handler(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos);
|
||||
extern int dirty_ratio_handler(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos);
|
||||
extern int dirty_bytes_handler(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos);
|
||||
int dirty_background_ratio_handler(struct ctl_table *table, int write,
|
||||
void *buffer, size_t *lenp, loff_t *ppos);
|
||||
int dirty_background_bytes_handler(struct ctl_table *table, int write,
|
||||
void *buffer, size_t *lenp, loff_t *ppos);
|
||||
int dirty_ratio_handler(struct ctl_table *table, int write,
|
||||
void *buffer, size_t *lenp, loff_t *ppos);
|
||||
int dirty_bytes_handler(struct ctl_table *table, int write,
|
||||
void *buffer, size_t *lenp, loff_t *ppos);
|
||||
int dirtytime_interval_handler(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp, loff_t *ppos);
|
||||
|
||||
struct ctl_table;
|
||||
int dirty_writeback_centisecs_handler(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
void *buffer, size_t *lenp, loff_t *ppos);
|
||||
int dirty_writeback_centisecs_handler(struct ctl_table *table, int write,
|
||||
void *buffer, size_t *lenp, loff_t *ppos);
|
||||
|
||||
void global_dirty_limits(unsigned long *pbackground, unsigned long *pdirty);
|
||||
unsigned long wb_calc_thresh(struct bdi_writeback *wb, unsigned long thresh);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue