From owner-freebsd-audit Mon Aug 12 5:33:53 2002 Delivered-To: freebsd-audit@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F283E37B400; Mon, 12 Aug 2002 05:33:50 -0700 (PDT) Received: from alcatraz.iptelecom.net.ua (alcatraz.iptelecom.net.ua [212.9.224.15]) by mx1.FreeBSD.org (Postfix) with ESMTP id 52BD243E3B; Mon, 12 Aug 2002 05:33:46 -0700 (PDT) (envelope-from sobomax@FreeBSD.org) Received: from relay.iptelecom.net.ua (alcatraz.iptelecom.net.ua [212.9.224.15]) by alcatraz.iptelecom.net.ua (8.9.3/8.9.3) with ESMTP id PAA29342; Mon, 12 Aug 2002 15:33:26 +0300 (EEST) (envelope-from sobomax@FreeBSD.org) Received: from vircheck.ipcard.iptcom.net (ipcard.iptcom.net [212.9.224.5]) by relay.iptelecom.net.ua (8.12.4/8.12.4) with ESMTP id g7CCXM8Y029267; Mon, 12 Aug 2002 15:33:23 +0300 (EEST) Received: from vega.vega.com (h210.234.dialup.iptcom.net [212.9.234.210]) by vircheck.ipcard.iptcom.net (8.12.3/8.12.3) with ESMTP id g7CCXIoQ023526; Mon, 12 Aug 2002 15:33:19 +0300 (EEST) Received: from FreeBSD.org (big_brother.vega.com [192.168.1.1]) by vega.vega.com (8.12.5/8.11.3) with ESMTP id g7CCXIF2039813; Mon, 12 Aug 2002 15:33:18 +0300 (EEST) (envelope-from sobomax@FreeBSD.org) Message-ID: <3D57AB3D.17737AD7@FreeBSD.org> Date: Mon, 12 Aug 2002 15:34:05 +0300 From: Maxim Sobolev Organization: Vega International Capital X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) X-Accept-Language: en,uk,ru MIME-Version: 1.0 To: Daniel Eischen Cc: hackers@FreeBSD.ORG, audit@FreeBSD.ORG, Alexander Litvin , Andriy Gapon Subject: Re: Thread-safe resolver [patches for review] References: Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Daniel Eischen wrote: > > On Mon, 12 Aug 2002, Maxim Sobolev wrote: > > Folks, > > > > Attched please find two patches based on bin/29581 PR to make FreeBSD > > resolver thread-safe. They represent two approaches to reach this goal > > - the first is to introduce reentrant versions of the standard > > gethostbyXXX(3) APIs, similar to ones existing in other unices, and > > the second one is to make gethostbyXXX(3) returning data placed into > > per-thread storage when linked with libc_r. I like the latter approach > > more, since it doesn't introduce new non-standard APIs. > > > > I would like to hear any comments and suggestions on the proposed > > patches, as well as to opinions about which path to chose. > > Why do you need uthread_resolv.c? You should be able to thread > calls by checking __isthreaded. Just keep everything in libc. > If there are missing stubs for some pthread_* routines (I think > everything you need is in -current's libc), then add them. Why do we have uthread_error.c then? Also it will add penalty to every access to _res_data structure even in non-threaded case. -Maxim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message