Conversation

Thorsten Leemhuis (acct. 1/4)

Edited 3 months ago

filter support was merged for 7.0 by @axboe

https://git.kernel.org/torvalds/c/591beb0e3a03258ef9c01893a5209845799a7c33 [update] see also: https://lwn.net/Articles/1054225/ and for the liburing side (which has both man pages and an extensive test case that also demonstrate how to use it) https://git.kernel.org/pub/scm/linux/kernel/git/axboe/liburing.git/commit/ [/update]

""This adds support for both cBPF filters for io_uring, as well as task inherited restrictions and filters. […]

seccomp and io_uring don't play along nicely, […] As a result, things like containers and systemd that apply seccomp filters, can't filter io_uring operations.

That leaves them with just one choice if filtering is critical - filter the actual io_uring_setup(2) system call to simply disallow io_uring. That's rather unfortunate, and has limited us because of it.

io_uring already has some filtering support. […] This first adds support for cBPF filters for opcodes, which enables tighter control over what exactly a specific opcode may do. […] These filters are run post the init phase of the request […] On top of that support is added for per-task filters , meaning that any ring created with a task that has a per-task filter will get those filters applied when it's created.[…]""

1
1
0

@corbet @kernellogger And

https://git.kernel.org/pub/scm/linux/kernel/git/axboe/liburing.git/commit/

for the liburing side, which has both man pages and an extensive test case that also demonstrate how to use it.

1
0
0

@axboe @corbet many thx to both of you, added those link to the initial post

0
0
0