From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x2c.google.com (mail-oa1-x2c.google.com [IPv6:2001:4860:4864:20::2c]) by sourceware.org (Postfix) with ESMTPS id 389583858C66 for ; Fri, 14 Apr 2023 20:30:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 389583858C66 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oa1-x2c.google.com with SMTP id 586e51a60fabf-187916b6543so7654515fac.7 for ; Fri, 14 Apr 2023 13:30:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681504203; x=1684096203; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=X5ltJoP0LE9OwUqNscrDUL6jo9meWv066R7U71QoPQg=; b=eH1DdeJrYEFuEWDm0Zpdjtv+Cy0+J9x+c3QcvhGFJeqfyhV+tHLfdkFcVl8aIeLswP qn6K114El/7CZnUZGrMknq9MqI5U/t7eZA3SY4tG2+AtbKWAaFqW3Hge7FBoe7rMvZWz 0BkElsVAP7lYJGs+Vu/bt2kGH8x14xUvrCDiBgbzmooOBA0uAI/XKC5rb/0yH++T5pps 5qVVXqWW3YLoQYLrV/Ll5Yo9uuQ2XFdY4xGM0tZZJeE5bOjKwJQJ0TegFtZxL2th8PPD DG9dBIM3lTqeEocG3+ZJJIxBwYeU1+snxlWf2rLu86LtupF4JsCc2y4clphlBK4mVLs0 xdAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681504203; x=1684096203; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=X5ltJoP0LE9OwUqNscrDUL6jo9meWv066R7U71QoPQg=; b=IGZ06hasLxT2RywwlvkOXCOxQk5txZ5h3mAp7EaOFO/sW+neJLdTn73N73YAQXMih3 zaL/tL0b6WGuhbGmFXUFdd04GW+95j1QgQIEhQbpjtNuiu7L/msTdWy2/LpNLAHmqyMs /9q86DAeZc3p7wgl3TJBPKH05HMY9LNXKGwxfNmEsmstdzVqwJIuUrJH9Cml8ehwvN74 bYc1f8EODUfpxFzXWig6j19g/3h6M7ZdXtHTw5OKOtjwrFeDqwIkk85uVhdEspn52jXp ZvkPKlkhkxlpvvikcED8Uy4BOqRVbGMd4hNTx6HlxQ9VVIOPvWW8ujOLMZkytKvCpuy7 F1Qw== X-Gm-Message-State: AAQBX9cjIKwGis8xrMDzTJeIercx8Af6ctYcL670MGu9sxzbv1RHJO4T goNGXdSeaDJJkFWiHaWh0X/qbFqcJGHdGpyZnk4QLU/GFuPKVA== X-Google-Smtp-Source: AKy350ZbiADbF8+wtKtCX/nFfiQIZPc5l1bCsv09wI9m1KBmrKDZKuspvLU1ugpIuGyxwRt/r82EJOY1/GfDWT4SC1o= X-Received: by 2002:a05:6871:7a3:b0:184:1c35:630e with SMTP id o35-20020a05687107a300b001841c35630emr3682645oap.4.1681504203429; Fri, 14 Apr 2023 13:30:03 -0700 (PDT) MIME-Version: 1.0 References: <20230411201845.oias7lryrvm3cck7@begin> <20230413115812.267158-1-bugaevc@gmail.com> <20230414173332.afm47w6clabzklex@begin> In-Reply-To: <20230414173332.afm47w6clabzklex@begin> From: Sergey Bugaev Date: Fri, 14 Apr 2023 23:29:51 +0300 Message-ID: Subject: Re: [RFC PATCH glibc v2 26/34] hurd: Remove __hurd_local_reply_port To: Samuel Thibault Cc: libc-alpha@sourceware.org, bug-hurd@gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE,URIBL_BLACK 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: On Fri, Apr 14, 2023 at 8:33=E2=80=AFPM Samuel Thibault wrote: > Applied with fixing the __mig_dealloc_reply_port(NULL) cases, thanks! By the way: that __mig_dealloc_reply_port () inside _dl_sysdep_start_cleanup () is not doing what the author of that code wanted it to do. It deallocates the current reply port, but while doing that, it creates a fresh one in its place. So we just waste an RPC (and a syscall). We should just not do that. It would be nice to not deallocate __mach_{task,host}_self_ too, and instead migrate them into the new libc.so slots. Again, we'd save some RPCs and syscalls without really losing anything. Besides, are we 100% sure that after initially entering libc.so, ld.so will never do any Mach things (RPCs) anymore? We override __open & friends, but it might still be using some smaller Mach things, no? If yes, imagine what would happen when it keeps using its __mach_{task,host}_self_, which it has deallocated, but not even reset to MACH_PORT_NULL. Sergey