Re: [PATCH v7 10/15] platform/x86: dell-smbios: add filtering capability for requests

From: Alan Cox
Date: Thu Oct 12 2017 - 06:09:52 EST


On Wed, 11 Oct 2017 11:27:36 -0500
Mario Limonciello <mario.limonciello@xxxxxxxx> wrote:

> There are some categories of tokens and SMBIOS calls that it makes
> sense to protect userspace from accessing. These are calls that
> may write to one time use fields or activate hardware debugging
> capabilities. They are not intended for general purpose use.
>
> This same functionality may be be later extended to also intercept
> calls that may cause kernel functionality to get out of sync if
> the same functions are used by other drivers.

This doesn't work. You are creating an API. If you then have to remove
parts of the API because it messes stuff up you break your API guarantee.

As I said before, this needs to be a whitelist of stuff that is safe, and
it needs to have a security model. When you make a feature available you
can't nicely take it away again as you'll break people's user space.

Start with a whitelist of the ones you know people want to use, or that
your existing tooling you want to enable uses. Add others as needed in
future releases of the kernel.

Alan