[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAC5umyjZn+gtO=u8GhptVggzodbY-vnk9NNTOqyZyUW2up2ASQ@mail.gmail.com>
Date: Wed, 28 Oct 2020 00:31:11 +0900
From: Akinobu Mita <akinobu.mita@...il.com>
To: Aleksandr Nogikh <a.nogikh@...il.com>
Cc: jmorris@...ei.org, serge@...lyn.com,
Andrey Konovalov <andreyknvl@...gle.com>,
Dmitry Vyukov <dvyukov@...gle.com>,
Marco Elver <elver@...gle.com>,
Alexander Potapenko <glider@...gle.com>, keescook@...gle.com,
LKML <linux-kernel@...r.kernel.org>,
linux-security-module@...r.kernel.org,
Aleksandr Nogikh <nogikh@...gle.com>
Subject: Re: [RFC PATCH v2 2/2] docs: add fail_lsm_hooks info to fault-injection.rst
2020年10月26日(月) 21:52 Aleksandr Nogikh <a.nogikh@...il.com>:
>
> From: Aleksandr Nogikh <nogikh@...gle.com>
>
> Describe fail_lsm_hooks fault injection capability.
>
> Signed-off-by: Aleksandr Nogikh <nogikh@...gle.com>
> ---
> v2:
> - Added this commit.
> ---
> Documentation/fault-injection/fault-injection.rst | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/Documentation/fault-injection/fault-injection.rst b/Documentation/fault-injection/fault-injection.rst
> index 31ecfe44e5b4..48705adfbc18 100644
> --- a/Documentation/fault-injection/fault-injection.rst
> +++ b/Documentation/fault-injection/fault-injection.rst
> @@ -48,6 +48,12 @@ Available fault injection capabilities
> status code is NVME_SC_INVALID_OPCODE with no retry. The status code and
> retry flag can be set via the debugfs.
>
> +- fail_lsm_hooks
> +
> + injects failures into LSM hooks. When a fault is injected, actual hooks
> + are not executed and a code from /sys/kernel/debug/fail_lsm_hooks/retval
> + is returned (the default value is -EACCES).
In addition to this global one, what do you think about per-hook fault
injection,
i.e. /sys/kernel/debug/fail_lsm_hooks/<FUNC>/retval ?
In this case, we need a fault_attr for each hook. (Maybe, we can use the same
technique that is used to define security_hook_heads).
Powered by blists - more mailing lists