Live data from Hacker News

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

blog.farhan.codes

31–40 of 141 posts

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

#31
> 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

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

#32
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.

ZFS is not user land. It's kernel code but without being in the kernel. So it has to be built separately and may not even be compliant with GPL (still has to be tested in court AFAIK). Linux's promise to not break userspace is just that, It can not be held responsible for code that should be in the kernel but does not play fair with the license.

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

#33
post #10

It's not quite that simple. People actually tried to update net-tools ifconfig (one of the two ifconfigs back in 2018). In 2019, I simply wrote an ifconfig that uses the netlink API, because for portability I needed a Linux ifconfig that had a FreeBSD-like command-line syntax. It doesn't have the old interface aliasing mentioned in the headlined article, and has no problems setting up and reporting IPv6 addresses or…

Why are you using the dot for your site but not for stackexchange?

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

#34
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)

#35
post #10

It's not quite that simple. People actually tried to update net-tools ifconfig (one of the two ifconfigs back in 2018). In 2019, I simply wrote an ifconfig that uses the netlink API, because for portability I needed a Linux ifconfig that had a FreeBSD-like command-line syntax. It doesn't have the old interface aliasing mentioned in the headlined article, and has no problems setting up and reporting IPv6 addresses or…

Why are you using the dot for your site but not for stackexchange?

Lazy copy and paste on my part. (-:

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

#36
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…

If you follow the email thread through to the end, nobody was trying to intentionally break userspace. An internal error code was being leaked to userspace accidentally. That was the bug. The original patch was actually fixing a different issue, where some V4L2 devices were returning the wrong error codes! So userspace was already seeing an inconsistent API.

I don't like this email thread, because some people are clearly trying to carefully find the breakage and fix it, but Linus yelling at people is all that people ever see from it. So the conversation changes from fixing a bug to insults and anger.

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

#37
post #27

Earlier quoted context omitted.

Software using obscure kernel interfaces does keep private copies of kernel data structures. The reason is that people want the software to have full functionality no matter what system is used for building it. You can build on an old system, with a kernel that totally lacks the functionality, and produce a binary that can use the new kernel interfaces when run on a system that has them.

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/

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

#38
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…

It seems like for many userspace applications, the appropriate backwards compatibility ABI would have been at the SO level. ELF shlibs make it easy to version interfaces without breaking old dynamically linked programs. Linux is sort of the odd duck in that it considers the entire syscall surface a stable ABI. It leads to a lot of neat results, but can obviously also cause pain when some older interfaces are not sufficient.

That said — new ioctls could be added and new ifconfig could use those? Old ifconfig and user programs could continue using the old ABIs.

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

#39
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 ?

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

#40
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.

For a scary few days he was considering completely breaking the ABI of getrandom(2). If he decides to break interfaces, I don't know that anyone can stop him. It is a downside to the BDFL model.

Edit: Breaking ZFS is not a great example — as sibling comment points out, that is a kernel module using kernel-internal APIs, not userspace syscall ABI. The Linux kernel notoriously considers all kernel interfaces unstable. GregKH has in the past characterized this as a feature, not a bug.

Post reply on HN