lkml.org 
[lkml]   [2021]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 21/23] io_uring: wire bpf copy to user
Date
Enable io_uring to write to userspace memory

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
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
\
 
 \ /
  Last update: 2021-05-19 16:16    [W:0.251 / U:0.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site