From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bee.birch.relay.mailchannels.net (bee.birch.relay.mailchannels.net [23.83.209.14]) by sourceware.org (Postfix) with ESMTPS id 9439D3857B93 for ; Thu, 10 Aug 2023 18:07:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9439D3857B93 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gotplt.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 8EBE214043B; Thu, 10 Aug 2023 18:07:04 +0000 (UTC) Received: from pdx1-sub0-mail-a250.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 21BF21400FD; Thu, 10 Aug 2023 18:07:04 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1691690824; a=rsa-sha256; cv=none; b=WAlH9fNKqytpWm6tJNhqGqI6rYi4nQIfCb/vnJ7KfZfxw4pzprb1c/zYe546T1VZhMbWuv KKQyvYc5WmKMrspyN36Ndr8ZEKNbSBozoeJKqdRx4vMvOMt6+LoanqUSLGAmUt5TfQC3g6 lX88JnWAdRHn/HNS8S57HP9S6AyKP+Ky8HcEepL1T/JsXEOsuDgVgleOokBlGPL7I56Qp5 RmZaNHinH+WXYUh2Aey1BFf0pHNbo6jl9ju6sZaGutlwE45hJcjburapoREn+XXZtHlW7P LCTLF2sjNS97ZRH5ItR3qltrc7yzisH/C/SYxtjOuHU0MAWd9xHxk3DQlWqd0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1691690824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=NU/2wkpvIOImPdpLvtymRk0mXqe11wn3nuRm/QkTrbI=; b=kSO/gAerNgx767m9jMxR7NL1yiBzWXDaGt3lXh5NgbJ22GYvOnQFGdlj3pNUU0iZX1zX6v uIGm8Ph/8Qo5PnZrGQ66VOYg3HzrsCz512JbK3QF3Q7cL3RZY7/hDk87zwVIu9fVrQo/tH 0/Rx02S5T6cWGr74go2/JwWJZyx2eFfGvcWTRXDeoCiIaBYvhD1NK9hlyOwnRkfaVEu01t wpBhP7bZdeIfrWQxM0Hxhra5Cv9HJuU91kLhju5T29k25LtUFAQVv5M1Oo8dx0SJcQtkff 7ndb6hgFOGNfuCPa61PknwPJjyG//W929zTPE/Zq9EW/rg+eaQsolDgIz4cjdg== ARC-Authentication-Results: i=1; rspamd-749bd77c9c-qk8s4; auth=pass smtp.auth=dreamhost smtp.mailfrom=siddhesh@gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Arithmetic-Bitter: 69d790556a357969_1691690824408_2953868660 X-MC-Loop-Signature: 1691690824408:15924732 X-MC-Ingress-Time: 1691690824408 Received: from pdx1-sub0-mail-a250.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.125.117.202 (trex/6.9.1); Thu, 10 Aug 2023 18:07:04 +0000 Received: from [192.168.224.119] (unknown [24.114.69.242]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a250.dreamhost.com (Postfix) with ESMTPSA id 4RMFHq1R47z87; Thu, 10 Aug 2023 11:07:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gotplt.org; s=dreamhost; t=1691690823; bh=NU/2wkpvIOImPdpLvtymRk0mXqe11wn3nuRm/QkTrbI=; h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding; b=dPcf/C9uQP+8UgQK+z3mrqtRiEWJfGDh0A+WDMMbIZz4ysCjNRdLunXQdmDQhhDH3 LwQPo8OJNuS4TAu6TItSSfrvTpGdz+mlZpPKbx5EDwohGaNlmTy5IieJzlGoWgd7JM 4tp1HolNjTuIXbERm0qSzQ0PjR0VxKKQRMIyq2WqT9KBvk71g2BRLOV5vtjnFyP98H mApDfkruPvO6hZDTkFjsoZEzoTadz279NdCxO/wwg/OEvt2heSuA39hVuUu5AzdBTJ Zi7eKskl7om35t7Z36FWunp97nUETTQkyKO4OfvHLkD0l51OUfpdvsQYl800K7vTal 6SZ7gudywdYtA== Message-ID: <028390b6-44ab-aa33-4750-3749fb9d82f8@gotplt.org> Date: Thu, 10 Aug 2023 14:07:00 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH] nscd: Do not rebuild getaddrinfo (bug 30709) Content-Language: en-US To: Florian Weimer , Andreas Schwab Cc: Florian Weimer via Libc-alpha References: <87sf924zqx.fsf@oldenburg.str.redhat.com> <87edklshqg.fsf@oldenburg.str.redhat.com> <873511sekj.fsf@oldenburg.str.redhat.com> From: Siddhesh Poyarekar In-Reply-To: <873511sekj.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3031.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham 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 2023-08-02 10:29, Florian Weimer via Libc-alpha wrote: > So do I. The Git history isn't very illuminating. The layering > wouldn't work anyway because of the ai_flags processing. I was > wondering whether the __check_pf stuff was supposed to be overriding > something, but I don't see this either (not even in the history). Apparently there was a getaddrinfo stub in nscd/nscd.c to make sure that nscd never called getaddrinfo, potentially resulting in nscd talking to itself: """ /* This is an ugly hack which prevents getaddrinfo from being dragged into nscd. There currently is no special getaddrinfo version for use in nscd. In case it should be necessary such a version must be created and this dummy version should be removed. */ extern void getaddrinfo (void) __attribute ((visibility ("hidden"))); void getaddrinfo (void) { abort (); } """ which later got replaced by nscd/gai.c: commit 3078cba2f7272dab753c45b733af2e693e86d83c Author: Ulrich Drepper Date: Mon Oct 4 16:35:54 2004 +0000 Update. * nscd/connections.c (start_threads): Use sysconf in case _POSIX_CLOCK_SELECTION or _POSIX_MONOTONIC_CLOCK is not greater zero. * nscd/nscd.c: Remove getaddrinfo stub definition. commit 91a3b2ad2e819a7fa14b8f9773856e4303a8c99a Author: Ulrich Drepper Date: Mon Oct 4 09:36:51 2004 +0000 Update. * nscd/Makefile (nscd-modules): Add gai. * nscd/gai.c: New file. but there's no indication as to why, because it doesn't look like getaddrinfo was actually needed at that time either. In all I think this looks correct. If we want nscd to be safe from the possibility that it ends up talking to itself accidentally at some point, we could add back the aborting stub. Reviewed-by: Siddhesh Poyarekar