5 ms·
> "Linux could definitely use some real, simple bus interface, so why would this be bad? (assuming it won't be merged into systemd in the future)" Where's the
by wtallis 11y ago
> "Linux could definitely use some real, simple bus interface, so why would this be bad? (assuming it won't be merged into systemd in the future)"
Where's the evidence of demand for this from outside the systemd bubble, and why are all of the other existing IPC mechanisms (including those in other operating systems that could be implemented for Linux) unsuitable? The systemd devs really shouldn't be taken solely at their word that doing their favorite thing in another corner of the OS is the best decision for the broader community.
- viraptor 11y agoEvery big system uses some kind of bus. There's a whole list of buses / rpcs used on Linux and other systems many of which get heavy and tedious at some point. Actual clean low-level bus + high level app layer could be a good solution for a change. sunrpc, dcom, corba, dbus, xpcom, dci, dcop, rmi, kqueue (kind of), 9p/plumber, ... All of them try to achieve a similar thing. Some of them can be actually used for remote calls, but a lot are used for local rpc. They're unsuitable for the same reasons that we're using json instead of asn1, and http instead of custom interactive protocols. It's not that they don't work anymore, but because we learned how to do things better. And if bus1, or something similar could provide a low-level, common basis for more generic technologies, that would be awesome. Regarding reuse... I don't know if any current system can provide what systemd guys want (pre-init availability and sending uid assurance)
- vezzy-fnord 11y ago9P and Plumber are nothing like the rest, and kqueue is an I/O multiplexing mechanism. I'm unsure of why you consider 9P to be outmoded. It certainly can be available pre-init.
- viraptor 11y agoYou're right, I added plumber and kqueue after writing the comment, forgot to revise the text. (edited) It was more about corba/xpcom being rather heavy. Sure, kqueue is different, but it is a kind of local event/message (yeah, I'm aware it's a stretch). Sure, 9p can be available pre-init, but it doesn't provide sender verification. (i.e. you can't map the message to local uid) It could be added to the attributes of course, but it's not standard at the moment. Is that not right?
- X-Istence 11y agoif kqueue is considered, add epoll, poll, select and others like it. Those are all event/message systems too...
- pdkl95 11y ago> sending uid assurance This sounds like an attempt to implement security features the kernel already provides. Why would you need an assurance of a UID, and why would you assume that it would stay accurate? Using UIDs to do manual security features is going to have reliability issues, and if it's for a non-security feature, you don't need an assurance.
- viraptor 11y agoYes it is for security features. Services get your message and if they operate on system resources they need to know who you are so they can either execute some action or not. Sure, this can be pushed to other layers instead (selinux for example), but it doesn't change that the functionality is needed. This impacts issues like configuring wireless networks without being an admin. (which is what most people want in practice)
- pdkl95 11y agoI get that you want to use UIDs for these things, but that's wishful thinking. You're assuming properties about a process's UID that are not guaranteed. See setuid(2) for example, or passing an fd from another process. The reason you leave these things to the kernel is the kernel is the only place that can actually make the proper security determination. A file-permission analogy: it is a bad idea to stat(2) a file to probe if it's possible to open it. The kernel already provides that capability, which you have to handle anyway. The proper design is to open the file, and handle the EACCES error. Testing first doesn't work because the situation can change between the stat(2) and the open(2). > configuring wireless networks There are many ways to handle that, which do not require abusing UIDs for security features they weren't designed for. edit: No, I absolutely am not agreeing with you. Using UIDs for security outside the kernel (which is where the assurances your new kernel feature would provide will end up) is fundamentally broken. It works inside the kernel because the kernel can lock whatever is necessary. You are only moving the race condition. You ask your new interface for the sender's UID, an interrupt happens, and the data you got may no longer be valid as the sender called setuid().
- 11y ago
- signa11 11y ago> sunrpc, dcom, corba, dbus, xpcom, dci, dcop, rmi, kqueue (kind of), 9p/plumber, ... why not tipc ? it is already there in the kernel, and seemingly well tested at that. why re-invent the wheel ?
- viraptor 11y agoI don't believe you can securely figure out what are the privileges of the sender process/user in tipc. That was one of the main reasons kdbus was pushed.