NetBSD Problem Report #26100

Received: (qmail 26375 invoked by uid 605); 28 Jun 2004 17:31:21 -0000
Message-Id: <20040628173115.0A55211154@narn.netbsd.org>
Date: Mon, 28 Jun 2004 17:31:15 +0000 (UTC)
From: roskens@elfin.net
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: roskens@elfin.net
To: gnats-bugs@gnats.NetBSD.org
Subject: ld.so.conf.5 does not recognize that ld.elf_so can only use machdep sysctl entries
X-Send-Pr-Version: www-1.0

>Number:         26100
>Category:       lib
>Synopsis:       ld.so.conf.5 does not recognize that ld.elf_so can only use machdep sysctl entries
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lib-bug-people
>State:          closed
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 28 17:32:00 +0000 2004
>Closed-Date:    Mon Jul 05 11:52:15 +0000 2004
>Last-Modified:  Mon Jul 05 11:52:15 +0000 2004
>Originator:     Ron Roskens
>Release:        NetBSD-current, NetBSD-1.6.2, NetBSD-1.5
>Organization:
>Environment:
>Description:
The man page for ld.so.conf claims that you can use <sysctl_variable> for directing library loading. The example shows the use of machdep.fpu_present. Its left to the user to infer that you can only use machdep sysctls.

The man page should be updated to state that its a bug that it only supports machdep entries. Further explain that to enable dynamic sysctl lookups would be a significant performance hit if it were to do so.
>How-To-Repeat:
man ld.so.conf

try installing pkgtools/libkver and wonder how you can enable it without setting LD_PRELOAD.
>Fix:

>Release-Note:
>Audit-Trail:

From: Martin Husemann <martin@duskware.de>
To: roskens@elfin.net
Cc: gnats-bugs@gnats.NetBSD.org
Subject: Re: lib/26100: ld.so.conf.5 does not recognize that ld.elf_so can only use machdep sysctl entries
Date: Tue, 29 Jun 2004 12:33:42 +0200

 It is not "only machdep.*" - you can only use certain hardcoded values,
 which need to have a fixed sysctl MIB id.

 Alternatives to this have been discussed but would slow down program
 loading.

 Martin

From: Ron Roskens <roskens@elfin.net>
To: Martin Husemann <martin@duskware.de>
Cc: gnats-bugs@gnats.NetBSD.org
Subject: Re: lib/26100: ld.so.conf.5 does not recognize that ld.elf_so can only use machdep sysctl entries
Date: Tue, 29 Jun 2004 14:36:00 -0500

 * Martin Husemann <martin@duskware.de> [2004-06-29 12:33:42 +0200]:

 This ticket was opened when toolchain/23340 was closed.

 > It is not "only machdep.*" - you can only use certain hardcoded values,
 > which need to have a fixed sysctl MIB id.

 The functionality to expand out the sysctls is in the function
 _rtld_process_mapping in src/libexec/ld.elf_so/paths.c. It really
 does only expand the machdep entries. Strangely, the comment preceding
 the function makes note of this by using <machdep_variable> rather
 than <sysctl_variable> as ld.so.conf.5 does.

 Ron

From: Quentin Garnier <cube@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:  
Subject: pr/26100 CVS commit: src/libexec/ld.elf_so
Date: Mon,  5 Jul 2004 11:50:07 +0000 (UTC)

 Module Name:	src
 Committed By:	cube
 Date:		Mon Jul  5 11:50:07 UTC 2004

 Modified Files:
 	src/libexec/ld.elf_so: load.c paths.c rtld.h

 Log Message:
 Make ld.elf_so use the new sysctl API.  That allows the user to give any
 sysctl variable name in /etc/ld.so.conf.  It also makes the ld.elf_so
 binary slightly smaller (at least on i386), and has no impact on
 performance.

 Fixes PR 26100.


 To generate a diff of this commit:
 cvs rdiff -r1.27 -r1.28 src/libexec/ld.elf_so/load.c
 cvs rdiff -r1.30 -r1.31 src/libexec/ld.elf_so/paths.c
 cvs rdiff -r1.70 -r1.71 src/libexec/ld.elf_so/rtld.h

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed 
State-Changed-By: cube 
State-Changed-When: Mon Jul 5 11:51:15 UTC 2004 
State-Changed-Why:  
The issue described in the PR was fixed while changing the 
way ld.elf_so handles sysctl variables. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.