Live data from Hacker News

Linux maintains bugs: The real reason ifconfig on Linux is deprecated (2018)

blog.farhan.codes

41–50 of 141 posts

Re: Linux maintains bugs: The real reason ifconfig on Linux is deprecated (2018)

#41
post #21

Earlier quoted context omitted.

I still don't understand how this "Linux never breaks userland" thing holds up, it's been proven false. The 4.13 kernel introduced a change to effectively namespace sysctl settings (prevent the change from default from being copied to the host system into container processes). This broke any container runtimes that relied on host-wide sysctl settings. [1] https://github.com/aws/amazon-ecs-agent/issues/789 [2] https:/…

I think the real guarantee is more like "linux doesn't break the syscall API" (the API, not the ABI). I think sysctl is not really part of it.

How do you think sysctls are implemented?

In fact, prior to Linux 5.5, Linux had a direct sysctl syscall and removed it — which, uh, is clearly an ABI break.

With Linux's sysctl pseudo-fs model, you can argue the actual structure and behavior is just some aspect of sysfs, and the open/read/write syscalls are obviously not broken, but I think that's pretty simplistic. sysctls (and sysfs) are provided by the kernel.

Linux doesn't break ABIs that Linus judges to be worth more stable than rototilled. That's all. Usually Linus swings conservative on this.

Re: Linux maintains bugs: The real reason ifconfig on Linux is deprecated (2018)

#42

Earlier quoted context omitted.

Glibc certainly does this, I would expect for limited periods per interface. It is often at the cutting edge of kernel interfaces, so that becomes necessary during interim periods. I really doubt it makes sense for old and stable things like ifconfig, or a tipical application.

> Glibc certainly does this > It is often at the cutting edge of kernel interfaces Is it? It seems like support for Linux-specific features can take years. The getrandom system call, for example: https://lwn.net/Articles/711013/

[deleted]

Re: Linux maintains bugs: The real reason ifconfig on Linux is deprecated (2018)

#43
The Linux approach to system call stability is awful. I've written about it extensively before. See this thread [1]. The gist of it is that a system doesn't need to place the ABI support boundary at exactly the same page as the ring3-to-ring0 boundary, and that Linux does is 1) basically shipping the org chart, and 2) harmful in all sorts of ways.

The right way to do OS ABI stability is to require that system calls go through some user-space library before executing a privilege transition. This way, the kernel's interface can change as needed without breaking existing userland binaries. Windows gets this right: system calls go through ntdll.dll. Fuchsia gets this right as well: they don't have an ntdll.dll, but they have a huge vdso that amounts to the same thing.

If I had my way, Linux would take the Fuchsia approach: require every system call go through a vdso.

"But golang!" and "but I have multiple libcs!" and "but my static linking!" are not valid excuses. Windows also has Go and it also have multiple libcs and the NT kernel isn't forced to maintain decades of userland-facing crud.

As for static linking: you can statically link the world if you'd like, but you can do that and still call through a vdso or load the platform libc.

[1] https://news.ycombinator.com/item?id=20854857

Re: Linux maintains bugs: The real reason ifconfig on Linux is deprecated (2018)

#44
post #16

There's an assumption which this article makes which is not true; namely, that the only utilities which do (or should) use ioctl's are system programs like ipconfig which are shipped with the kernel. There are other programs, like for example Kerberos, who want to know what network addresses are used by the network, and requiring them to screen scrape ipconfig is not especially reasonable. So if you randomly change i…

A long, overlapping deprecation period is the typical way of handling this. Why is this avoided at the lower levels?

Re: Linux maintains bugs: The real reason ifconfig on Linux is deprecated (2018)

#45
post #16

There's an assumption which this article makes which is not true; namely, that the only utilities which do (or should) use ioctl's are system programs like ipconfig which are shipped with the kernel. There are other programs, like for example Kerberos, who want to know what network addresses are used by the network, and requiring them to screen scrape ipconfig is not especially reasonable. So if you randomly change i…

