@kernellogger @torvalds @troglobit Have been thinking about this and I’m aligning myself based on constraints that do exist.
Multiple LSMs do exist and since the major LSM’s are also used commercially there must be good reasons to pick one rather than another. Also there is probably bunch of real-world applications where container does not share the same LSM as the host.
The key problem in my opinion with stacking is that LSM is not well-defined entity enough. In order to being one it should be defined preferably in the kernel documentation what is NOT an LSM. If that had a great definition then I would support it.
It is not just about making that kind of constrain to the documentation but also refactoring some features out of the LSM cage. E.g. stacking Yama or POSIX capabilities does not have any meaning in that would make any sense to me. They really should be just plain kernel features.
If stacking involved only “actual” LSM’s then it could be actually useful feature. E.g. I could imagine applications that benefit the user base and does not turn out to be a freaking mess.
If i recall correctly there was yet another LSM in the queue. I’d consider blocking any new LSM’s up until this whole mess has been properly sorted. I still am puzzled about POSIX capabilities “LSM”, i.e. how it ended up to upstream because documentation does not provide any answer on its practical usefulness. On the contrary it gives good arguments of not keeping it inside LSM given that they are always on :-)
📣 Attention all change-makers! Join our mission to protect online privacy and freedom by applying for one of our exciting open positions. You will contribute to a meaningful cause while growing professionally in a supportive and collaborative environment. 🚀💪 Don't miss out - apply now and be a part of something bigger than yourself! https://www.torproject.org/about/jobs/
I’ve understood by reading LKML and LWN that the problem that nested LSM’s is trying can be described as follows:
Given that the most of the popular LSM’s are made for the sake of SELinux being too tedious to configure I’ve sometimes wondered why they could not just convert their policy to SELinux policy, and not be kernel features in the first place 🤷
That said, LSM’s are not my area really, and could easily overlook some aspects that might make them useful as kernel features.