# Re: \[PATCH V34 19/29\] Lock down module params that specify hardware parameters (eg. ioport)

- From: Matthew Garrett \<hidden\>
- Date: 2019-06-27 15:31:07 
- List: linux-api
- Page: https://ratatoskr.run/linux-api/2019/06/5642212
- Thread: https://ratatoskr.run/linux-security-module/2019/06/5636588/t/2.md

```text
On Wed, Jun 26, 2019 at 6:49 PM Daniel Axtens [ref] wrote:
>
> Matthew Garrett [ref] writes:
> > +     if (kp->flags & KERNEL_PARAM_FL_HWPARAM &&
> > +         security_locked_down(LOCKDOWN_MODULE_PARAMETERS))
> > +             return false;
> > +     return true;
> >  }
>
> Should this test occur before tainting the kernel?

Seems reasonable.
```
