[PATCH 21/23] io_uring: wire bpf copy to user

From: Pavel Begunkov
Date: Wed May 19 2021 - 10:16:19 EST


Enable io_uring to write to userspace memory

Signed-off-by: Pavel Begunkov <asml.silence@xxxxxxxxx>
---
fs/io_uring.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/fs/io_uring.c b/fs/io_uring.c
index c37846bca863..c4682146afa4 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -10467,6 +10467,8 @@ io_bpf_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog)
switch (func_id) {
case BPF_FUNC_copy_from_user:
return prog->aux->sleepable ? &bpf_copy_from_user_proto : NULL;
+ case BPF_FUNC_copy_to_user:
+ return prog->aux->sleepable ? &bpf_copy_to_user_proto : NULL;
case BPF_FUNC_iouring_queue_sqe:
return prog->aux->sleepable ? &io_bpf_queue_sqe_proto : NULL;
case BPF_FUNC_iouring_emit_cqe:
--
2.31.1