Live data from Hacker News

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

blog.farhan.codes

131–140 of 141 posts

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

#131
post #105

Earlier quoted context omitted.

If you want more than just my perspective, look to Laurent Bercot's Supervision Mailing list. M. Bercot is of course there, as well as a few other people. * http://www.skarnet.org/lists.html As for the filenames, yes the original reason was for compatibility with multilog, and of course all of the other tools that can process these log directories. I did set out, after all, to produce a cyclog workalike, with lessons…

> Moreover, if you go and look at follow-log-directories you can see an additional benefit that it very efficiently skips its cursors over old files without having to look at their i-nodes because it knows that the filename is guaranteed to be a timestamp at or after the last log entry in the file. Thanks, that's two thing I've missed (because I never used it, I guess ..): This optimization and follow-log-directories…

I don't know off the top of my head, but then I don't know all of the tools that exist for multilog/cyclog log directories.

This is, of course, more of an rsync problem. And it seems that there are approaches to having rsync detect renamed files and handle them more efficiently.

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

#132
post #113

Earlier quoted context omitted.

So, firstly don't put a dot at the end. Whatever you might feel about it, the decision in practice was that the host part of the URL is an FQDN but doesn't need a dot at the end. So don't write one there. The browser should probably trim it out when you type in or follow such a link. The Apache web server that the bulk host is using for that site has a fairly poor implementation of HTTPS. It's unsatisfactory in vario…

I wonder how much trouble this causes for censys.io as I believe they pull certs based off of ip address requests.

Censys gets these defaults (you could probably measure a slight bias in their data towards alphabetically earlier names as a result, but I have never checked) for sites using Apache, and for other servers with a default they get that default (in nginx I believe you have to explicitly configure a default if you want one). If there is no default the site says you need to specify which name you wanted or too bad.

You'll see the same for various other providers that crawl the IPv4 Internet looking for services. My last job (it seems prescient now to have no job, very convenient in current situation to have no reason to go outside anyway) had me trying to fit some of this data to other service discovery information.

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

#133
post #120
post #115

Earlier quoted context omitted.

> ...disliked ZFS because they feel it was designed to be incompatible with Linux... Ya... That may have just a bit to do with the fact that ZFS is released under a licence that was explicitly designed to be incompatible with Linux. "Mozilla was selected partially because it is GPL incompatible. That was part of the design when they released OpenSolaris. ... the engineers who wrote Solaris ... had some biases about h…

The incompatibility comes from GPL side terms. As for it being intentional, there are only anecdotes, and conflicting ones. When first CDDL sources dropped (DTrace) management expected to see it incorporated into Linux within month

Thing is, the copyright is owned by Oracle of all companies and and the legality is more than questionable enough to allow Oracle to sue for damages the second the code shows up in use by a big enough fish.

Oracle won't relicense the code (and lose out on a chance at another software copyright lawsuit), and it won't ever be safe to touch without an ironclad licensing story.

You can hope that Oracle folds and gets bought by someone decent. But hope won't take you that far.

Throw it away. Start over from scratch. The code may be great, but it's gone. It's a shame it ended up where it did. Take a moment if you need, but then move on. ZFS isn't going to happen.

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

#134
post #133
post #120

Earlier quoted context omitted.

The incompatibility comes from GPL side terms. As for it being intentional, there are only anecdotes, and conflicting ones. When first CDDL sources dropped (DTrace) management expected to see it incorporated into Linux within month

Thing is, the copyright is owned by Oracle of all companies and and the legality is more than questionable enough to allow Oracle to sue for damages the second the code shows up in use by a big enough fish. Oracle won't relicense the code (and lose out on a chance at another software copyright lawsuit), and it won't ever be safe to touch without an ironclad licensing story. You can hope that Oracle folds and gets bou…

[deleted]

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

#135
post #123
post #93

Earlier quoted context omitted.

Except someone did rewrite it: https://news.ycombinator.com/item?id=22628938 But with the Linux ecosystem's inertia being what it is, rather than the 2 existing implementations of ifconfig in use being displaced by this better one... now there are just 3 implementations of ifconfig in use. As mentioned in the Stack Exchange thread linked in that post, a different someone submitted a relevant patch to one of those exi…

To be fair, the third 'ifconfig' implementation is not compatible with the original in command-line options or in output, so adopting it would require changes just as adopting 'ip' does.

Two priors ("original" not really being the right word), each already not compatible with the other.

* http://jdebp.uk./Softwares/nosh/guide/commands/ifconfig.xml#...

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

#136
post #114

Earlier quoted context omitted.

