From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.134]) by sourceware.org (Postfix) with ESMTPS id 1743E3850424 for ; Mon, 23 Nov 2020 08:43:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1743E3850424 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=cygwin.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=corinna-cygwin@cygwin.com Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MUp8r-1kpXda0eW1-00Qlnj for ; Mon, 23 Nov 2020 09:43:15 +0100 Received: by calimero.vinschen.de (Postfix, from userid 500) id BDF50A8097E; Mon, 23 Nov 2020 09:43:13 +0100 (CET) Date: Mon, 23 Nov 2020 09:43:13 +0100 From: Corinna Vinschen To: cygwin-developers@cygwin.com Subject: Re: AF_UNIX status report Message-ID: <20201123084313.GK303847@calimero.vinschen.de> Reply-To: cygwin-developers@cygwin.com Mail-Followup-To: cygwin-developers@cygwin.com References: <88b3dfe6-a67d-c597-afe2-4edb13cee5d7@cornell.edu> <20201105172140.GP33165@calimero.vinschen.de> <80cb96b8-065d-b146-b879-170031ba28b5@cornell.edu> <20201106091240.GT33165@calimero.vinschen.de> <99e02f87-1c58-ce6f-58e0-0deb26c4c899@cornell.edu> <20201109090812.GV33165@calimero.vinschen.de> <6c3e9c53-8575-de80-be2d-49af2b87eaa5@cornell.edu> <20201118083447.GL41926@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Provags-ID: V03:K1:2a9xmRR/Esd9Sc9J+F1+PkMTohqJpwLL2cwc4eiG6slbWqzgoPW v5s3wzej3CbyuA/6ZnYIswYcPEy/UatUkT7TdT6ezGgt1efkS/WNNvtmGJJjjTsKmK9EdHt 4AaDWi7NeCVP/SdC53vhtjzkZdyLlJ3ittlhyo8P//Nz0lsPi42jQTFO3VSRkeVEq/QA2TP CDxza+E2fPJJV+t9Tyuvg== X-UI-Out-Filterresults: notjunk:1;V03:K0:fYzv9hsUlOo=:N/4HOkQVsedE5PRQR1J5iU 1HZwWiGto46TmPpz0GOtG4nC0HI/EhY1GuwepBA1uAZF3jQ55uufZzOSI3g0iUxQNi16XtFRh AXj3EjZKrImQxIxA3m5KNfjFaHxXrx/nb9bewLqm9bNS3j411gMANByjgkPgS+PbNBI6grrgF 1Sey/5VZcBBAlsibY7LWdNnRAJ4mY8SmeC4/c8tyo8YWnPCQ/hlNuRm+nkqvtrQI2sQF161vv q21I3mTCN7P7A/W2H3hW0vlZD4nH4aPRtoiRtMvlNZ6lBQvi7sLAUI8sJePKeLVeOAhcUWGdz dgkhPavhAFlQoV3W572TMH3Inwa5jp5BXG/gNpZ8RL269fzLb777AAbEzQFIj2TFzaAUKcXQs dvk6gSSX11NoSHxxSJrd22vTohOYw1aAf98kZELI/Bnjq/jUYe7ikPmIFOXhEY+bY/8PmmlbZ n5dlTYnuVg== X-Spam-Status: No, score=-100.8 required=5.0 tests=BAYES_00, GOOD_FROM_CORINNA_CYGWIN, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin-developers@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component developers mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2020 08:43:18 -0000 On Nov 22 15:44, Ken Brown via Cygwin-developers wrote: > On 11/18/2020 3:34 AM, Corinna Vinschen wrote: > > On Nov 17 14:57, Ken Brown via Cygwin-developers wrote: > > > On 11/9/2020 4:08 AM, Corinna Vinschen wrote: > > > > The duplicated handle has to be closed at one point but otherwise > > > > the approach makes sense. > > > > > > After wasting a ridiculous amount of time because of careless mistakes with > > > handle duplication, I've finally gotten something working (currently for > > > disk files only and with some limitations that have to removed). I've > > > pushed it to the topic/af_unix branch in case you want to review it and/or > > > test it. > > > > This is soooo fantastic! Apart from files, the nexst most interesting > > case is sharing a socket, probably. We could activcate the 2nd half of > > privilege separation in sshd then. > > I've pushed a first attempt to implement sending socket descriptors, but I > haven't yet tested it. I'll try to find a small test program and then, if > all goes well, take a look at sshd. > > > > If you do test it, the main limitation currently is that the sending process > > > can't exit until the receiving process has received and processed the > > > SCM_RIGHTS data. > > > > While this is strictly a flaw, that may not be much of a limitation. > > It would be interesting to know how many applications send descriptors > > just to exit immediately. Not so many, probably. > > I don't know, but I've reduced the effect of the limitation. Now the > sending process waits up to about 100ms for an ack from the receiving > process before closing the socket. I have no idea if 100ms is reasonable in > the real world, but it's big enough for my test programs and small enough > that I don't notice the delay when I run the programs interactively. 100 ms may be a bit low under load. Sounds like a good starting point, though. Corinna