Commit dc742b01 authored by Yanteng Si's avatar Yanteng Si Committed by Jonathan Corbet

docs/zh_CN: add vm page_table_check translation

Translate .../vm/page_table_check.rst into Chinese.
Signed-off-by: default avatarYanteng Si <siyanteng@loongson.cn>
Reviewed-by: default avatarAlex Shi <alexs@kernel.org>
Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent 7bdc0a95
......@@ -34,6 +34,7 @@ TODO:待引用文档集被翻译完毕后请及时修改此处)
overcommit-accounting
page_frags
page_owner
page_table_check
TODOLIST:
* arch_pgtable_helpers
......@@ -42,7 +43,6 @@ TODOLIST:
* hugetlbfs_reserv
* numa
* page_migration
* page_table_check
* remap_file_pages
* slub
* split_page_table_lock
......
.. SPDX-License-Identifier: GPL-2.0
:Original: Documentation/vm/page_table_check.rst
:翻译:
司延腾 Yanteng Si <siyanteng@loongson.cn>
:校译:
========
页表检查
========
概述
====
页表检查允许通过确保防止某些类型的内存损坏来强化内核。
当新的页面可以从用户空间访问时,页表检查通过将它们的页表项(PTEs PMD等)添加到页表中来执行额外
的验证。
在检测到损坏的情况下,内核会被崩溃。页表检查有一个小的性能和内存开销。因此,它在默认情况下是禁用
的,但是在额外的加固超过性能成本的系统上,可以选择启用。另外,由于页表检查是同步的,它可以帮助调
试双映射内存损坏问题,在错误的映射发生时崩溃内核,而不是在内存损坏错误发生后内核崩溃。
双重映射检测逻辑
================
+-------------------+-------------------+-------------------+------------------+
| Current Mapping | New mapping | Permissions | Rule |
+===================+===================+===================+==================+
| Anonymous | Anonymous | Read | Allow |
+-------------------+-------------------+-------------------+------------------+
| Anonymous | Anonymous | Read / Write | Prohibit |
+-------------------+-------------------+-------------------+------------------+
| Anonymous | Named | Any | Prohibit |
+-------------------+-------------------+-------------------+------------------+
| Named | Anonymous | Any | Prohibit |
+-------------------+-------------------+-------------------+------------------+
| Named | Named | Any | Allow |
+-------------------+-------------------+-------------------+------------------+
启用页表检查
============
用以下方法构建内核:
- PAGE_TABLE_CHECK=y
注意,它只能在ARCH_SUPPORTS_PAGE_TABLE_CHECK可用的平台上启用。
- 使用 "page_table_check=on" 内核参数启动。
可以选择用PAGE_TABLE_CHECK_ENFORCED来构建内核,以便在没有额外的内核参数的情况下获得页表
支持。
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment