Message ID | 20250409185019.238841-49-paul@paul-moore.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Rework the LSM initialization | expand |
On Wed, Apr 09, 2025 at 02:50:03PM -0400, Paul Moore wrote: > Signed-off-by: Paul Moore <paul@paul-moore.com> Reviewed-by: Kees Cook <kees@kernel.org>
On Wed, Apr 9, 2025 at 7:39 PM Kees Cook <kees@kernel.org> wrote: > On Wed, Apr 09, 2025 at 02:50:03PM -0400, Paul Moore wrote: > > Signed-off-by: Paul Moore <paul@paul-moore.com> > > Reviewed-by: Kees Cook <kees@kernel.org> Do you mind if I convert this into an Acked-by? Generally speaking I put more weight behind a Reviewed-by tag, but in the case of Loadpin you are the maintainer and I'd much prefer an Acked-by. While I'm always happy to get more reviews on a patch, the primary reason for CC'ing you directly was to get ACKs on the LSMs you maintain :)
On Thu, Apr 10, 2025 at 09:15:47PM -0400, Paul Moore wrote: > On Wed, Apr 9, 2025 at 7:39 PM Kees Cook <kees@kernel.org> wrote: > > On Wed, Apr 09, 2025 at 02:50:03PM -0400, Paul Moore wrote: > > > Signed-off-by: Paul Moore <paul@paul-moore.com> > > > > Reviewed-by: Kees Cook <kees@kernel.org> > > Do you mind if I convert this into an Acked-by? Generally speaking I > put more weight behind a Reviewed-by tag, but in the case of Loadpin > you are the maintainer and I'd much prefer an Acked-by. While I'm > always happy to get more reviews on a patch, the primary reason for > CC'ing you directly was to get ACKs on the LSMs you maintain :) Acked-by: Kees Cook <kees@kernel.org> :)
On Thu, Apr 10, 2025 at 10:16 PM Kees Cook <kees@kernel.org> wrote: > > On Thu, Apr 10, 2025 at 09:15:47PM -0400, Paul Moore wrote: > > On Wed, Apr 9, 2025 at 7:39 PM Kees Cook <kees@kernel.org> wrote: > > > On Wed, Apr 09, 2025 at 02:50:03PM -0400, Paul Moore wrote: > > > > Signed-off-by: Paul Moore <paul@paul-moore.com> > > > > > > Reviewed-by: Kees Cook <kees@kernel.org> > > > > Do you mind if I convert this into an Acked-by? Generally speaking I > > put more weight behind a Reviewed-by tag, but in the case of Loadpin > > you are the maintainer and I'd much prefer an Acked-by. While I'm > > always happy to get more reviews on a patch, the primary reason for > > CC'ing you directly was to get ACKs on the LSMs you maintain :) > > Acked-by: Kees Cook <kees@kernel.org> > > :) Thanks :)
diff --git a/security/loadpin/loadpin.c b/security/loadpin/loadpin.c index b9ddf05c5c16..273ffbd6defe 100644 --- a/security/loadpin/loadpin.c +++ b/security/loadpin/loadpin.c @@ -270,11 +270,6 @@ static int __init loadpin_init(void) return 0; } -DEFINE_LSM(loadpin) = { - .id = &loadpin_lsmid, - .init = loadpin_init, -}; - #ifdef CONFIG_SECURITY_LOADPIN_VERITY enum loadpin_securityfs_interface_index { @@ -434,10 +429,16 @@ static int __init init_loadpin_securityfs(void) return 0; } -fs_initcall(init_loadpin_securityfs); - #endif /* CONFIG_SECURITY_LOADPIN_VERITY */ +DEFINE_LSM(loadpin) = { + .id = &loadpin_lsmid, + .init = loadpin_init, +#ifdef CONFIG_SECURITY_LOADPIN_VERITY + .initcall_fs = init_loadpin_securityfs, +#endif /* CONFIG_SECURITY_LOADPIN_VERITY */ +}; + /* Should not be mutable after boot, so not listed in sysfs (perm == 0). */ module_param(enforce, int, 0); MODULE_PARM_DESC(enforce, "Enforce module/firmware pinning");
Signed-off-by: Paul Moore <paul@paul-moore.com> --- security/loadpin/loadpin.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)