But, for finding interfaces and read about their state and settings, aren't /proc and /sys the best way to go, if there is no worry about toctou? I was answered yesterday on another topic that /proc is a linuxism, but is there anything missing there ?

/proc is originally a Bell Labs and Plan9ism.

Re: Linux maintains bugs: The real reason ifconfig on Linux is deprecated (2018)

#46
post #25
post #23

This is highly biased opinion piece. I like BSD. I liked pre-Oracle Solaris. And I like Linux at lot too. And it is factually inaccurate. Deprecation of ifconfig is a distro issue. "Linux" did not deprecate it. And the reason is that it was unmaintained, not that it couldn't handle multiple IP addresses. In fact it can, I still use it 50% of the time. Works fine for setting and displaying multiple addresses. The Debi…

That's a great theory, but Linus picks and chooses when to decide it's outrageous to make changes that break userland tools based on his personal preferences. They intentionally broke ZFS - then Linus follows up with a wildly inaccurate statement about why he thinks nobody should use ZFS. It's difficult to take him seriously when he picks and chooses when to enforce his supposed "never break userland" ethos.

[deleted]

Re: Linux maintains bugs: The real reason ifconfig on Linux is deprecated (2018)

#47

The Linux approach to system call stability is awful. I've written about it extensively before. See this thread [1]. The gist of it is that a system doesn't need to place the ABI support boundary at exactly the same page as the ring3-to-ring0 boundary, and that Linux does is 1) basically shipping the org chart, and 2) harmful in all sorts of ways. The right way to do OS ABI stability is to require that system calls g…

How exactly does a ntdll/vdso approach make it easier to preserve binary compatibility? It obviously moves the place at which binary compatibility needs to be preserved, but I'm not seeing how that move makes maintenance easier, unless you're implying that the userspace portion would not be the responsibility of the kernel developers.

Re: Linux maintains bugs: The real reason ifconfig on Linux is deprecated (2018)

#48
post #16

There's an assumption which this article makes which is not true; namely, that the only utilities which do (or should) use ioctl's are system programs like ipconfig which are shipped with the kernel. There are other programs, like for example Kerberos, who want to know what network addresses are used by the network, and requiring them to screen scrape ipconfig is not especially reasonable. So if you randomly change i…

Yes! He also mentions that NetBSD and OpenBSD have "kernel interface itself is highly stable anyways" but doesn't elaborate on how that's different from Linux's interface stability.

The argument doesn't hang together. He can't claim that changes to userland tools aren't possible whilst at the same time claiming it's because the existing interfaces never change.

Re: Linux maintains bugs: The real reason ifconfig on Linux is deprecated (2018)

#49

> We should look at the whole project [Linux] as a cautionary tale of the kind of leveraged destruction that some programmers of modest ability but extreme confidence can wreak on our industry. https://news.ycombinator.com/item?id=21168895

(Generalized cliche) There are two kinds of systems, ones that everyone complains about, and ones that no one uses.

I'm also reminded of the "expert beginner" series of blog posts about jealously guarded fiefdoms and the folks that dominate them.

Re: Linux maintains bugs: The real reason ifconfig on Linux is deprecated (2018)

#50
post #13

Indeed, ip is vastly superior. But it took me almost a year of working with internet gateways (i.e as a day job) to let old habits die. Learning the new output format takes time. I've almost replaced route with "ip route" as well. arp isn't fully replaced yet in muscle memory. Also, as a comment on the article, ip can now fully replace brctl. (and iw replaces iwconfig and iwlist).

IP may be better from an ABI standpoint, but I still find its output to be much harder to parse with the Mk 1 Eyeball than ifconfig. Most of that is probably just ip shoving more information on the screen than ifconfig, but most of the information isn't useful 99% of the time and maybe it would be nicer if ip pared down some of the "qdisc noqueue state UNKNOWN group default" noise unless someone adds a "verbose" parameter?

Or maybe only show them in the basic use case when they are set to something other than the default?

All of the "valid_lft" lines add a lot of visual noise.

Post reply on HN