Re: strace of io_uring events?

2020-07-24 Thread Stefano Garzarella
On Thu, Jul 23, 2020 at 09:37:40AM -0400, Colin Walters wrote: > On Tue, Jul 21, 2020, at 11:58 AM, Stefano Garzarella wrote: > > > my use case concerns virtualization. The idea, that I described in the > > proposal of io-uring restrictions [1], is to share io_uring CQ and SQ queues > > with a

Re: strace of io_uring events?

2020-07-23 Thread Colin Walters
On Tue, Jul 21, 2020, at 11:58 AM, Stefano Garzarella wrote: > my use case concerns virtualization. The idea, that I described in the > proposal of io-uring restrictions [1], is to share io_uring CQ and SQ queues > with a guest VM for block operations. Virtualization being a strong security

Re: strace of io_uring events?

2020-07-23 Thread Stefan Hajnoczi
On Tue, Jul 21, 2020 at 05:58:48PM +0200, Stefano Garzarella wrote: > On Tue, Jul 21, 2020 at 08:27:34AM -0700, Andy Lutomirski wrote: > > On Fri, Jul 17, 2020 at 1:02 AM Stefano Garzarella > > wrote: > > > > > > On Thu, Jul 16, 2020 at 08:12:35AM -0700, Kees Cook wrote: > > > > On Thu, Jul 16,

Re: strace of io_uring events?

2020-07-21 Thread Andres Freund
Hi, On 2020-07-21 12:44:09 -0700, Andy Lutomirski wrote: > Can you enlighten me? I don't see any iov_iter_get_pages() calls or > equivalents. If an IO is punted, how does the data end up in the > io_uring_enter() caller's mm? For operations needing that io_op_def.needs_mm is true. Which is

Re: strace of io_uring events?

2020-07-21 Thread Jens Axboe
On 7/21/20 1:44 PM, Andy Lutomirski wrote: > On Tue, Jul 21, 2020 at 11:39 AM Jens Axboe wrote: >> >> On 7/21/20 11:44 AM, Andy Lutomirski wrote: >>> On Tue, Jul 21, 2020 at 10:30 AM Jens Axboe wrote: On 7/21/20 11:23 AM, Andy Lutomirski wrote: > On Tue, Jul 21, 2020 at 8:31 AM

Re: strace of io_uring events?

2020-07-21 Thread Andy Lutomirski
On Tue, Jul 21, 2020 at 11:39 AM Jens Axboe wrote: > > On 7/21/20 11:44 AM, Andy Lutomirski wrote: > > On Tue, Jul 21, 2020 at 10:30 AM Jens Axboe wrote: > >> > >> On 7/21/20 11:23 AM, Andy Lutomirski wrote: > >>> On Tue, Jul 21, 2020 at 8:31 AM Jens Axboe wrote: > > On 7/21/20 9:27

Re: strace of io_uring events?

2020-07-21 Thread Andres Freund
Hi, On 2020-07-21 10:23:22 -0700, Andy Lutomirski wrote: > Andres, how final is your Postgres branch? Not final at all. Some of the constraints like needing to submit/receive completions to/from multiple processes are pretty immovable though. > I'm wondering if we could get away with requiring

Re: strace of io_uring events?

2020-07-21 Thread Jens Axboe
On 7/21/20 11:44 AM, Andy Lutomirski wrote: > On Tue, Jul 21, 2020 at 10:30 AM Jens Axboe wrote: >> >> On 7/21/20 11:23 AM, Andy Lutomirski wrote: >>> On Tue, Jul 21, 2020 at 8:31 AM Jens Axboe wrote: On 7/21/20 9:27 AM, Andy Lutomirski wrote: > On Fri, Jul 17, 2020 at 1:02 AM

Re: strace of io_uring events?

2020-07-21 Thread Andy Lutomirski
On Tue, Jul 21, 2020 at 10:30 AM Jens Axboe wrote: > > On 7/21/20 11:23 AM, Andy Lutomirski wrote: > > On Tue, Jul 21, 2020 at 8:31 AM Jens Axboe wrote: > >> > >> On 7/21/20 9:27 AM, Andy Lutomirski wrote: > >>> On Fri, Jul 17, 2020 at 1:02 AM Stefano Garzarella > >>> wrote: > > On

Re: strace of io_uring events?

