Re: [GIT PULL] LSM patches for v6.1
From: Eric W. Biederman
Date: Wed Oct 05 2022 - 17:28:29 EST
Paul Moore <paul@xxxxxxxxxxxxxx> writes:
> On Wed, Oct 5, 2022 at 11:33 AM Eric W. Biederman <ebiederm@xxxxxxxxxxxx> wrote:
>> Paul Moore <paul@xxxxxxxxxxxxxx> writes:
>> > On Wed, Oct 5, 2022 at 8:39 AM Eric W. Biederman <ebiederm@xxxxxxxxxxxx> wrote:
>> >> Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> writes:
>
> ...
>
>> >> Effectively he said that where two or more out of tree LSM policies want
>> >> something it makes no sense to discussion the actual reasons people want
>> >> to use the hook.
>> >
>> > Runtime kernel configuration is inherently "out of tree", this
>> > includes not only loadable LSM security policies (e.g. a SELinux
>> > policy), the system's firewall configuration, things like sysctl.conf,
>> > and countless others. Please understand that "out of tree" in this
>> > context is not the same as when it is used in the context of kernel
>> > code; the former is actually a positive thing ("look we can configure
>> > the kernel behavior the way we want!") while the latter is a
>> > maintenance and support nightmare.
>>
>> Paul are you saying my experience with /proc/net pointing incorrectly at
>> /proc/self/net instead of /proc/thread-self/net is invalid?
>
> My comment was that runtime kernel configuration is always going to be
> out of tree due to its very nature, and conflating runtime
> configuration with kernel code is a mistake.
When the runtime configuration has it's own llvm backend I have
trouble seeing the difference. It is code that controls kernel behavior
that does not live in the kernel.
Apparmor and selinux polices are not quite that generic but as I have
discovered much to my pain routine clean-ups that userspace does not
care about are blocked because apparmor and selinux policies have bugs.
When I can not fix kernel bugs because of policy bugs, it has the
same kind of effect as keeping an interface the same for out of
tree code. A little worse actually.
Most kernel runtime configuration is a on/off of a numeric setting
with logic that is enabled by that in the kernel. Those I can agree
are not the same.
Given that the logic and it's bugs are going to be out of tree I do not
agree that we should only consider what goes into the kernel when
looking into that kind of code. Instead we should treat it will all of
the due diligence that we attempt to use when creating a system call.
That very much has not happened here.
Eric