Re: [PATCH bpf-next v3 04/10] bpf: lsm: Add mutable hooks list for the BPF LSM
From: James Morris <jmorris@namei.org>
Date: 2020-01-24 21:55:36
Also in:
bpf, lkml
From: James Morris <jmorris@namei.org>
Date: 2020-01-24 21:55:36
Also in:
bpf, lkml
On Thu, 23 Jan 2020, KP Singh wrote:
quoted
If you want to put mutable hook handling in the infrastructure you need to make it general mutable hook handling as opposed to BPF hook handling. I don't know if that would be acceptable for all the reasons called out about dynamic module loading.We can have generic mutable hook handling and if an LSM doesn't
--> provide a mutable security_hook_heads, it would not allow dynamic
hooks / dynamic module loading. So, in practice it will just be the BPF LSM that allows mutable hooks and the other existing LSMs won't. I guess it will be cleaner than calling the BPF hooks directly from the LSM code (i.e in security.c)
I'm inclined to only have mutable hooks for KRSI, not for all LSMs. This is a special case and we don't need to provide this for anyone else. Btw, folks, PLEASE trim replies. -- James Morris [off-list ref]