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 BEC453858D37 for ; Tue, 27 Oct 2020 09:43:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org BEC453858D37 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 (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MQ5nE-1kkUeb101Q-00M0lF for ; Tue, 27 Oct 2020 10:43:41 +0100 Received: by calimero.vinschen.de (Postfix, from userid 500) id 4E7CDA8104F; Tue, 27 Oct 2020 10:43:40 +0100 (CET) Date: Tue, 27 Oct 2020 10:43:40 +0100 From: Corinna Vinschen To: cygwin-developers@cygwin.com Subject: Re: AF_UNIX status report Message-ID: <20201027094340.GJ5492@calimero.vinschen.de> Reply-To: cygwin-developers@cygwin.com Mail-Followup-To: cygwin-developers@cygwin.com References: <1d0ea5dc-7e9b-d8fe-5f6e-da7a799a3b13@cornell.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1d0ea5dc-7e9b-d8fe-5f6e-da7a799a3b13@cornell.edu> X-Provags-ID: V03:K1:fQnijFJ199NqK9hTek5QvU2GjmRFBVW07RLCGC1peVXwOGwBh0U RTp1G85LgJ0wL467qBe16CT04sKmF26eO+Y2sSvnqWGQj3BvMiQHapu+5iJmJ0M0yePuocn iIjB5EFA4MfJuXZEcPiowTsHJ0a0RCKY/TL4403p5dcw/7oqSoyYT+b8Oq5Vlr+RXGCmTR6 rvYPGZZtm92dz8NH1RAgw== X-UI-Out-Filterresults: notjunk:1;V03:K0:w6r4abQCCGw=:SMy8xiZiO3BcuhpBNlFSTR xrM7HrbbULLSJu2u3cL69b2admLw/qSgNIe4fg8pkI+S6dgVsnCEKgwU9/xiQF6iVrWGcBgy5 M8FlRikmOOhP/4sQACVZuxrIsO8sBrQVEu1emmhaJWaXNDGN+Hz2lJ52N4n/tlm6hrAMP3kZX slfvGFHO434QC01kDmmIfsd7vx7o1GTk+TDvTssdbD/EzoBKv0FRLFEzT6vJe7AvTOV2IxSsp XXxOeIMaqIMLznCfyjjw9yc/mlclJqR8dsI1IUjZp8CwZqnTsvCe1EB+uZEGA+rK6jOm4BdrK wbfk1d7d/Cw2fCTLZp2Cc/9DduRduB6vh090XI++Dnh//z8ZcyZo43Ea9AHQFp6GOUhf47nOW SOY+ZSsI+R7sJWTy8vDFDqHNxy+zD3V6zrrm3ZAujvssr0tJ5G8Rp++txSIr7GVgoJAFtGYew yzSxCtyIAA== X-Spam-Status: No, score=-100.9 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: Tue, 27 Oct 2020 09:43:44 -0000 On Oct 26 18:04, Ken Brown via Cygwin-developers wrote: > I've made at least rudimentary implementations of all the > fhandler_socket_unix functions (including those in select.cc) for which > there were previously only placeholders. > > I've pushed everything to topic/af_unix, including a merge with master as of > a couple days ago. > > I've cobbled together a few test programs and put them in > winsup/cygwin/socket_tests on the topic/af_unix branch. I haven't taken the > time to automate the tests, so they all have to be run interactively. There > is a Makefile to build the test programs and a README.txt that shows how to > run them. > > One thing I haven't yet done is to think about (or systematically test) > datagram sockets. I'm sure there's quite a bit of code that won't work for > them. > > Aside from datagram sockets, there are still a few things that I'm working > on, but I'm close to the point where I could use some input: > > 1. I've littered the code in fhandler_socket_unix.cc and select.cc with > FIXME comments on which I'd like advice. I'll look into it. > 2. I haven't given any thought at all as to how to implement SCM_RIGHTS > ancillary data. I could definitely use suggestions on that before I start > thrashing around. I have only vague ideas at that point. Assuming we can replace the socket implemantation with the pipe implementation, what we have is a pipe which can impersonate the peer at least from the server side, and it knows the client process. This in turn can be used to duplicate handles. So what we could do is to define fhandler methods which create a matching serialization and deserialization of the fhandler data, plus duplicating the handles for the other process, sent over the pipe as admin package. This must work in either direction, regardless if the server or the client sends the SCM_RIGHTS block. Corinna