2020-07-21 Thread Jens Axboe
On 7/21/20 11:23 AM, Andy Lutomirski wrote: > On Tue, Jul 21, 2020 at 8:31 AM Jens Axboe wrote: >> >> On 7/21/20 9:27 AM, Andy Lutomirski wrote: >>> On Fri, Jul 17, 2020 at 1:02 AM Stefano Garzarella >>> wrote: On Thu, Jul 16, 2020 at 08:12:35AM -0700, Kees Cook wrote: > On Thu,

Re: strace of io_uring events?

2020-07-21 Thread Andy Lutomirski
On Tue, Jul 21, 2020 at 8:31 AM Jens Axboe wrote: > > On 7/21/20 9:27 AM, Andy Lutomirski wrote: > > On Fri, Jul 17, 2020 at 1:02 AM Stefano Garzarella > > wrote: > >> > >> On Thu, Jul 16, 2020 at 08:12:35AM -0700, Kees Cook wrote: > >>> On Thu, Jul 16, 2020 at 03:14:04PM +0200, Stefano

Re: strace of io_uring events?

2020-07-21 Thread Stefano Garzarella
On Tue, Jul 21, 2020 at 08:27:34AM -0700, Andy Lutomirski wrote: > On Fri, Jul 17, 2020 at 1:02 AM Stefano Garzarella > wrote: > > > > On Thu, Jul 16, 2020 at 08:12:35AM -0700, Kees Cook wrote: > > > On Thu, Jul 16, 2020 at 03:14:04PM +0200, Stefano Garzarella wrote: > > > > access (IIUC) is

Re: strace of io_uring events?

2020-07-21 Thread Jens Axboe
On 7/21/20 9:27 AM, Andy Lutomirski wrote: > On Fri, Jul 17, 2020 at 1:02 AM Stefano Garzarella > wrote: >> >> On Thu, Jul 16, 2020 at 08:12:35AM -0700, Kees Cook wrote: >>> On Thu, Jul 16, 2020 at 03:14:04PM +0200, Stefano Garzarella wrote: > >>> access (IIUC) is possible without actually

Re: strace of io_uring events?

2020-07-21 Thread Andy Lutomirski
On Fri, Jul 17, 2020 at 1:02 AM Stefano Garzarella wrote: > > On Thu, Jul 16, 2020 at 08:12:35AM -0700, Kees Cook wrote: > > On Thu, Jul 16, 2020 at 03:14:04PM +0200, Stefano Garzarella wrote: > > access (IIUC) is possible without actually calling any of the io_uring > > syscalls. Is that

Re: strace of io_uring events?

2020-07-17 Thread Cyril Hrubis
Hi! > > - Why aren't the io_uring syscalls in the man-page git? (It seems like > > they're in liburing, but that's should document the _library_ not the > > syscalls, yes?) > > I imagine because using the syscall requires specific memory barriers > which we probably don't want most C programs

Re: strace of io_uring events?

2020-07-17 Thread Stefano Garzarella
On Thu, Jul 16, 2020 at 08:12:35AM -0700, Kees Cook wrote: > On Thu, Jul 16, 2020 at 03:14:04PM +0200, Stefano Garzarella wrote: > > On Wed, Jul 15, 2020 at 04:07:00PM -0700, Kees Cook wrote: > > [...] > > > > > Speaking to Stefano's proposal[1]: > > > > > > - There appear to be three classes of

Re: strace of io_uring events?

2020-07-16 Thread Andy Lutomirski
> On Jul 15, 2020, at 4:07 PM, Kees Cook wrote: > > Earlier Andy Lutomirski wrote: >> Let’s add some seccomp folks. We probably also want to be able to run >> seccomp-like filters on io_uring requests. So maybe io_uring should call into >> seccomp-and-tracing code for each action. > > Okay, I'm

Re: strace of io_uring events?

2020-07-16 Thread Kees Cook
On Thu, Jul 16, 2020 at 11:17:55PM +1000, Aleksa Sarai wrote: > On 2020-07-15, Kees Cook wrote: > > In the basic case of "I want to run strace", this is really just a > > creative use of ptrace in that interception is being used only for > > reporting. Does ptrace need to grow a way to

Re: strace of io_uring events?

