Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs/zh_CN: Update the translation of dev-tools/ubsan to v6.14-rc1

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.

Link: https://lore.kernel.org/all/6F05157E5E157493+20250123043258.149643-1-wangyuli@uniontech.com/
Link: https://lore.kernel.org/all/fb3c5ec4-eabc-48c0-bf0b-d20cad978b4f@linux.dev/
Signed-off-by: WangYuli <wangyuli@uniontech.com>
Reviewed-by: Yanteng Si <si.yanteng@linux.dev>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/2B33A00C9F5BECC7+20250207084821.251531-1-wangyuli@uniontech.com

authored by

WangYuli and committed by
Jonathan Corbet
8bc237a1 2783096f

+15 -18
+15 -18
Documentation/translations/zh_CN/dev-tools/ubsan.rst
··· 3 3 .. include:: ../disclaimer-zh_CN.rst 4 4 5 5 :Original: Documentation/dev-tools/ubsan.rst 6 - :Translator: Dongliang Mu <dzm91@hust.edu.cn> 6 + 7 + :翻译: 8 + 9 + 慕冬亮 Dongliang Mu <dzm91@hust.edu.cn> 10 + 11 + :校译: 12 + 13 + 王昱力 WangYuli <wangyuli@uniontech.com> 7 14 8 15 未定义行为消毒剂 - UBSAN 9 16 ==================================== ··· 62 55 63 56 使用如下内核配置启用UBSAN:: 64 57 65 - CONFIG_UBSAN=y 58 + CONFIG_UBSAN=y 66 59 67 - 使用如下内核配置检查整个内核:: 68 - 69 - CONFIG_UBSAN_SANITIZE_ALL=y 70 - 71 - 为了在特定文件或目录启动代码插桩,需要在相应的内核Makefile中添加一行类似内容: 72 - 73 - - 单文件(如main.o):: 74 - 75 - UBSAN_SANITIZE_main.o := y 76 - 77 - - 一个目录中的所有文件:: 78 - 79 - UBSAN_SANITIZE := y 80 - 81 - 即使设置了``CONFIG_UBSAN_SANITIZE_ALL=y``,为了避免文件被插桩,可使用:: 60 + 排除要被检测的文件:: 82 61 83 62 UBSAN_SANITIZE_main.o := n 84 63 85 - 与:: 64 + 排除一个目录中的所有文件:: 86 65 87 66 UBSAN_SANITIZE := n 67 + 68 + 当全部文件都被禁用,可通过如下方式为特定文件启用:: 69 + 70 + UBSAN_SANITIZE_main.o := y 88 71 89 72 未对齐的内存访问检测可通过开启独立选项 - CONFIG_UBSAN_ALIGNMENT 检测。 90 73 该选项在支持未对齐访问的架构上(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y)