From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM04-BN3-obe.outbound.protection.outlook.com (mail-eopbgr680116.outbound.protection.outlook.com [40.107.68.116]) by sourceware.org (Postfix) with ESMTPS id 2E7F13854825 for ; Thu, 29 Oct 2020 20:19:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2E7F13854825 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m+y8LhVww64TucrAogq6yFSl5fHWv9Cc/URR9ZjiM8WR1AIUyGzIZg0yJ03lKbYhhqkG0X+xkOu/pjQfRVsUB+Q7UT7nrzIetkUnXCGS+xX95ZNK1OSU2V4ubyVbQmJnrtEibaB0o1FsqYglqLmOONPZAfBY1EL/V95VmLIqzDz9MbIIux2698WQBeJnhnlMSlfkFRiDBkxdOgHh0bFipyuXk1s/7t9RZhm5WMga/jMDTcR0x8Te8Ffx6Y3sy9lb4Kzw9+JITS/casgJlo+M2ZJe86k+1h/SAj3TudCr+Au70eehd1Xf3hpFIKRUnWgwXRfQowTMvzYpzsKacep+Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZTdpojlFm7o3FT1Glg34OojCs8Y6Y3kCVae4Xbnn0/E=; b=cQFuvDJDm+qJupskg6zm/jyn8ya++0bwB24UMVmYU1AMF1lbyuEQNWtDmHI/d26sbKZUg9z62aEkJofqlmb7M+qB1ep8Jo4WctvY3/Mm6ATEZJbtCHMfovQjjNtkSp0QQa3JrO9/VNjvrywsdIKjmsRJAA2jecc7HC9Nm3dMU+stn9GbtSmYnK/ZxL5aZBS6eGacd504cQa3VSv/H8yfAijMd9FEvkrXNZU1Slf66Q+WKMmdRLZtJ9MKehG6yYIiKyJYsi04ACrgHrPL83VYkl6rO6BCldUskxlz6wUkTAF9Kx1NEYQKVgpfX67i6jzwYdX05NH0H+qMHguj9dtfvg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cornell.edu; dmarc=pass action=none header.from=cornell.edu; dkim=pass header.d=cornell.edu; arc=none Received: from MN2PR04MB6176.namprd04.prod.outlook.com (2603:10b6:208:e3::13) by MN2PR04MB6063.namprd04.prod.outlook.com (2603:10b6:208:e3::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.20; Thu, 29 Oct 2020 20:19:04 +0000 Received: from MN2PR04MB6176.namprd04.prod.outlook.com ([fe80::c144:d206:c369:af44]) by MN2PR04MB6176.namprd04.prod.outlook.com ([fe80::c144:d206:c369:af44%7]) with mapi id 15.20.3477.028; Thu, 29 Oct 2020 20:19:04 +0000 Subject: Re: AF_UNIX status report To: cygwin-developers@cygwin.com References: <1d0ea5dc-7e9b-d8fe-5f6e-da7a799a3b13@cornell.edu> <20201027094340.GJ5492@calimero.vinschen.de> From: Ken Brown Message-ID: Date: Thu, 29 Oct 2020 16:19:01 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 In-Reply-To: <20201027094340.GJ5492@calimero.vinschen.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [2604:6000:b407:7f00:44d9:5d48:cfdc:97cd] X-ClientProxiedBy: CH2PR20CA0016.namprd20.prod.outlook.com (2603:10b6:610:58::26) To MN2PR04MB6176.namprd04.prod.outlook.com (2603:10b6:208:e3::13) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [IPv6:2604:6000:b407:7f00:44d9:5d48:cfdc:97cd] (2604:6000:b407:7f00:44d9:5d48:cfdc:97cd) by CH2PR20CA0016.namprd20.prod.outlook.com (2603:10b6:610:58::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.18 via Frontend Transport; Thu, 29 Oct 2020 20:19:03 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bc44176e-71e9-48f1-c783-08d87c47e147 X-MS-TrafficTypeDiagnostic: MN2PR04MB6063: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MXuNR0g8EPA3hEOI6nHVy+tuc7IpqkE60wAJf19srIu/MtT4xKvv7mh3HNwoUuTFFvg+318kKeZoVYk+kj5HU5KeCZ51VEqBOhxBRXyn6Nhyd0BXly+Xf+QT7ir7vPaWljiyDdIxcNAPWNld6/UW+zPnV1KQqCTHudO6wZvQdlVQUEqsuyBWEJWgcSeL5jz30WuHV9oVHTsIpCjsAA0N132uqnqcJmZKdg6/+cuwGSYNncdTZcVzCqKEruRYtzaGbGMyCl6VezT4SMn6o5orP8NTxcbF1tERt8Ff7Sm+y94lZ0UVbt4gdx7FRAUZ3RYelzpG54Y0xZvjsRKDsR+UrmYNkygPeKnnXuqPkrt/RfB2z2FufG3TaAvSKCpw8Z7d X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR04MB6176.namprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(396003)(376002)(39860400002)(346002)(478600001)(786003)(316002)(75432002)(2616005)(31686004)(31696002)(6486002)(7116003)(186003)(86362001)(2906002)(36756003)(6916009)(16526019)(8936002)(8676002)(66476007)(66556008)(66946007)(53546011)(83380400001)(52116002)(5660300002)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: 9glTGgvVImuAIbvlOzL0FENWjBsHCq2nveSyizViIlp5HIVuo8OUepwUDCt3LguKjPr3K9TSMDC3r5KrLOT4xnCXZ9kMGqvzv20QY6qe6i4EWdAv3D9LppHo5xEjbsQOU6BhWrlKY6XrESUN1XKS222dY5fizOn+hL0hE3Svo4wT8KnADUPuK/lc7/T+YWCXtek1kGrG5YwEEfvqjgD/0fTi/G9gI2OEB+SrnNHf27d71rTQ34iuHWSvjnBiVffjjd4QsOUgCVPj0o719cfLG/xexlRAU7eHlUqLsbikzviuu5GVWuORVifcP34lfkPY1atKeyQUMXsDw/FvRQwRNrL5ZWki7R3z6QSMHRNn92QAw/vF9CgnhF153SJEGAi8euTO7ZIu9FLf7vfhvkP8m58iS67xf2EESB9BuTteQyqzTGDCr195TQJ7yxk0coTXEVcT4lPGIV7ZPym4Psvcil0yQ+sQM9jxXAyQwkWpAbgRBc2emPuiCsQK9diSusroptBsE2KPw7JM9ZrQ1csHQqp8iJ7IYdhdyV0jvhqdORRt1QT5uQf6pIrpyrrQyxy3mxlC55ID2U0KApht1KM3bVjGrCQ7tUmPTfUjYpmq80wd8XfEXVNnfPJ3RnaoBOFDPtBL7OMXQmJ0CMdaJreJfVlEevr7on5qZdforh+aPHCEWeFTA5JWkX3NFtjwqf4qKtiV9Ih6pNEjhIvEW5w27A== X-OriginatorOrg: cornell.edu X-MS-Exchange-CrossTenant-Network-Message-Id: bc44176e-71e9-48f1-c783-08d87c47e147 X-MS-Exchange-CrossTenant-AuthSource: MN2PR04MB6176.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2020 20:19:03.8964 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5d7e4366-1b9b-45cf-8e79-b14b27df46e1 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: MklodDKEdXa08ThzB/yNci6R0FPEG3MU/27irbUgF65FCAi1zlovm3Ofqd+asB1dpjhsJ8HyAScyMveHLWPtLg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR04MB6063 X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, MSGID_FROM_MTA_HEADER, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, 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: Thu, 29 Oct 2020 20:19:07 -0000 On 10/27/2020 5:43 AM, Corinna Vinschen wrote: > 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. This sounds reasonable. I have no experience with serialization. Do you happen to know of a good example that I could look at? Thanks. Ken