Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp603562ybh; Wed, 15 Jul 2020 10:12:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVYin1G1Qf4i3x0qxpqwHY6/0bJobLy/jGue9u+r1cxogMH9qJTNO2O3Oy8t1kvBoCfV2e X-Received: by 2002:a05:6402:2d7:: with SMTP id b23mr581661edx.145.1594833130691; Wed, 15 Jul 2020 10:12:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594833130; cv=none; d=google.com; s=arc-20160816; b=pSKfqjActuut2qUX5+bnl/2FA4A/TV4SnVai8KNueJPx3Ey6rP77KOG/Ny72VWLtPy 0bzxTlVwM7eZEUCeb4T2acMz0lzt2WeRB3koP+rLa4s/KNDl/Lde5MuWc/f4yFf5gGBX 91Jn9wP9LNiOXQ3TzfS4a6dGM2eRSzzf4HMSBynN6qF0KWhx9XOI9/mOKqbu+XGaGb4u sXccLtt8IIyOPmbPFDPhH3PeZ8fO4ZYzniSk2iXB4A9sU898xvI/ozpyy+j9QOiwKEb1 5jIFdiYZTAeWkXww1vuo3iOmoXn0FU0z+AGrqbecUNnJ/nGALVBNzQshZM2rdtP1Xf2L dftw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/3C71ZT3/i2h5AJy/cEm92ILo4xf+uGspmUX8gIFfeA=; b=u8waTF/W+Ly4Go3iNBESWZvon8n/tFyMLPVW7WgzT6wy9BochDsoDL1DMe2sTt7UPP ncKOS3B0Wl7W1dyGRD7O+2TeAG3Aakih9WsaZ9pc8I6Frv3y7sqh9tBChsMyE/1mNwtK uo/Puo7/7rit2cJbfqJ1U1VYes1R3HDXn/R78kBuPTpV6ifBT7O1LvLNb7DU4DnlOEWU Lf0VbGNDMxD17ouwcSbIR/ycFUQ2NlzkJEvKNLcPZhhSnJhfPbLPDaEbU7SaTxUBgaO4 bREUEhN5g9aLDhsgWPdeas2+LzU05+NsNznE6iEZndOtCrWmyYHoi9J/GwN67SJQwdSU np0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=MAVaNZA+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g3si1808414edn.594.2020.07.15.10.11.46; Wed, 15 Jul 2020 10:12:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=MAVaNZA+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725909AbgGORLl (ORCPT + 99 others); Wed, 15 Jul 2020 13:11:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725770AbgGORLk (ORCPT ); Wed, 15 Jul 2020 13:11:40 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4394C061755; Wed, 15 Jul 2020 10:11:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=/3C71ZT3/i2h5AJy/cEm92ILo4xf+uGspmUX8gIFfeA=; b=MAVaNZA+4wpy8N4a8DV7/Ey1CO GcBUwEULIN7wwZiVhAlrDdIJFQD9VpE3iPyjIIGRbhVdrbIZuUM38ANGXN5h7cYqbCSfuiKOa/nqA fmwc29uOkslNoqgBO46J36qQjj44j+13NO7DbCzSI+GnahliapIMXgNYoHkZ6MM7Jw1O9gwKlyqna TfloKaHI+Mqvj+ASJdKE89s34OEQ0qPFsHatLjeKnZoULJs77ihoOz1LmVhGvxpsEotOUlx/CCC2I X3mBTnliBCoyp9ymhP+9TSGaUc+j+L2wOHjgrvaoMPJmMFy7xGA1TUlTtz3X8DpGZT2lNo5ZWdUGD uLnap6ng==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvkwM-00022G-Uq; Wed, 15 Jul 2020 17:11:31 +0000 Date: Wed, 15 Jul 2020 18:11:30 +0100 From: Matthew Wilcox To: Andy Lutomirski Cc: Stefano Garzarella , Miklos Szeredi , Kees Cook , Christian Brauner , strace-devel@lists.strace.io, io-uring@vger.kernel.org, Pavel Begunkov , Linux API , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: strace of io_uring events? Message-ID: <20200715171130.GG12769@casper.infradead.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 interface, > > which results in loss of information when tracing. This is a strace > > fragment on "io_uring-cp" from liburing: > > > > io_uring_enter(5, 40, 0, 0, NULL, 8) = 40 > > io_uring_enter(5, 1, 0, 0, NULL, 8) = 1 > > io_uring_enter(5, 1, 0, 0, NULL, 8) = 1 > > ... > > > > What really happens are read + write requests. Without that > > information the strace output is mostly useless. > > > > This loss of information is not new, e.g. calls through the vdso or > > futext fast paths are also invisible to strace. But losing filesystem > > I/O calls are a major blow, imo. > > > > What do people think? > > > > From what I can tell, listing the submitted requests on > > io_uring_enter() would not be hard. Request completion is > > asynchronous, however, and may not require io_uring_enter() syscall. > > Am I correct? > > > > Is there some existing tracing infrastructure that strace could use to > > get async completion events? Should we be introducing one? > > > > > > 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. Adding Stefano since he had a complementary proposal for iouring restrictions that weren't exactly seccomp.