User: Password:
|
|
Subscribe / Log in / New account

Re-deprecating sysctl()

Re-deprecating sysctl()

Posted Aug 30, 2007 10:10 UTC (Thu) by nix (subscriber, #2304)
In reply to: Re-deprecating sysctl() by addw
Parent article: Re-deprecating sysctl()

Every program will emit this log message: glibc calls sysctl() at startup.


(Log in to post comments)

Re-deprecating sysctl()

Posted Aug 30, 2007 15:45 UTC (Thu) by jzbiciak (subscriber, #5246) [Link]

Indeed, from an strace of ls:

    _sysctl({{CTL_KERN, KERN_VERSION}, 2, 0xbfffe41c, 31, (nil), 0}) = 0

Seems like it'd be easy to filter out *that* specific use (getting the kernel version number), and report all the other uses. This also argues that the kernel will probably need to support this specific sysctl even if it deprecates and ultimately removes other sysctl support. After all, we have statically linked binaries out there.

Re-deprecating sysctl()

Posted Aug 30, 2007 20:01 UTC (Thu) by ebiederm (subscriber, #35028) [Link]

And that is what I implemented in my patch.

A printk that logs when you use it and with which program and that
filters out the glibc usage.

Not that the glibc usage is a big deal because it is just a check for
non-SMP to optimize pthreads so any value gives you correctly running
code.

Eric


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds