From: Wu XiangCheng <wu.xiangcheng@linux.dev>
To: Yanteng Si <siyanteng@loongson.cn>
Cc: alexs@kernel.org, seakeel@gmail.com, corbet@lwn.net,
chenhuacai@kernel.org, linux-doc@vger.kernel.org,
siyanteng01@gmail.com
Subject: Re: [PATCH v1 06/13] docs/zh_CN: Update the translation of kasan to 6.1-rc8
Date: Fri, 9 Dec 2022 15:33:17 +0800 [thread overview]
Message-ID: <Y5LkvRULM6N7EILs@bobwxc.mipc> (raw)
In-Reply-To: <bbb8e1702cb9739f43bf872428c130e90cfaf3b4.1670502763.git.siyanteng@loongson.cn>
> Update to commit cd36d84d2571 ("kasan: allow sampling
> page_alloc allocations for HW_TAGS")
>
> Commit 80b92bfe3bb7 ("kasan: dynamically allocate
> stack ring entries")
> Commit 7ebfce331251 ("kasan: support kasan.stacktrace
> for SW_TAGS")
> Commit ca89f2a2e66d ("kasan: move boot parameters
> section in documentation")
>
> Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
> ---
> .../translations/zh_CN/dev-tools/kasan.rst | 77 +++++++++++--------
> 1 file changed, 44 insertions(+), 33 deletions(-)
>
> diff --git a/Documentation/translations/zh_CN/dev-tools/kasan.rst b/Documentation/translations/zh_CN/dev-tools/kasan.rst
> index fe76cbe77ad6..c645b1b6cc53 100644
> --- a/Documentation/translations/zh_CN/dev-tools/kasan.rst
> +++ b/Documentation/translations/zh_CN/dev-tools/kasan.rst
> @@ -90,6 +90,50 @@ KASAN只支持SLUB。
> ``CONFIG_STACKTRACE`` 。要包括受影响物理页面的分配和释放堆栈跟踪的话,
> 请启用 ``CONFIG_PAGE_OWNER`` 并使用 ``page_owner=on`` 进行引导。
>
> +启动参数
> +~~~~~~~~
> +
> +KASAN受到通用 ``panic_on_warn`` 命令行参数的影响。当它被启用时,KASAN
> +在打印出错误报告后会使内核恐慌。
> +
> +默认情况下,KASAN只对第一个无效的内存访问打印错误报告。使用
> +``kasan_multi_shot``,KASAN对每一个无效的访问都打印一份报告。这有效地
有效地 => 会
> +禁用了KASAN报告的 ``panic_on_warn``。
> +
> +另外,独立于 ``panic_on_warn`` 、 ``kasan.fault=`` boot参数可以用
> +来控制恐慌和报告行为。
> +
> +- ``kasan.fault=report`` 或 ``=panic`` 控制是否只打印KASAN报告或
> + 同时使内核恐慌(默认: ``报告`` )。即使 ``kasan_multi_shot`` 被
报告 => report
> + 启用,恐慌也会发生。
> +
> +基于软件和硬件标签的KASAN模式(见下面关于各种模式的部分)支持改变堆栈跟
> +踪收集行为:
> +
> +- ``kasan.stacktrace=off`` 或 ``=on`` 禁用或启用分配和释放堆栈痕
> + 迹的收集(默认: ``on`` )。
> +
> +- ``kasan.stack_ring_size=<number of entries>`` 指定堆栈环的条
> + 目数(默认: ``32768`` )。
> +
> +基于硬件标签的KASAN模式是为了在生产中作为一种安全缓解措施使用。因此,它
> +支持额外的启动参数,允许完全禁用KASAN或控制其功能。
> +
> +- ``kasan=off`` 或 ``=on`` 控制KASAN是否被启用(默认: ``on`` )。
> +
> +- ``kasan.mode=sync``, ``=async`` or ``=asymm`` 控制KASAN是否
> + 被配置为同步、异步或非对称的执行模式(默认: ``同步`` )。
> + 同步模式:当标签检查异常发生时,会立即检测到不良访问。
> + 异步模式:不良访问的检测是延迟的。当标签检查异常发生时,信息被存储在硬
> + 件中(对于arm64来说是在TFSR_EL1寄存器中)。内核周期性地检查硬件,并\
> + 且只在这些检查中报告标签异常。
> + 非对称模式:读取时同步检测不良访问,写入时异步检测。
> +
> +- ``kasan.vmalloc=off`` or ``=on`` 禁用或启用vmalloc分配的标记(默认: ``on`` )。
> +
> +- ``kasan.page_alloc.sample=<sampling frequency>`` 使得KASAN
> + 只对每N次page_alloc分配进行标记,其中N是参数的值(默认值: ``1`` )。
Remove previous paragraph.
> +
> 错误报告
> ~~~~~~~~
>
> @@ -194,39 +238,6 @@ slab对象的描述以及关于访问的内存页的信息。
> 通用KASAN还报告两个辅助调用堆栈跟踪。这些堆栈跟踪指向代码中与对象交互但不直接
> 出现在错误访问堆栈跟踪中的位置。目前,这包括 call_rcu() 和排队的工作队列。
>
> -启动参数
> -~~~~~~~~
> -
> -KASAN受通用 ``panic_on_warn`` 命令行参数的影响。启用该功能后,KASAN在打印错误
> -报告后会引起内核恐慌。
> -
> -默认情况下,KASAN只为第一次无效内存访问打印错误报告。使用 ``kasan_multi_shot`` ,
> -KASAN会针对每个无效访问打印报告。这有效地禁用了KASAN报告的 ``panic_on_warn`` 。
> -
> -另外,独立于 ``panic_on_warn`` , ``kasan.fault=`` 引导参数可以用来控制恐慌和报
> -告行为:
> -
> -- ``kasan.fault=report`` 或 ``=panic`` 控制是只打印KASAN报告还是同时使内核恐慌
> - (默认: ``report`` )。即使启用了 ``kasan_multi_shot`` ,也会发生内核恐慌。
> -
> -基于硬件标签的KASAN模式(请参阅下面有关各种模式的部分)旨在在生产中用作安全缓解
> -措施。因此,它支持允许禁用KASAN或控制其功能的附加引导参数。
> -
> -- ``kasan=off`` 或 ``=on`` 控制KASAN是否启用 (默认: ``on`` )。
> -
> -- ``kasan.mode=sync`` 、 ``=async`` 或 ``=asymm`` 控制KASAN是否配置
> - 为同步或异步执行模式(默认:``sync`` )。
> - 同步模式:当标签检查错误发生时,立即检测到错误访问。
> - 异步模式:延迟错误访问检测。当标签检查错误发生时,信息存储在硬件中(在arm64的
> - TFSR_EL1寄存器中)。内核会定期检查硬件,并且仅在这些检查期间报告标签错误。
> - 非对称模式:读取时同步检测不良访问,写入时异步检测。
> -
> -- ``kasan.vmalloc=off`` 或 ``=on`` 禁用或启用vmalloc分配的标记(默认:``on`` )。
> -
> -- ``kasan.stacktrace=off`` 或 ``=on`` 禁用或启用alloc和free堆栈跟踪收集
> - (默认: ``on`` )。
> -
> -
> 实施细则
> --------
>
> --
> 2.31.1
>
next prev parent reply other threads:[~2022-12-09 7:33 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-08 12:57 [PATCH v1 00/13] docs/zh_CN: Update the translation to 6.1-rc8 Yanteng Si
2022-12-08 12:57 ` [PATCH v1 01/13] docs/zh_CN: Update the translation of delay-accounting " Yanteng Si
2022-12-09 6:55 ` Wu XiangCheng
2022-12-10 2:51 ` Yanteng Si
2022-12-08 12:57 ` [PATCH v1 02/13] docs/zh_CN: Update the translation of kernel-api " Yanteng Si
2022-12-09 6:57 ` Wu XiangCheng
2022-12-08 12:57 ` [PATCH v1 03/13] docs/zh_CN: Update the translation of mm-api " Yanteng Si
2022-12-09 7:01 ` Wu XiangCheng
2022-12-08 12:57 ` [PATCH v1 04/13] docs/zh_CN: Update the translation of highmem " Yanteng Si
2022-12-09 7:02 ` Wu XiangCheng
2022-12-08 12:57 ` [PATCH v1 05/13] docs/zh_CN: Update the translation of page_owner " Yanteng Si
2022-12-09 7:03 ` Wu XiangCheng
2022-12-08 12:57 ` [PATCH v1 06/13] docs/zh_CN: Update the translation of kasan " Yanteng Si
2022-12-09 7:33 ` Wu XiangCheng [this message]
2022-12-10 3:11 ` Yanteng Si
2022-12-08 12:58 ` [PATCH v1 07/13] docs/zh_CN: Update the translation of testing-overview " Yanteng Si
2022-12-09 7:05 ` Wu XiangCheng
2022-12-10 2:56 ` Yanteng Si
2022-12-08 12:59 ` [PATCH v1 08/13] docs/zh_CN: Update the translation of reclaim " Yanteng Si
2022-12-09 7:06 ` Wu XiangCheng
2022-12-08 12:59 ` [PATCH v1 09/13] docs/zh_CN: Update the translation of start " Yanteng Si
2022-12-09 7:07 ` Wu XiangCheng
2022-12-08 12:59 ` [PATCH v1 10/13] docs/zh_CN: Update the translation of usage " Yanteng Si
2022-12-09 7:08 ` Wu XiangCheng
2022-12-08 12:59 ` [PATCH v1 11/13] docs/zh_CN: Update the translation of ksm " Yanteng Si
2022-12-09 7:09 ` Wu XiangCheng
2022-12-10 3:04 ` Yanteng Si
2022-12-08 12:59 ` [PATCH v1 12/13] docs/zh_CN: Update the translation of msi-howto " Yanteng Si
2022-12-09 7:10 ` Wu XiangCheng
2022-12-08 12:59 ` [PATCH v1 13/13] docs/zh_CN: Update the translation of energy-model " Yanteng Si
2022-12-09 7:12 ` Wu XiangCheng
2022-12-10 3:06 ` Yanteng Si
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y5LkvRULM6N7EILs@bobwxc.mipc \
--to=wu.xiangcheng@linux.dev \
--cc=alexs@kernel.org \
--cc=chenhuacai@kernel.org \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=seakeel@gmail.com \
--cc=siyanteng01@gmail.com \
--cc=siyanteng@loongson.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox