lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <E5C654FA-1F38-43C4-940D-80563A3B2647@fb.com>
Date:   Thu, 20 May 2021 23:45:04 +0000
From:   Song Liu <songliubraving@...com>
To:     Pavel Begunkov <asml.silence@...il.com>
CC:     "io-uring@...r.kernel.org" <io-uring@...r.kernel.org>,
        Networking <netdev@...r.kernel.org>,
        "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Jens Axboe <axboe@...nel.dk>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>, Martin Lau <kafai@...com>,
        Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>,
        Horst Schirmeier <horst.schirmeier@...dortmund.de>,
        "Franz-B . Tuneke" <franz-bernhard.tuneke@...dortmund.de>,
        Christian Dietrich <stettberger@...ucode.de>
Subject: Re: [PATCH 13/23] io_uring: implement bpf prog registration



> On May 19, 2021, at 7:13 AM, Pavel Begunkov <asml.silence@...il.com> wrote:
> 
> [de]register BPF programs through io_uring_register() with new
> IORING_ATTACH_BPF and IORING_DETACH_BPF commands.
> 
> Signed-off-by: Pavel Begunkov <asml.silence@...il.com>
> ---
> fs/io_uring.c                 | 81 +++++++++++++++++++++++++++++++++++
> include/uapi/linux/io_uring.h |  2 +
> 2 files changed, 83 insertions(+)
> 
> diff --git a/fs/io_uring.c b/fs/io_uring.c
> index 882b16b5e5eb..b13cbcd5c47b 100644
> --- a/fs/io_uring.c
> +++ b/fs/io_uring.c
> @@ -78,6 +78,7 @@
> #include <linux/task_work.h>
> #include <linux/pagemap.h>
> #include <linux/io_uring.h>
> +#include <linux/bpf.h>
> 
> #define CREATE_TRACE_POINTS
> #include <trace/events/io_uring.h>
> @@ -103,6 +104,8 @@
> #define IORING_MAX_RESTRICTIONS	(IORING_RESTRICTION_LAST + \
> 				 IORING_REGISTER_LAST + IORING_OP_LAST)
> 
> +#define IORING_MAX_BPF_PROGS	100

Is 100 a realistic number here? 

> +
> #define SQE_VALID_FLAGS	(IOSQE_FIXED_FILE|IOSQE_IO_DRAIN|IOSQE_IO_LINK|	\
> 				IOSQE_IO_HARDLINK | IOSQE_ASYNC | \
> 				IOSQE_BUFFER_SELECT)
> @@ -266,6 +269,10 @@ struct io_restriction {
> 	bool registered;
> };
> 

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