summaryrefslogtreecommitdiffstats
path: root/kernel/trace/bpf_trace.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2017-03-20 21:08:07 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2017-03-28 16:43:25 -0400
commitdb68ce10c4f0a27c1ff9fa0e789e5c41f8c4ea63 (patch)
tree77eda1d247853a2d414e0047c620b3c72bb11a1a /kernel/trace/bpf_trace.c
parentaaa2e7ac80f679230faf28a8e12e8d68dbe977eb (diff)
downloadop-kernel-dev-db68ce10c4f0a27c1ff9fa0e789e5c41f8c4ea63.zip
op-kernel-dev-db68ce10c4f0a27c1ff9fa0e789e5c41f8c4ea63.tar.gz
new helper: uaccess_kernel()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel/trace/bpf_trace.c')
-rw-r--r--kernel/trace/bpf_trace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c
index cee9802..f806dbd 100644
--- a/kernel/trace/bpf_trace.c
+++ b/kernel/trace/bpf_trace.c
@@ -96,7 +96,7 @@ BPF_CALL_3(bpf_probe_write_user, void *, unsafe_ptr, const void *, src,
if (unlikely(in_interrupt() ||
current->flags & (PF_KTHREAD | PF_EXITING)))
return -EPERM;
- if (unlikely(segment_eq(get_fs(), KERNEL_DS)))
+ if (unlikely(uaccess_kernel()))
return -EPERM;
if (!access_ok(VERIFY_WRITE, unsafe_ptr, size))
return -EPERM;
OpenPOWER on IntegriCloud