> unless it's someone incompetent. Unfortunately, Linus is dangerously incompetent at cryptography. As was the case with getrandom(2). > RE getrandom(2): As Linus said several times, we don't break userspace rule does not apply to security bugs. I don't think you understand or correctly recall the scenario in which Linus nearly broke getrandom(2). The bug Linus was attempting to fix by breaking getrandom(2) was not a…

> Unfortunately, Linus is dangerously incompetent at cryptography. As was the case with getrandom(2). I beg to differ. Of all people I know of, Linus is one of the most competent person when it comes to cryptography, more so than any of those Twitter celebrities. I suggest you dig into LKML archives. Exactly what in the case of getrandom(2) do you think makes him incompetent? > I don't think you understand or correct…

> Of all people I know of, Linus is one of the most competent person when it comes to cryptography

This statement strikes me as bizarre because it's just so off-base. It seems you relate to Linus as some kind of personal hero, which is fine, but then use that as a reality-distortion field, which is probably unhelpful for you. (It's just confusing to others.)

To the best of my knowledge, Linus has not done any significant work in cryptography, nor is he regarded by any practitioner as an expert in the field. I would love to learn about any work he has done; I am just not aware of any, and I have some experience in the field.

> Exactly what in the case of getrandom(2) do you think makes him incompetent?

getrandom(2) is the only good random number ABI in Linux. It is the only way to request real random numbers that blocks until initial seeding and never blocks afterwards (i.e., BSD /dev/random behavior). It has a flag that can be used to avoid blocking.

Linus seriously proposed changing the ABI for getrandom() with flags specifying "please block until real random numbers are available" to silently ignore those flags if the routine would block, and instead return garbage. This would break all existing software that used getrandom() correctly and would be especially egregious for anything using getrandom(2) for cryptographic keys — which is a good and correct use of the interface.

His proposal was fundamentally similar to, for example, changing the ABI of /dev/random to silently return /dev/zero output instead of blocking.

> I recall correctly. Optimizations in ext4 unveiled broken design of previous getrandom(2).

Nope, you've still got it wrong. https://lwn.net/Articles/800509/

1. The design of the getrandom(2) API was and continues to be fine. It is exactly what was missing on Linux, and has room for future expansion via additional flag bits. It is not broken.

2. The getrandom(2) ABI had been in the kernel for five years at the time Linus proposed breaking it.

3. The bug was in GNOME Display Manager, which ran early in boot on the particular system that lead to the report, and GDM managed to deadlock itself by incorrectly invoking getrandom(2) with a blocking request for entropy that it did not need.

4. (Broken user code can also deadlock itself by calling, say, sleep(99999).)

5. Yes, an ext4 optimization lead to slightly reduced initial entropy on that particular machine and the sighting of the underlying deadlock condition in GDM. But that latent condition was always present.

> To keep backward compatibility an easy choice could have been to supply early userspace with possibly predictable random numbers, which, of course would be a security issue.

This (1) does not keep backwards compatibility, and (2) is exactly the approach Linus initially proposed and had to be talked down from. This is the proposal that was dangerously incompetent. From the thread at the time:

Andy Lutomirski:

  There are programs that call getrandom(0) *today* that expect secure
  output…  We can't break this use case.  Changing the semantics of
  getrandom(0) out from under them seems like the worst kind of ABI
  break -- existing applications will *appear* to continue working but
  will, in fact, become insecure.
Matthew Garrett (various emails):

  We've been recommending that people use the default getrandom() behaviour for key generation since
  it was merged. Github shows users, and it's likely there's cases in internal code as well. …

  The semantics many people want for secure key generation is urandom, but 
  with a guarantee that it's seeded. getrandom()'s default behaviour at 
  present provides that, and as a result it's used for a bunch of key 
  generation. Changing the default (even with kernel warnings) seems like 
  it risks people generating keys from an unseeded prng, and that seems 
  like a bad thing? …

  In one case we have "Systems don't boot, but you can downgrade your 
  kernel" and in the other case we have "Your cryptographic keys are weak 
  and you have no way of knowing unless you read dmesg", and I think 
  causing boot problems is the better outcome here.
The getrandom(2) saga was a long thread of Linus repeatedly ignoring the knowledge and concerns of the his own security deputies.

> In the end, the solution at which the community arrived is best compromise given the constraints.

Yes, catastrophe was avoided and in the end a happy resolution was reached — in spite of Linus, not because of him.

> I think your comment is driven more by personal hatred for a great mind rather than technical merit.

Nope.

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

#137
post #133
post #120

Earlier quoted context omitted.

The incompatibility comes from GPL side terms. As for it being intentional, there are only anecdotes, and conflicting ones. When first CDDL sources dropped (DTrace) management expected to see it incorporated into Linux within month

