Subject: Re: Enhancing sysctl support in ld.elf_so
To: None <cube@cubidou.net>
From: Andrew Brown <atatat@atatdot.net>
List: tech-userlevel
Date: 06/18/2004 11:17:45
On Fri, Jun 18, 2004 at 02:53:21PM +0200, cube@cubidou.net wrote:
>On Fri, Jun 18, 2004 at 12:32:11PM +0000, Christos Zoulas wrote:
>> In article <20040618062111.134b08f3.netbsd@quatriemek.com>,
>> Quentin Garnier <netbsd@quatriemek.com> wrote:
>> 
>> >Here's the diff in the symbol table.  Is there anything I should worry
>> >about in it?
>> 
>> I don't think so; at this point rtld has relocated itself too.
>
>I think the only thing that might be an issue is getmibinfo's use of a
>static variable to hold (cache?) whatever it learns when called.  I
>don't think it uses any other static global.
>
>Could that be an issue for the running process afterwards?

there's a static mutex_t that's used to serialize access to the
learned tree, and a static struct sysctlnode off of which the learned
tree is hung.

i can't, off the top of my head, think of any reason that the tree
shouldn't be used also by the application program, though if you want,
we could teach ld.elf_so how to make sysctlgetmibinfo() build a
separate tree which it could be used instead.

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
werdna@squooshy.com       * "information is power -- share the wealth."