lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAC5umyhXdjJ-jw+WxZzQd+cc76f5UGC_akz6at13BSPD7shk0Q@mail.gmail.com>
Date: Sun, 28 Jul 2024 18:07:37 +0900
From: Akinobu Mita <akinobu.mita@...il.com>
To: Breno Leitao <leitao@...ian.org>, Dmitry Monakhov <dmtrmonakhov@...dex-team.ru>
Cc: Jonathan Corbet <corbet@....net>, kuba@...nel.org, 
	"open list:DOCUMENTATION" <linux-doc@...r.kernel.org>, open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] docs: fault-injection: document cache-filter feature for failslab

2024年7月26日(金) 21:09 Breno Leitao <leitao@...ian.org>:
>
> The failslab fault injection mechanism has an undocumented capability
> that provides significant utility in testing and debugging. This feature,
> introduced in commit 4c13dd3b48fcb ("failslab: add ability to filter slab
> caches"), allows for targeted error injection into specific slab caches.
>
> However, it was inadvertently left undocumented at the time of its
> implementation.
>
> Add documentation for the cache-filter feature in the failslab mode
> description. Also, providing a practical example demonstrating how to
> use cache-filter to inject failures specifically when allocating socket
> buffers (skbs).
>
> Signed-off-by: Breno Leitao <leitao@...ian.org>
> ---
>  .../fault-injection/fault-injection.rst       | 20 +++++++++++++++++++
>  1 file changed, 20 insertions(+)
>
> diff --git a/Documentation/fault-injection/fault-injection.rst b/Documentation/fault-injection/fault-injection.rst
> index 70380a2a01b4..07c24710bd21 100644
> --- a/Documentation/fault-injection/fault-injection.rst
> +++ b/Documentation/fault-injection/fault-injection.rst
> @@ -141,6 +141,14 @@ configuration of fault-injection capabilities.
>         default is 'Y', setting it to 'N' will also inject failures into
>         highmem/user allocations (__GFP_HIGHMEM allocations).
>
> +- /sys/kernel/debug/failslab/cache-filter
> +       Format: { 'Y' | 'N' }
> +
> +        default is 'N', setting it to 'Y' will only inject failures when
> +        objects are requests from certain caches.
> +
> +        Select the cache by writing '1' to /sys/kernel/slab/<cache>/failslab:
> +
>  - /sys/kernel/debug/failslab/ignore-gfp-wait:
>  - /sys/kernel/debug/fail_page_alloc/ignore-gfp-wait:
>
> @@ -459,6 +467,18 @@ Application Examples
>      losetup -d $DEVICE
>      rm testfile.img
>
> +------------------------------------------------------------------------------
> +
> +- Inject only skbuff allocation failures ::
> +
> +    # mark skbuff_head_cache as faulty
> +    echo 1 > /sys/kernel/slab/skbuff_head_cache/failslab
> +    # Turn on cache filter (off by default)
> +    echo 1 > /sys/kernel/debug/failslab/cache-filter
> +    # Turn on fault injection
> +    echo 1 > /sys/kernel/debug/failslab/times
> +    echo 1 > /sys/kernel/debug/failslab/probability
> +
>
>  Tool to run command with failslab or fail_page_alloc
>  ----------------------------------------------------

Looks good.

Reviewed-by: Akinobu Mita <akinobu.mita@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