Thread (9 messages) 9 messages, 5 authors, 2020-10-28

Re: [RFC PATCH v2 2/2] docs: add fail_lsm_hooks info to fault-injection.rst

From: Dmitry Vyukov <dvyukov@google.com>
Date: 2020-10-28 23:56:11
Also in: lkml

On Tue, Oct 27, 2020 at 6:34 PM Aleksandr Nogikh [off-list ref] wrote:
[...]
quoted
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 ?
I was thinking about this, but decided to begin with a simple version
that could definitely be useful in practice (for syzbot/syzkaller it is just
necessary to have a fault injection capability that will be triggered via
fail-nth). If per-hook fault injection can also be useful to someone, I
can try to add it as well.
Yes, before we add it, it would be useful to have a clear use case
(otherwise we can add an unused thing, or implement it in a way that
slightly misses the use case).
Note that fail-nth allows to fail a single concrete site for testing,
though it's not super convenient for this as one would need to figure
out the right N first. But as a one-off test it should do.

quoted
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).
Yes, that technique should help to implement the feature in a very concise
way. Thanks for the suggestion.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help