Re: [PATCH BUGFIX -rc3] Smack: Don't register smackfs if we're notloaded

From: Ahmed S. Darwish
Date: Wed Mar 05 2008 - 07:48:16 EST


On Tue, Mar 04, 2008 at 09:45:04AM -0800, Casey Schaufler wrote:
> ----- Original Message ----
> > From: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> > To: Ahmed S. Darwish <darwish.07@xxxxxxxxx>
> > Cc: Casey Schaufler <casey@xxxxxxxxxxxxxxxx>; LKML <linux-kernel@xxxxxxxxxxxxxxx>
> > Sent: Tuesday, March 4, 2008 9:21:19 AM
> > Subject: Re: [PATCH BUGFIX -rc3] Smack: Don't register smackfs if we're not loaded
> >
> >
> >
> > On Tue, 4 Mar 2008, Ahmed S. Darwish wrote:
> > >
> > > Smackfs initialization without an enabled Smack leads to
> > > an early Oops that renders the system unusable.
> >
> > I really think this is bogus. Global enables like this are just wrong, and
> > a sign that something else bad is going on.
> >
> > What is the oops? Why does it happen?
...
>
> One solution would be to tighten the smackfs code so that it
> handles the uninitialized LSM case properly.
>

IMHO no smackfs code should ever execute if smack isn't loaded.

This means catching it from the very fist step where it registers
itself in init_smk_fs instead of doing several if(we're enabled) cases
in the code path.

The solution should be a _general_ solution, _not_ a SMACK one cause
SELinux sufferes from exactly the same problem.

a.k.a:

LSMs need a scalable way to know if they're enabled that makes
everyone happy ( especially Linus ;) ).

Regads to all,

--

"Better to light a candle, than curse the darkness"

Ahmed S. Darwish
Homepage: http://darwish.07.googlepages.com
Blog: http://darwish-07.blogspot.com

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/