fixes for work.sysctl
Subsystems (5)
Hi Al,
a bunch of fixes for the sysctl kernel pointer conversion against your work.sysctl branch. Only the first one is a real behavior fix, the rest just removes left over __user annotations.
PATCH 1/4 net/sysctl: use cpumask_parse in flow_limit_cpu_sysctl
cpumask_parse_user works on __user pointers, so this is wrong now.
--- net/core/sysctl_net_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/core/sysctl_net_core.c +1 -1
@@ -126,7 +126,7 @@ static int flow_limit_cpu_sysctl(struct ctl_table *table, int write,return -ENOMEM ;if (write) { - ret =cpumask_parse_user (buffer, *lenp, mask); + ret =cpumask_parse (buffer, mask);if (ret) goto done;
Signature · 1 line
2.26.2
PATCH 2/4 net/sysctl: remove leftover __user annotations on neigh_proc_dointvec*
In reply to Christoph HellwigRemove the leftover __user annotation on the prototypes for neigh_proc_dointvec*. The implementations already got this right, but the headers kept the __user tags around.
--- include/net/neighbour.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
include/net/neighbour.h +3 -4
@@ -392,13 +392,12 @@ void *neigh_seq_next(struct seq_file *, void *, loff_t *);void neigh_seq_stop (struct seq_file *,void *);int neigh_proc_dointvec (struct ctl_table *ctl,int write, -void __user *buffer,size_t *lenp,loff_t *ppos); +void *buffer,size_t *lenp,loff_t *ppos);int neigh_proc_dointvec_jiffies (struct ctl_table *ctl,int write, -void __user *buffer, +void *buffer,size_t *lenp,loff_t *ppos);int neigh_proc_dointvec_ms_jiffies (struct ctl_table *ctl,int write, -void __user *buffer, -size_t *lenp,loff_t *ppos); +void *buffer,size_t *lenp,loff_t *ppos);int neigh_sysctl_register (struct net_device *dev,struct neigh_parms *p,proc_handler *proc_handler);
Signature · 1 line
2.26.2
PATCH 3/4 random: fix an incorrect __user annotation on proc_do_entropy
In reply to Christoph HellwigNo user pointers for sysctls anymore.
--- drivers/char/random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/random.c +1 -1
@@ -2087,7 +2087,7 @@ static int proc_do_uuid(struct ctl_table *table, int write,* Return entropy available scaled to integral bits */ static int proc_do_entropy (struct ctl_table *table,int write, -void __user *buffer,size_t *lenp,loff_t *ppos) +void *buffer,size_t *lenp,loff_t *ppos) {struct ctl_table fake_table;int entropy_count;
Signature · 1 line
2.26.2
PATCH 4/4 trace: fix an incorrect __user annotation on stack_trace_sysctl
In reply to Christoph HellwigNo user pointers for sysctls anymore.
--- include/linux/ftrace.h | 5 ++--- kernel/trace/trace_stack.c | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-)
include/linux/ftrace.h +2 -3
@@ -319,9 +319,8 @@ static inline void arch_ftrace_set_direct_caller(struct pt_regs *regs,extern int stack_tracer_enabled; -int stack_trace_sysctl (struct ctl_table *table,int write, -void __user *buffer,size_t *lenp, -loff_t *ppos); +int stack_trace_sysctl (struct ctl_table *table,int write,void *buffer, +size_t *lenp,loff_t *ppos);/* DO NOT MODIFY THIS VARIABLE DIRECTLY! */ DECLARE_PER_CPU (int, disable_stack_tracer);
kernel/trace/trace_stack.c +2 -3
@@ -515,9 +515,8 @@ static const struct file_operations stack_trace_filter_fops = {#endif /* CONFIG_DYNAMIC_FTRACE */ int -stack_trace_sysctl (struct ctl_table *table,int write, -void __user *buffer,size_t *lenp, -loff_t *ppos) +stack_trace_sysctl (struct ctl_table *table,int write,void *buffer, +size_t *lenp,loff_t *ppos) {int was_enabled;int ret;
Signature · 1 line
2.26.2
ping? Can you pick these up now that the original patches are in Linus' tree?
Quoted 5 lines · Christoph Hellwig
Hi Al,
a bunch of fixes for the sysctl kernel pointer conversion against your work.sysctl branch. Only the first one is a real behavior fix, the rest just removes left over
__userannotations.
---end quoted text---
Al Viro
maintainerQuoted 2 lines · Christoph Hellwig
ping? Can you pick these up now that the original patches are in Linus' tree?
Applied and pushed; will send pull request later today.