2020-07-16 Thread Kees Cook
On Thu, Jul 16, 2020 at 03:14:04PM +0200, Stefano Garzarella wrote: > On Wed, Jul 15, 2020 at 04:07:00PM -0700, Kees Cook wrote: > [...] > > > Speaking to Stefano's proposal[1]: > > > > - There appear to be three classes of desired restrictions: > > - opcodes for io_uring_register() (which can

Re: strace of io_uring events?

2020-07-16 Thread Aleksa Sarai
On 2020-07-15, Kees Cook wrote: > Earlier Andy Lutomirski wrote: > > Let’s add some seccomp folks. We probably also want to be able to run > > seccomp-like filters on io_uring requests. So maybe io_uring should call > > into > > seccomp-and-tracing code for each action. > > Okay, I'm finally

Re: strace of io_uring events?

2020-07-16 Thread Stefano Garzarella
+Cc Stefan Hajnoczi On Wed, Jul 15, 2020 at 04:07:00PM -0700, Kees Cook wrote: > Earlier Andy Lutomirski wrote: > > Let’s add some seccomp folks. We probably also want to be able to run > > seccomp-like filters on io_uring requests. So maybe io_uring should call > > into > > seccomp-and-tracing

Re: strace of io_uring events?

2020-07-15 Thread tytso
On Wed, Jul 15, 2020 at 06:11:30PM +0100, Matthew Wilcox wrote: > On Wed, Jul 15, 2020 at 07:35:50AM -0700, Andy Lutomirski wrote: > > > On Jul 15, 2020, at 4:12 AM, Miklos Szeredi wrote: > > > This thread is to discuss the possibility of stracing requests > > > submitted through io_uring. I'm

Re: strace of io_uring events?

2020-07-15 Thread Kees Cook
Earlier Andy Lutomirski wrote: > Let’s add some seccomp folks. We probably also want to be able to run > seccomp-like filters on io_uring requests. So maybe io_uring should call into > seccomp-and-tracing code for each action. Okay, I'm finally able to spend time looking at this. And thank you to

Re: strace of io_uring events?

2020-07-15 Thread Pavel Begunkov
On 15/07/2020 23:09, Miklos Szeredi wrote: > On Wed, Jul 15, 2020 at 9:43 PM Pavel Begunkov wrote: >> >> To clear details for those who are not familiar with io_uring: >> >> io_uring has a pair of queues, submission (SQ) and completion queues (CQ), >> both shared between kernel and user spaces.

Re: strace of io_uring events?

2020-07-15 Thread Miklos Szeredi
On Wed, Jul 15, 2020 at 9:43 PM Pavel Begunkov wrote: > > To clear details for those who are not familiar with io_uring: > > io_uring has a pair of queues, submission (SQ) and completion queues (CQ), > both shared between kernel and user spaces. The userspace submits requests > by filling a chunk

Re: strace of io_uring events?

2020-07-15 Thread Pavel Begunkov
On 15/07/2020 20:11, Matthew Wilcox wrote: > On Wed, Jul 15, 2020 at 07:35:50AM -0700, Andy Lutomirski wrote: >>> On Jul 15, 2020, at 4:12 AM, Miklos Szeredi wrote: >>> >>> Hi, > > feff? Are we doing WTF-16 in email now? ;-) > >>> >>> This thread is to discuss the possibility of stracing

Re: strace of io_uring events?

2020-07-15 Thread Matthew Wilcox
On Wed, Jul 15, 2020 at 07:35:50AM -0700, Andy Lutomirski wrote: > > On Jul 15, 2020, at 4:12 AM, Miklos Szeredi wrote: > > > > Hi, feff? Are we doing WTF-16 in email now? ;-) > > > > This thread is to discuss the possibility of stracing requests > > submitted through io_uring. I'm not

Re: strace of io_uring events?

2020-07-15 Thread Andy Lutomirski
> On Jul 15, 2020, at 4:12 AM, Miklos Szeredi wrote: > > Hi, > > This thread is to discuss the possibility of stracing requests > submitted through io_uring. I'm not directly involved in io_uring > development, so I'm posting this out of interest in using strace on > processes utilizing

strace of io_uring events?

2020-07-15 Thread Miklos Szeredi
Hi, This thread is to discuss the possibility of stracing requests submitted through io_uring. I'm not directly involved in io_uring development, so I'm posting this out of interest in using strace on processes utilizing io_uring. io_uring gives the developer a way to bypass the syscall