Thing is, the copyright is owned by Oracle of all companies and and the legality is more than questionable enough to allow Oracle to sue for damages the second the code shows up in use by a big enough fish. Oracle won't relicense the code (and lose out on a chance at another software copyright lawsuit), and it won't ever be safe to touch without an ironclad licensing story. You can hope that Oracle folds and gets bou…

Except Oracle isn't the copyright holder for majority of the code, as in fact, it cannot relicense huge chunks of OpenZFS code (which indeed is used in big commercial products), and it cannot "take back" code licensed under CDDL - it can relicense their own copy, not the one in OpenZFS, because there's no "version 1 or newer" clause that allows backdoor change to license like typical GPL case.

To summarize: - Oracle isn't the only copyright owner - Oracle can't take back CDDL license - Oracle can't introduce new version of CDDL and magically change the rules

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

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

> And the reason is that it was unmaintained, not that it couldn't handle multiple IP addresses.

Unmaintained sounds like a very good reason to me. It's not just whether there is 1 or 2 addresses per interface. The rot set in when Alexy re-did the Linux kernels network infrastructure back god knows when (its decades ago now), and wrote his own user space tool to configure it. That tool was ip. It not only handled multi ip addresses per interface - it handled multiple routing tables, multiple link types, routing rules and a whole pile of other things. And that single tool has been growing ever since - it's now huge. Type typing "man ip-" on a cli that supports tab completion some time.

Effectively the task of keeping up with the kernel's new features kept growing and at some point the ifconfig maintainers gave up. It was all over bar the shouting at the point. The only surprising thing is the shouting has gone on for literally decades, and as this article demonstrates continues to this day. Lets hope the same angst over systemd doesn't continue for the same amount of time.

Just like like systemd there are things that rub me the wrong way of course. Coping the Cisco IOS style of command line usage rather than using the Linux style is for me one of those things. But it happened for a reason - Alexy set the standard when he wrote the first version of ip, and he was trying to emulate the features provided by a Cisco router at the time.

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

#139
post #137
post #133

Earlier quoted context omitted.

Thing is, the copyright is owned by Oracle of all companies and and the legality is more than questionable enough to allow Oracle to sue for damages the second the code shows up in use by a big enough fish. Oracle won't relicense the code (and lose out on a chance at another software copyright lawsuit), and it won't ever be safe to touch without an ironclad licensing story. You can hope that Oracle folds and gets bou…

Except Oracle isn't the copyright holder for majority of the code, as in fact, it cannot relicense huge chunks of OpenZFS code (which indeed is used in big commercial products), and it cannot "take back" code licensed under CDDL - it can relicense their own copy, not the one in OpenZFS, because there's no "version 1 or newer" clause that allows backdoor change to license like typical GPL case. To summarize: - Oracle…

> because there's no "version 1 or newer" clause that allows backdoor change to license like typical GPL case

There is actually, and in CDDL (unlike in GPL) version updates are an opt-out feature rather than being opt-in. This was inherited from the MPL (which the CDDL is based on). See section 4 of the CDDL:

> 4.1. Oracle is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License.

> 4.2. You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward.

In fact this is the primary argument that people give when arguing that Oracle could very easily make OpenZFS GPL-compatible -- they just need to release a CDDL v2 which says "code under this license is dual-licensed under the GPLv2 and CDDLv1.1". This situation has already happened -- CDDLv1.1 used this mechanism to change the "license steward" from "Sun Microsystems" to "Oracle".

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

#140
post #139
post #137

Earlier quoted context omitted.

Except Oracle isn't the copyright holder for majority of the code, as in fact, it cannot relicense huge chunks of OpenZFS code (which indeed is used in big commercial products), and it cannot "take back" code licensed under CDDL - it can relicense their own copy, not the one in OpenZFS, because there's no "version 1 or newer" clause that allows backdoor change to license like typical GPL case. To summarize: - Oracle…

> because there's no "version 1 or newer" clause that allows backdoor change to license like typical GPL case There is actually, and in CDDL (unlike in GPL) version updates are an opt-out feature rather than being opt-in. This was inherited from the MPL (which the CDDL is based on). See section 4 of the CDDL: > 4.1. Oracle is the initial license steward and may publish revised and/or new versions of this License from…

Updates in GPL, thanks to standard boilerplate provided by GPL and used for years, are opt-out.

With CDDL, Oracle declares they have the sole right to provide newer versions of the license. However at no time can they treat it as an "upgrade path" for third party code, and OpenZFS code is explicitly labeled with CDDL 1.0

All of that has no impact on OpenZFS code which remains unencumbered, including by patents (the patent license is, afaik, the part that makes it incompatible with GPL the most).

Post reply on HN