[<prev] [next>] [day] [month] [year] [list]
Message-ID: <6F05157E5E157493+20250123043258.149643-1-wangyuli@uniontech.com>
Date: Thu, 23 Jan 2025 12:32:46 +0800
From: WangYuli <wangyuli@...ontech.com>
To: alexs@...nel.org,
si.yanteng@...ux.dev,
corbet@....net
Cc: linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org,
kees@...nel.org,
dzm91@...t.edu.cn,
wangyuli@...ontech.com,
zhanjun@...ontech.com,
guanwentao@...ontech.com,
chenlinxuan@...ontech.com
Subject: [PATCH] docs/zh_CN: Update the translation of dev-tools/ubsan to v6.13
Commit 918327e9b7ff ("ubsan: Remove CONFIG_UBSAN_SANITIZE_ALL")
removed the CONFIG_UBSAN_SANITIZE_ALL configuration option. Update
the Chinese documentation accordingly and revise the document format
by the way.
Signed-off-by: WangYuli <wangyuli@...ontech.com>
---
.../translations/zh_CN/dev-tools/ubsan.rst | 35 +++++++++----------
1 file changed, 17 insertions(+), 18 deletions(-)
diff --git a/Documentation/translations/zh_CN/dev-tools/ubsan.rst b/Documentation/translations/zh_CN/dev-tools/ubsan.rst
index 2487696b3772..8925035c78e3 100644
--- a/Documentation/translations/zh_CN/dev-tools/ubsan.rst
+++ b/Documentation/translations/zh_CN/dev-tools/ubsan.rst
@@ -3,7 +3,16 @@
.. include:: ../disclaimer-zh_CN.rst
:Original: Documentation/dev-tools/ubsan.rst
-:Translator: Dongliang Mu <dzm91@...t.edu.cn>
+
+:翻译:
+
+ Dongliang Mu <dzm91@...t.edu.cn>
+
+:校译:
+
+ 王昱力 WangYuli <wangyuli@...ontech.com>
+
+.. _cn_ubsan:
未定义行为消毒剂 - UBSAN
====================================
@@ -55,30 +64,20 @@ GCC自4.9.x [1_] (详见 ``-fsanitize=undefined`` 选项及其子选项)版
使用如下内核配置启用UBSAN::
- CONFIG_UBSAN=y
-
-使用如下内核配置检查整个内核::
-
- CONFIG_UBSAN_SANITIZE_ALL=y
+ CONFIG_UBSAN=y
-为了在特定文件或目录启动代码插桩,需要在相应的内核Makefile中添加一行类似内容:
-
-- 单文件(如main.o)::
-
- UBSAN_SANITIZE_main.o := y
-
-- 一个目录中的所有文件::
-
- UBSAN_SANITIZE := y
-
-即使设置了``CONFIG_UBSAN_SANITIZE_ALL=y``,为了避免文件被插桩,可使用::
+排除要被检测的文件::
UBSAN_SANITIZE_main.o := n
-与::
+排除一个目录中的所有文件::
UBSAN_SANITIZE := n
+当全部文件都被禁用,可通过如下方式为特定文件启用::
+
+ UBSAN_SANITIZE_main.o := y
+
未对齐的内存访问检测可通过开启独立选项 - CONFIG_UBSAN_ALIGNMENT 检测。
该选项在支持未对齐访问的架构上(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y)
默认为关闭。该选项仍可通过内核配置启用,但它将产生大量的UBSAN报告。
--
2.45.2
Powered by blists - more mailing lists