4 ms·
Otherwise, buggy programs will depend on these flags being ignored, and you won't be able to use them later for new features. I don't understand why that's tru
by sillysaurus3 12y ago
Otherwise, buggy programs will depend on these flags being ignored, and you won't be able to use them later for new features.
I don't understand why that's true. Just add the new flag and use it for your new feature. Aren't buggy programs who were already sending the flag responsible for their own bugs?
- oranlooney 12y agoYes and no. If you push an update and sysadmins all over the world dutifully upgrade and immediately notice programs breaking, their first thought is not going to be "oh, those programs must have had latent bugs." No, they're going to blame you. Besides, having stuff work correctly is always more fun than assigning blame, and validating flags is an easy way to avoid these scenarios.
- sillysaurus3 12y agoHm, fair enough. To be clear, I wasn't arguing against validating flags. I was commenting about "This kernel function only gets 32 possible bitflags, but since they never validated their flags, they can no longer add any additional flags, ever, because it might break other programs which may or may not even exist." That sort of mentality seems like it would push designers in the direction of poor design decisions. If a bitflag is the best design for a new feature, but they're prevented from using it out of a sense of "Let's not ever break anything ever," then the result may be a bad design that people are stuck with for the next 50+ years, which seems objectively worse. But my reaction is based on theory and not backed by experience, so it's probably unfounded.
- forgottenpass 12y agoAren't buggy programs who were already sending the flag responsible for their own bugs? When the kernel breaks userspace, it's a kernel bug. It's a philosophy for system robustness that the kernel has and other operating systems tend to adopt as well. As you get higher up the stack into 3rd party libraries and other programming tools the maintainers often take a more cavalier approach to maintaining compatibility.
- coderjames 12y agoI would tend to agree with you, but from what I recall Linus' policy is user-space breaking changes are kernel bugs.
- xxpor 12y agoNo: https://lkml.org/lkml/2012/12/23/75 https://lkml.org/lkml/2012/12/23/75
- deleted 12y ago[deleted]