linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Jiabing Wan <wanjiabing@vivo.com>
To: "Wu X.C." <bobwxc@email.cn>
Cc: Alex Shi <alexs@kernel.org>, Jonathan Corbet <corbet@lwn.net>,
	 Paul Walmsley <paul.walmsley@sifive.com>,
	 Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	 Nathan Chancellor <nathan@kernel.org>,
	 Nick Desaulniers <ndesaulniers@google.com>,
	 Bernard Zhao <bernard@vivo.com>,
	Fangrui Song <maskray@google.com>,
	 linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-riscv@lists.infradead.org,
	clang-built-linux@googlegroups.com
Subject: Re:Re: [PATCH] [v3] docs/zh_CN: add translations in zh_CN/dev-tools/kasan
Date: Thu, 3 Jun 2021 20:16:57 +0800 (GMT+08:00)	[thread overview]
Message-ID: <AOUAGADjDgLoPa*jUlFgu4pV.3.1622722617365.Hmail.wanjiabing@vivo.com> (raw)
In-Reply-To: <20210603120308.GB5502@bobwxc.top>

 
>On Thu, Jun 03, 2021 at 05:47:25PM +0800, Wan Jiabing wrote:
>> Add new zh translations
>> * zh_CN/dev-tools/kasan.rst
>> and link it to zh_CN/dev-tools/index.rst
>> 
>> Reviewed-by: Fangrui Song <maskray@google.com>
>> Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
>> ---
>> Changelog:
>> v3:
>> - Fix aligns and inaccurate translation
>> v2:
>> - Delete spaces surround with English words.
>> ---
>>  .../translations/zh_CN/dev-tools/index.rst         |   2 +-
>>  .../translations/zh_CN/dev-tools/kasan.rst         | 417 +++++++++++++++++++++
>>  2 files changed, 418 insertions(+), 1 deletion(-)
>>  create mode 100644 Documentation/translations/zh_CN/dev-tools/kasan.rst
>> 
>> diff --git a/Documentation/translations/zh_CN/dev-tools/index.rst b/Documentation/translations/zh_CN/dev-tools/index.rst
>> index fd73c47..e6c99f2 100644
>> --- a/Documentation/translations/zh_CN/dev-tools/index.rst
>> +++ b/Documentation/translations/zh_CN/dev-tools/index.rst
>> @@ -19,13 +19,13 @@
>>     :maxdepth: 2
>>  
>>     gcov
>> +   kasan
>>  
>>  Todolist:
>>  
>>   - coccinelle
>>   - sparse
>>   - kcov
>> - - kasan
>>   - ubsan
>>   - kmemleak
>>   - kcsan
>> diff --git a/Documentation/translations/zh_CN/dev-tools/kasan.rst b/Documentation/translations/zh_CN/dev-tools/kasan.rst
>> new file mode 100644
>> index 0000000..a12b3b0
>> --- /dev/null
>> +++ b/Documentation/translations/zh_CN/dev-tools/kasan.rst
>> @@ -0,0 +1,417 @@
>> +.. SPDX-License-Identifier: GPL-2.0
>> +
>> +.. include:: ../disclaimer-zh_CN.rst
>> +
>> +:Original: Documentation/dev-tools/kasan.rst
>> +:Translator: 万家兵 Wan Jiabing <wanjiabing@vivo.com>
>> +
>> +内核地址消毒剂(KASAN)
>> +======================
>> +
>> +概述
>> +----
>> +
>> +KernelAddressSANitizer(KASAN)是一种动态内存安全错误检测工具,主要功能是
>> +检查内存越界访问和使用已释放内存的问题。KASAN有三种模式:
>> +
>> +1. 通用KASAN(与用户空间的ASan类似)
>> +2. 基于软件标签的KASAN(与用户空间的HWASan类似)
>> +3. 基于硬件标签的KASAN(基于硬件内存标签)
>> +
>> +由于通用KASAN的内存开销较大,通用KASAN主要用于调试。基于软件标签的KASAN
>> +可用于dogfood测试,因为它具有较低的内存开销,并允许将其用于实际工作量。
>> +基于硬件标签的KASAN具有较低的内存和性能开销,因此可用于生产。同时可用于
>> +检测现场内存问题或作为安全缓解措施。
>> +
>> +软件KASAN模式(#1和#2)使用编译时工具在每次内存访问之前插入有效性检查,
>> +因此需要一个支持它的编译器版本。
>> +
>> +通用KASAN在GCC和Clang受支持。GCC需要8.3.0或更高版本。任何受支持的Clang
>> +版本都是兼容的,但从Clang 11才开始支持检测全局变量的越界访问。
>> +
>> +基于软件标签的KASAN模式仅在Clang中受支持。
>> +
>> +硬件KASAN模式(#3)依赖硬件来执行检查,但仍需要支持内存标签指令的编译器
>> +版本。GCC 10+和Clang 11+支持此模式。
>> +
>> +两种软件KASAN模式都适用于SLUB和SLAB内存分配器,而基于硬件标签的KASAN目前
>> +仅支持SLUB。
>> +
>> +目前x86_64、arm、arm64、xtensa、s390、riscv架构支持通用KASAN模式,仅
>> +arm64架构支持基于标签的KASAN模式。
>> +
>> +用法
>> +----
>> +
>> +要启用KASAN,请使用以下命令配置内核::
>> +
>> +	  CONFIG_KASAN=y
>> +
>> +同时在 ``CONFIG_KASAN_GENERIC`` (启用通用KASAN模式), ``CONFIG_KASAN_SW_TAGS``
>> +(启用基于硬件标签的KASAN模式),和 ``CONFIG_KASAN_HW_TAGS`` (启用基于硬件标签
>> +的KASAN模式)之间进行选择。
>> +
>> +对于软件模式,还可以在 ``CONFIG_KASAN_OUTLINE`` 和 ``CONFIG_KASAN_INLINE``
>> +之间进行选择。outline和inline是编译器插桩类型。前者产生较小的二进制文件,
>> +而后者快1.1-2倍。
>> +
>> +要将受影响的slab对象的alloc和free堆栈跟踪包含到报告中,请启用
>> +``CONFIG_STACKTRACE`` 。要包括受影响物理页面的分配和释放堆栈跟踪的话,
>> +请启用``CONFIG_PAGE_OWNER`` 并使用 ``page_owner=on`` 进行引导。
>--------^
>
>missed a space here
>
>Build it, just here.
>
>Thanks,
>	Wu X.C.
>

Thank you!

Nice catch!

I will build it and review again.

Yours,
Jiabing Wan


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

      reply	other threads:[~2021-06-03 12:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-03  9:47 [PATCH] [v3] docs/zh_CN: add translations in zh_CN/dev-tools/kasan Wan Jiabing
2021-06-03 12:05 ` Wu X.C.
2021-06-03 12:16   ` Jiabing Wan [this message]

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='AOUAGADjDgLoPa*jUlFgu4pV.3.1622722617365.Hmail.wanjiabing@vivo.com' \
    --to=wanjiabing@vivo.com \
    --cc=alexs@kernel.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=bernard@vivo.com \
    --cc=bobwxc@email.cn \
    --cc=clang-built-linux@googlegroups.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=maskray@google.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    /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;
as well as URLs for NNTP newsgroup(s).