Linux Pipe Code Again Sees Patch To Restore Buggy/Improper User-Space Behavior
It was just last month that the Linux kernel saw a pipe code change to address a user-space regression due to the kernel's policy about not breaking the user-space even if that non-kernel code is in the wrong. A similar kernel regression fix was merged today.
Last month's issue was around the EPOLL interface being misused by some Android libraries and a kernel change at the end of 2019 ended up breaking those libraries like Realm. So after several kernel releases with that change breaking some user-space Android applications and the upstream library since correcting its usage, Linus Torvalds changed the kernel behavior as to not break any old user-space out there misusing the interface. Linus Torvalds has long enforced the policy of kernel changes not breaking existing user-space behavior even at times when the user-space is misusing interfaces.
Today another pipe change was merged for a similar problem. The pipe change this time around is for performing FASYNC notifications for every pipe I/O rather than just state changes. It's a similar situation to what happened last month but this SIGIO/FASYNC issue was as a result of the stress-ng kernel micro-benchmark.
Linus noted in his merged patch today:
This patch and other fixes were merged by Linus as part of his day in marking thirty years since he first publicly announced Linux.
Last month's issue was around the EPOLL interface being misused by some Android libraries and a kernel change at the end of 2019 ended up breaking those libraries like Realm. So after several kernel releases with that change breaking some user-space Android applications and the upstream library since correcting its usage, Linus Torvalds changed the kernel behavior as to not break any old user-space out there misusing the interface. Linus Torvalds has long enforced the policy of kernel changes not breaking existing user-space behavior even at times when the user-space is misusing interfaces.
Today another pipe change was merged for a similar problem. The pipe change this time around is for performing FASYNC notifications for every pipe I/O rather than just state changes. It's a similar situation to what happened last month but this SIGIO/FASYNC issue was as a result of the stress-ng kernel micro-benchmark.
Linus noted in his merged patch today:
This is arguably a user space bug - and Colin King already fixed the stress-ng code in question - but the kernel regression rules are clear: it doesn't matter if kernel people think that user space did something silly and wrong. What matters is that it used to work.
So if user space depends on specific historical kernel behavior, it's a regression when that behavior changes. It's on us: we were silly to have that non-optimal historical behavior, and our old kernel behavior was what user space was tested against.
This patch and other fixes were merged by Linus as part of his day in marking thirty years since he first publicly announced Linux.
25 Comments