Re: [PATCH net-next v3 5/5] selftest: Add tests for useful handling of LSM denials on SCM_RIGHTS

From: Jori Koolstra

Date: Wed Jul 01 2026 - 05:34:04 EST



> Op 01-07-2026 09:38 CEST schreef Christian Brauner <brauner@xxxxxxxxxx>:
>
> >
> > I just need some LSM to trigger the reject of security_file_receive()
> > and Smack was the easiest to get going. The series is totally agnostic
> > to the used LSM. I am fine with moving the tests elsewhere or porting
> > them to SELinux if that is really necessary. We could also drop them
> > altogether.
> >
> > What do you propose?
>
> I'm pretty sure the easiest will be to use a tiny bpf program to reject
> security_file_receive().

Ah. Well, that's a testament to how much there's still to learn for me.
I didn't even know that bpf could hook into LSM calls :)