From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id E3C53385772C for ; Sat, 15 Apr 2023 07:42:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E3C53385772C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pnaXr-0001Ht-Vq; Sat, 15 Apr 2023 03:42:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=In-Reply-To:MIME-Version:References:Subject:To:From: Date; bh=ooPQ98xs2TQHIK8gzvc2LKxwUMOlsrjkFwQpVlGbsC8=; b=b5buSWwZr0NC5ShIPSua c6uts4Rc2d0HjWpV3eB5RnjY+1d4s9RvkR7eY0RJrugQ5ecLAOedkav/+vE6JkqwCd3Yt9UhF2tLo NC95zreXi9zA5p8h+ZMJYp+nIvHS0CTnXnf9sAzDgaOJ6aa3nID0Silc13i0A/1UeEX4dLN4zKESC lZg9HPegP8h+1EbR1d9yihFI47gdyHu7qe7Nxp5xact1gdfEh5084UYV1r2WlHR/z/8sfUMjrBFmI Nu3/V1O2FR+SA8rjLYgLoRFLkS4DE58X5LsGBhGfqMYF5fcUNn42OLjY0K4pOuqwo8PLLW9XxT9Gr YpN0uVQZQqBUrg==; Received: from [109.190.253.15] (helo=begin) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pnaXr-0007DF-F4; Sat, 15 Apr 2023 03:42:03 -0400 Received: from samy by begin with local (Exim 4.96) (envelope-from ) id 1pnaXo-003C5u-2B; Sat, 15 Apr 2023 09:42:00 +0200 Date: Sat, 15 Apr 2023 09:42:00 +0200 From: Samuel Thibault To: Sergey Bugaev Cc: libc-alpha@sourceware.org, bug-hurd@gnu.org Subject: Re: [RFC PATCH glibc v2 26/34] hurd: Remove __hurd_local_reply_port Message-ID: <20230415074200.742eea2eaqz52jaa@begin> Mail-Followup-To: Sergey Bugaev , libc-alpha@sourceware.org, bug-hurd@gnu.org References: <20230411201845.oias7lryrvm3cck7@begin> <20230413115812.267158-1-bugaevc@gmail.com> <20230414173332.afm47w6clabzklex@begin> <20230415064546.zkrmdqcrvbczm3to@begin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: I am not organized User-Agent: NeoMutt/20170609 (1.8.3) X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_BARRACUDACENTRAL,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Sergey Bugaev, le sam. 15 avril 2023 10:34:46 +0300, a ecrit: > If you really want to deallocate and reset the current reply port, you > need to do the dance like sigreturn does: > > mach_port_t reply_port = THREAD_GETMEM (THREAD_SELF, reply_port); > THREAD_SETMEM (THREAD_SELF, MACH_PORT_DEAD); > (void) __mach_port_mod_refs (... reply_port ...); > THREAD_SETMEM (THREAD_SELF, MACH_PORT_NULL); Ok. > Maybe there should be a build step that checks that nothing unexpected > gets pulled in, and that nothing system-dependent is ever accessed > other than through dl-sysdep. That can be best, yes. Samuel