|
|
Subscribe / Log in / New account

The GNU C Library version 2.30 is now available

The GNU C Library version 2.30 is now available

Posted Aug 2, 2019 10:51 UTC (Fri) by eru (subscriber, #2753)
Parent article: The GNU C Library version 2.30 is now available

* The Linux-specific <sys/sysctl.h> header and the sysctl function have been deprecated and will be removed from a future version of glibc. Application should directly access /proc instead.

I wonder how is this an improvement? The eventual removal will break programs.


to post comments

The GNU C Library version 2.30 is now available

Posted Aug 2, 2019 11:30 UTC (Fri) by ebiederm (subscriber, #35028) [Link] (4 responses)

This is an improvement because removal of dead code is an improvement.

The distributions have not compiled the system call into the kernel for quite a long time now.

In my research there were only about 5 calls of the sysctl system call in the history of linux.
The only user of the system call of note was glibc, and glibc has not used the sysctl system
call in a long time.

The sysctl system call has been deprecated for pretty much it's entire existence. With the result
that I would not trust the kernel code very far as it is old and has bit-rotted. I clean out a bunch
of the bit-rot at one point and found several significant missing security checks.

But if you happen to know of something that will break please let people know.

The GNU C Library version 2.30 is now available

Posted Aug 2, 2019 11:47 UTC (Fri) by joib (subscriber, #8541) [Link] (1 responses)

Can't speak for the OP, but upon reading this I had an initial WHAAA.... reaction until I realized I had confused this with the sysconf() function.

sysconf() is mandated by POSIX and is indeed not going away.

The GNU C Library version 2.30 is now available

Posted Aug 5, 2019 5:53 UTC (Mon) by eru (subscriber, #2753) [Link]

Yes, I too was confused, I thought I have a program using sysctl(), bit it is actually using sysconf(). Sorry for the bother. In general, every update that have removed anything from glibc, or even just moved its declarations between headers, have resulted in extra work (and cursing) around here, but in this case it really appears to be sufficiently obsolete to remote. I also noticed many other POSIX systems like the BSDs do have sysctl(), but keeping it in Linux for compatibility reasons would be pointless, because almost every sysctl operation is incompatible.

The GNU C Library version 2.30 is now available

Posted Aug 9, 2019 10:18 UTC (Fri) by moltonel (guest, #45207) [Link] (1 responses)

> The distributions have not compiled the system call into the kernel for quite a long time now.

CONFIG_PROC_SYSCTL still says "it is generally a good thing, you should say Y here", so I'm surprised to hear that (most ?) distribs have it disabled. Should the kconfig text be updated ?

The GNU C Library version 2.30 is now available

Posted Aug 9, 2019 10:50 UTC (Fri) by ABCD (subscriber, #53650) [Link]

The config option for the syscall in question is CONFIG_SYSCTL_SYSCALL, which does have a "If unsure say N here" message in its documentation. CONFIG_PROC_SYSCTL is the well-maintained replacement, exposing the interface as files in /proc/sys.

The GNU C Library version 2.30 is now available

Posted Aug 8, 2019 17:03 UTC (Thu) by flussence (guest, #85566) [Link]

If those programs break... it's their fault for using a syscall that's been optional for 22 years and deprecated for at least 13.


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