Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1556796ybz; Thu, 23 Apr 2020 00:48:46 -0700 (PDT) X-Google-Smtp-Source: APiQypJtE4Cm6hzM8DTAK4E8g8briLSsAW3qfWuLkyffV5MElqcr0AHG02/8B5m0ELtVRINDvDGM X-Received: by 2002:a50:e107:: with SMTP id h7mr1789402edl.124.1587628126651; Thu, 23 Apr 2020 00:48:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587628126; cv=none; d=google.com; s=arc-20160816; b=Hl7iTPDHJLQdH7G4ioBkqbkHkgqBww14wUBG7neV7YTAnkRLVcNRmHhphBi94+PhdB T2QlZ9OU2c7fvFQaPO/F0vcunV5t5KVK8PCoIrHQhAH4vuVK+JDnLN+uwKbD+HIAvOHm RpI1rBTX5Rkyb++EiYzZYnbVhSWfwzW4zPGe7CICcG5wmo/Ei5irIy4ZhILP6XnjikGI d073XSebA8RX+UZ+ac/Th7F3JrCMPDXivrDvgWjGSPHfXeZ7r4w1enz4gH8Rv4IMolrW 4mpWy0hYu1QOXmXzlJcBxtvrUXD3TTw6DkrEMqRaGk2NIAe4R/VPy6gUdpgTkrW229p2 E+ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=U/O9lRdDqfFxIFgSwAyPR5AZJG0gGagWbgZwtyqIE1s=; b=aDp93UzLS4fanybs1FnkYaYU5oVeQJsndgPpfsfqgj0GyIsSRwcNr9O7rpNWV42ISX CBXzUBUNAFJ6TEshKtuDyAKJsiqZRyUrIIGBsTfQM/L51rLHpPW8zxPryL92bsMVTpH7 IMOYXdKxZBySCNxZh1G3FzVi/ZrSFY4onWf6QuzOgg4Iwh8ssWJz0mql+1rhpeyM65WK ETXJE6BIihqUk7m45IxVyCHYuf2P4IuKarpY2MfOlK8u6y0njQupUZG+i3tRB3OBKHS2 5JoDbfVDLMVqjLoXMlyxMPFgE6rWoQ0L2JwoXrfQtRy0/XgSf2vNe5AqWV+nLLmk5VEt VKZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=SZbvfAg3; 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 oc19si883409ejb.487.2020.04.23.00.48.23; Thu, 23 Apr 2020 00:48:46 -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=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=SZbvfAg3; 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 S1726913AbgDWHqB (ORCPT + 99 others); Thu, 23 Apr 2020 03:46:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726894AbgDWHp7 (ORCPT ); Thu, 23 Apr 2020 03:45:59 -0400 Received: from mail-ej1-x644.google.com (mail-ej1-x644.google.com [IPv6:2a00:1450:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 598A1C08E859 for ; Thu, 23 Apr 2020 00:45:58 -0700 (PDT) Received: by mail-ej1-x644.google.com with SMTP id rh22so3960456ejb.12 for ; Thu, 23 Apr 2020 00:45:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=U/O9lRdDqfFxIFgSwAyPR5AZJG0gGagWbgZwtyqIE1s=; b=SZbvfAg3vKXVp2Bj6SzEbypHd8TcS8FOnLIPN3m3fIltj+7zvfKqbglHePHyiMIw4d L7y2aQxIghQZ2RRQ8vGfkRng0rgqzmFWYSV1Mdju6SgL14AawzPKICoHD1TS3SAs4iGA h5xqKiP5EjUypnsMeu7Jrk9alecd94GKN2TUk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=U/O9lRdDqfFxIFgSwAyPR5AZJG0gGagWbgZwtyqIE1s=; b=cKZmD49IMYKAZLbaGPdlnnpjne7MOEkPMyTsqMBvQhjzXG0/ypJ6yYdC9sbUj8IHYW MIm11p6vTGp6b+7cxKAn9KalW2jykucxGcUumY+Tm5V5rfgBfpDVgxWpsSv1cRv/sDZA vuNCLn/MAOcCXA01nzD8Pll/CYrand5AThAtdWqvXIlx1NsSoiYSgGXN0Ek4gvk8D8yw KQ2FLHHob4dVjr0sq5xNUMHytL0sQY9o0a7kTlrvPyU70xIBUUXqJjpDZdthgOhE0Yaa t4CgdhIAzsCH2Kyzb68a8thXwIoN8ILAGL5vaflATOoyWNkLlgvPbePXFUFknWhYvD6P MMyw== X-Gm-Message-State: AGi0PubV9yIxkR4eSNEKd3TTjx6NzR498u7DZYOLRfOVGXrkrp0d6q3v FcmbEIAJZN+ibSLbZ3v7DXFPI0VZzgpObp46N/fYrw== X-Received: by 2002:a17:906:3399:: with SMTP id v25mr1527743eja.217.1587627956915; Thu, 23 Apr 2020 00:45:56 -0700 (PDT) MIME-Version: 1.0 References: <9873b8bd7d14ff8cd2a5782b434b39f076679eeb.1587531463.git.josh@joshtriplett.org> <20200423004807.GC161058@localhost> <20200423044226.GH161058@localhost> <20200423073310.GA169998@localhost> In-Reply-To: <20200423073310.GA169998@localhost> From: Miklos Szeredi Date: Thu, 23 Apr 2020 09:45:45 +0200 Message-ID: Subject: Re: [PATCH v5 2/3] fs: openat2: Extend open_how to allow userspace-selected fds To: Josh Triplett Cc: Michael Kerrisk , io-uring@vger.kernel.org, "linux-fsdevel@vger.kernel.org" , lkml , Alexander Viro , Arnd Bergmann , Jens Axboe , Aleksa Sarai , linux-man , Linux API Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 23, 2020 at 9:33 AM Josh Triplett wrote: > > What are the plans for those syscalls that don't easily lend > > themselves to this modification (such as accept(2))? > > accept4 has a flags argument with more flags available, so it'd be > entirely possible to cleanly extend it further without introducing a new > version. Variable argument syscalls, you are thinking? > > I mean, you could open the file descriptor outside of io_uring in such > > cases, no? > > I would prefer to not introduce that limitation in the first place, and > instead open normal file descriptors. > > > The point of O_SPECIFIC_FD is to be able to perform short > > sequences of open/dosomething/close without having to block and having > > to issue separate syscalls. > > "close" is not a required component. It's entirely possible to use > io_uring to open a file descriptor, do various things with it, and then > leave it open for subsequent usage via either other io_uring chains or > standalone syscalls. If this use case arraises, we could add an op to dup/move a private descriptor to a public one. io_uring can return values, right? Still not convinced... Thanks, Miklos