]> git.baikalelectronics.ru Git - kernel.git/commit
sysctl: pass kernel pointers to ->proc_handler
authorChristoph Hellwig <hch@lst.de>
Fri, 24 Apr 2020 06:43:38 +0000 (08:43 +0200)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 27 Apr 2020 06:07:40 +0000 (02:07 -0400)
commitecad013df75865e2909ef7e934be28a22c652a7e
treec488a5564cdde7594c953219a98e22fb4865c812
parentdd242ff55eb946c3cf2f30c510b9a995f99e9c59
sysctl: pass kernel pointers to ->proc_handler

Instead of having all the sysctl handlers deal with user pointers, which
is rather hairy in terms of the BPF interaction, copy the input to and
from  userspace in common code.  This also means that the strings are
always NUL-terminated by the common code, making the API a little bit
safer.

As most handler just pass through the data to one of the common handlers
a lot of the changes are mechnical.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Andrey Ignatov <rdna@fb.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
88 files changed:
arch/arm64/kernel/armv8_deprecated.c
arch/arm64/kernel/fpsimd.c
arch/mips/lasat/sysctl.c
arch/s390/appldata/appldata_base.c
arch/s390/kernel/debug.c
arch/s390/kernel/topology.c
arch/s390/mm/cmm.c
arch/x86/kernel/itmt.c
drivers/cdrom/cdrom.c
drivers/char/random.c
drivers/macintosh/mac_hid.c
drivers/parport/procfs.c
fs/dcache.c
fs/drop_caches.c
fs/file_table.c
fs/fscache/main.c
fs/inode.c
fs/proc/proc_sysctl.c
fs/quota/dquot.c
fs/xfs/xfs_sysctl.c
include/linux/bpf-cgroup.h
include/linux/compaction.h
include/linux/fs.h
include/linux/ftrace.h
include/linux/hugetlb.h
include/linux/kprobes.h
include/linux/latencytop.h
include/linux/mm.h
include/linux/mmzone.h
include/linux/nmi.h
include/linux/perf_event.h
include/linux/printk.h
include/linux/sched/sysctl.h
include/linux/security.h
include/linux/sysctl.h
include/linux/timer.h
include/linux/vmstat.h
include/linux/writeback.h
ipc/ipc_sysctl.c
ipc/mq_sysctl.c
kernel/bpf/cgroup.c
kernel/events/callchain.c
kernel/events/core.c
kernel/kprobes.c
kernel/latencytop.c
kernel/pid_namespace.c
kernel/printk/printk.c
kernel/sched/core.c
kernel/sched/fair.c
kernel/sched/rt.c
kernel/sched/topology.c
kernel/seccomp.c
kernel/sysctl.c
kernel/time/timer.c
kernel/trace/trace.c
kernel/umh.c
kernel/utsname_sysctl.c
kernel/watchdog.c
mm/compaction.c
mm/hugetlb.c
mm/page-writeback.c
mm/page_alloc.c
mm/util.c
mm/vmstat.c
net/bridge/br_netfilter_hooks.c
net/core/neighbour.c
net/core/sysctl_net_core.c
net/decnet/dn_dev.c
net/decnet/sysctl_net_decnet.c
net/ipv4/devinet.c
net/ipv4/route.c
net/ipv4/sysctl_net_ipv4.c
net/ipv6/addrconf.c
net/ipv6/ndisc.c
net/ipv6/route.c
net/ipv6/sysctl_net_ipv6.c
net/mpls/af_mpls.c
net/netfilter/ipvs/ip_vs_ctl.c
net/netfilter/nf_conntrack_standalone.c
net/netfilter/nf_log.c
net/phonet/sysctl.c
net/rds/tcp.c
net/sctp/sysctl.c
net/sunrpc/sysctl.c
net/sunrpc/xprtrdma/svc_rdma.c
security/apparmor/lsm.c
security/min_addr.c
security/yama/yama_lsm.c