[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHKB1wJANtT27WM6hrhDy_x9H9Lsn4qRjPDmXdKosoL93TJRYg@mail.gmail.com>
Date: Tue, 27 Jun 2023 20:15:33 +0200
From: Matteo Rizzo <matteorizzo@...gle.com>
To: Bart Van Assche <bvanassche@....org>
Cc: linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
io-uring@...r.kernel.org, jordyzomer@...gle.com, evn@...gle.com,
poprdi@...gle.com, corbet@....net, axboe@...nel.dk,
asml.silence@...il.com, akpm@...ux-foundation.org,
keescook@...omium.org, rostedt@...dmis.org,
dave.hansen@...ux.intel.com, ribalda@...omium.org,
chenhuacai@...nel.org, steve@....org, gpiccoli@...lia.com,
ldufour@...ux.ibm.com
Subject: Re: [PATCH 1/1] Add a new sysctl to disable io_uring system-wide
On Tue, 27 Jun 2023 at 19:10, Bart Van Assche <bvanassche@....org> wrote:
> I'm using fio + io_uring all the time on Android devices. I think we need a
> better solution than disabling io_uring system-wide, e.g. a mechanism based
> on SELinux that disables io_uring for apps and that keeps io_uring enabled
> for processes started via 'adb root && adb shell ...'
Android already uses seccomp to prevent untrusted applications from using
io_uring. This patch is aimed at server/desktop environments where there is
no easy way to set a system-wide seccomp policy and right now the only way
to disable io_uring system-wide is to compile it out of the kernel entirely
(not really feasible for e.g. a general-purpose distro).
I thought about adding a capability check that lets privileged processes
bypass this sysctl, but it wasn't clear to me which capability I should use.
For userfaultfd the kernel uses CAP_SYS_PTRACE, but I wasn't sure that's
the best choice here since io_uring has nothing to do with ptrace.
If anyone has any suggestions please let me know. A LSM hook also sounds
like an option but it would be more complicated to implement and use.
Powered by blists - more mailing lists