# Re: \[PATCH V33 01/30\] security: Support early LSMs

- From: Matthew Garrett \<hidden\>
- Date: 2019-06-21 19:28:00 
- List: linux-api
- Page: https://ratatoskr.run/linux-api/2019/06/5636476
- Thread: https://ratatoskr.run/linux-api/2019/06/5635618/t.md

```text
On Thu, Jun 20, 2019 at 10:23 PM Andy Lutomirski [ref] wrote:
>
> On Thu, Jun 20, 2019 at 6:22 PM Matthew Garrett
> [ref] wrote:
> >
> > The lockdown module is intended to allow for kernels to be locked down
> > early in boot - sufficiently early that we don't have the ability to
> > kmalloc() yet. Add support for early initialisation of some LSMs, and
> > then add them to the list of names when we do full initialisation later.
>
> I'm confused.  What does it even mean to lock down the kernel before
> we're ready to run userspace code?  We can't possibly be attacked by
> user code before there is any to attack us.

Certain kernel parameters can be disabled by lockdown, so we want to
have policy available before that parsing happens.
```
