pid_eins,
@pid_eins@mastodon.social avatar

This is such a bad bad API compat breakage:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e81cd5a983bb35dabd38ee472cf3fea1c63e0f23

It's used all over the place in userspace. In systemd we use it:

  1. to detect if a block device has partition scanning off or on
  2. In our udev test suite, to validate devices are in order
  3. udev rules use it for some feature checks (in older versions of systemd).

And it's even a frickin documented userspace API:

https://www.kernel.org/doc/html/v5.5/block/capability.html

So much about that nonsensical "we don't break userspace" kernel mantra.

vbabka,
@vbabka@social.kernel.org avatar

@pid_eins seems nobody yet pointed it out or I missed it. But note the "we don't break userspace" rule doesn't mean it can't ever happen - that would mean no bugs can ever happen as well. What it means is that if it happens and is reported (the sooner the better), it has to be fixed (with some exceptions that I think wouldn't apply here).

pid_eins,
@pid_eins@mastodon.social avatar

@vbabka well, i a actually somewhat OK with braking APIs if need be. I am just a bit annoyed of carrying this claim "we don't break userspace" around all the time and not actually being really any good at it at all, and when it comes to actually breaking things, we are usually brushed off, called "whiney", and told that we "did it wrong" in the first place, and theat kernel's own docs where just "unfortunate", and it's not a bug, because the docs should not have been written like that anyway.

pid_eins,
@pid_eins@mastodon.social avatar

@vbabka I mean, systemd has APIs too, it's hard to keep them stable, we try, and every now and then we fuck up. But we never made it our frickin' mantra, and claimed we actually were really good at it. We do have invested a bit in trying to be OK at it though, i.e. have test suites, integration tests and shit, that validate the APIs automatically. It's not perfect, but it exists.

So, if the kernel would actually try to live up to its claim that they don't break userspace

pid_eins,
@pid_eins@mastodon.social avatar

@vbabka … then maybe have a testsuite for this, that actually checks this, and make maintainers care, to google for their interfaces before dropping them to see if they are used.

But as it appears right now, there's a massive difference between what the kernel community claims and what it actually does about it.

The "unbind" uevent thing was by far worse btw, showed total ignorance from kernel folks about any userspace API issues.

So this isn't really an isolated event, it's happens regularly

broonie,
@broonie@mastodon.social avatar

@pid_eins @vbabka There is in theory full coverage of at least the syscalls interface (I don’t think I trust it since it was churned out to spec but it’s there), I’m never sure why the people doing that stuff aren’t as excited by stuff like sysfs

pid_eins,
@pid_eins@mastodon.social avatar

Small update: it's worse than originally thought:

  1. Kernel broke API not once, but twice already on this.

  2. The sysfs API was actually fully documented, but that didn't matter. Full docs are here:

https://www.kernel.org/doc/html/v5.16/block/capability.html

pid_eins,
@pid_eins@mastodon.social avatar

Anyone knows where the kernel's github/gitlab project is? Would love to file an issue or placeholder revert PR, but somehow I cannot find it! Anyone?

(Yes, this is a joke, I am fully aware of the concept of mailing lists – as a historical concept from the 2005 era... Yes, I am too lazy to figuring out how to report this properly. Hence social media it is.)

ondrejkolin,
@ondrejkolin@mastodon.social avatar

@pid_eins At least there is a place where issues won't get solved, but we can complain. In our office it's usually at the coffee machine.

Have you tried complaining on Reddit?

zygoon,
@zygoon@fosstodon.org avatar
pid_eins,
@pid_eins@mastodon.social avatar

@zygoon Which noone looks at supposedly, and which is scheduled to be turned off soon, because mailing lists are apparently much better.

PlutoisAPlanet,
@PlutoisAPlanet@mastodon.social avatar

@pid_eins Imho the Linux development process has to be one of the biggest turn offs from contributions.

It's nuts how a piece of software that underpins vital systems has such a backwards and opaque development process, mailing lists in 2024.

cJ,
@cJ@zougloub.eu avatar

@pid_eins

There you go:
BLOCK LAYER
M: Jens Axboe <axboe@kernel.dk>
L: linux-block@vger.kernel.org
S: Maintained
F: block/

pid_eins,
@pid_eins@mastodon.social avatar

@cJ I tried to click on this, but it didn't open a bug report form. What am I doing wrong?

(Dude, I know, I am just making fun of kernel development mechanisms, it's such a turn-off.)

pid_eins,
@pid_eins@mastodon.social avatar

Let me mention that I have sent an email to linux-block ML btw. I am not sure it went through though, can't find it on any mailing list archives.

It's the reliability and synchronous feedback I particular love about submitting bug reports, patches, and reviews via email.

ljs,
@ljs@social.kernel.org avatar

@pid_eins "without ever adding a value to an UAPI header"

This not correct? Or did you hardcode?

pid_eins,
@pid_eins@mastodon.social avatar

@ljs Look at the docs link I provided. It documents literally that the documentation for the bits is to be found in include/linux/genhd.h.

Sorry, but the ship has sailed. Adding such a comment to the documentation and expecting this not to be public API doesn't work.

Also, iirc the way I understood Linus the "we don't break userspace" actually is supposed to mean "we don't break userspace". Here it ceratinly breaks things all over the place.

ljs,
@ljs@social.kernel.org avatar

@pid_eins A header that no longer exists? :)

It's not great that that's referenced, and the doc page in general isn't wonderful (nor was the idea of 'just exposing' something without abstracting in uAPI).

But at the same time, surely relying on you hardcoding kernel-specific value might be a clue that it's not a great interface to use?

So on one hand I agree with you the doc is bad and shouldn't have implied you can do that, but on the other hand a user relying on this should have been more than a little wary.

pid_eins,
@pid_eins@mastodon.social avatar

@ljs Also, the header definitely did exist when we started checking for the capability field.

pid_eins,
@pid_eins@mastodon.social avatar

@ljs Well, how are userspace folks supposed to navigate kernel apis then? I mean, a good chunk of kernel apis are not documented at all, another chunk is pretty badly documented, and the stuff that actually is somehwat documented is something one should not have trusted, as you say?

I mean, the stuff is not just documented, it's also part of sysfs, i.e. one of the primary concepts for exposing kernel APIs to userspace which even has a rough concept of introspection and evrything

pid_eins,
@pid_eins@mastodon.social avatar

@ljs this is not a frickin ioctl of some niche subsys. It's very very core stuff exposed via sysfs, and documented (yes, badly documented, but still documented), with no other known way to get this very basic info.

Come on!

pid_eins,
@pid_eins@mastodon.social avatar

@ljs btw, the flag we used actually was fully documented even:

https://www.kernel.org/doc/html/v5.15/block/capability.html

Quoting:

"This file documents the sysfs file block/<disk>/capability."

"GENHD_FL_NO_PART_SCAN (0x0200): partition scanning is disabled. Used for loop devices in their default settings and some MMC devices."

That's such a bad API break

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • tacticalgear
  • DreamBathrooms
  • cisconetworking
  • magazineikmin
  • InstantRegret
  • Durango
  • thenastyranch
  • Youngstown
  • rosin
  • slotface
  • mdbf
  • khanakhh
  • kavyap
  • everett
  • megavids
  • modclub
  • Leos
  • cubers
  • ngwrru68w68
  • ethstaker
  • osvaldo12
  • GTA5RPClips
  • anitta
  • provamag3
  • normalnudes
  • tester
  • JUstTest
  • lostlight
  • All magazines