Re: [RFC][PATCH 4/4] security: Enforce limitations on return values from LSMs
From: Paul Moore <paul@paul-moore.com>
Date: 2022-11-16 22:06:40
Also in:
bpf, lkml
From: Paul Moore <paul@paul-moore.com>
Date: 2022-11-16 22:06:40
Also in:
bpf, lkml
On Wed, Nov 16, 2022 at 9:37 AM Roberto Sassu [off-list ref] wrote:
On Tue, 2022-11-15 at 21:35 -0500, Paul Moore wrote:quoted
If you want to somehow instrument the LSM hook definitions (what I believe to be the motivation behind patch 3/4) to indicate valid return values for use by the BPF verifier, I think we could entertain that, or at least discuss it further, but I'm not inclined to support any runtime overhead at the LSM layer for a specific LSM.Ok, yes. Patches 1-3 would help to keep in sync the LSM infrastructure and eBPF, but it is not strictly needed. I could propose an eBPF-only alternative to declare sets of functions per interval. More or less, I developed an eBPF-based alternative also for patch 4. It is just a proof of concept. Will propose it, to validate the idea.
Thanks, I think that might be the best approach. Also, please resubmit patches 1/4 and 2/4 with those small changes; those are nice improvements that just need a couple of small tweaks to be acceptable :) -- paul-moore.com