€•)AŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ'/translations/zh_CN/mm/page_table_check”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ'/translations/zh_TW/mm/page_table_check”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ'/translations/it_IT/mm/page_table_check”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ'/translations/ja_JP/mm/page_table_check”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ'/translations/ko_KR/mm/page_table_check”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ'/translations/sp_SP/mm/page_table_check”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…””}”hh£sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1h¡hhhžhhŸŒA/var/lib/git/docbuild/linux/Documentation/mm/page_table_check.rst”h KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒPage Table Check”h]”hŒPage Table Check”…””}”(hh»hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hh¶hžhhŸh³h Kubhµ)”}”(hhh]”(hº)”}”(hŒ Introduction”h]”hŒ Introduction”…””}”(hhÌhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hhÉhžhhŸh³h KubhŒ paragraph”“”)”}”(hŒqPage table check allows to harden the kernel by ensuring that some types of the memory corruptions are prevented.”h]”hŒqPage table check allows to harden the kernel by ensuring that some types of the memory corruptions are prevented.”…””}”(hhÜhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K hhÉhžhubhÛ)”}”(hŒ¸Page table check performs extra verifications at the time when new pages become accessible from the userspace by getting their page table entries (PTEs PMDs etc.) added into the table.”h]”hŒ¸Page table check performs extra verifications at the time when new pages become accessible from the userspace by getting their page table entries (PTEs PMDs etc.) added into the table.”…””}”(hhêhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K hhÉhžhubhÛ)”}”(hXIn case of most detected corruption, the kernel is crashed. There is a small performance and memory overhead associated with the page table check. Therefore, it is disabled by default, but can be optionally enabled on systems where the extra hardening outweighs the performance costs. Also, because page table check is synchronous, it can help with debugging double map memory corruption issues, by crashing kernel at the time wrong mapping occurs instead of later which is often the case with memory corruptions bugs.”h]”hXIn case of most detected corruption, the kernel is crashed. There is a small performance and memory overhead associated with the page table check. Therefore, it is disabled by default, but can be optionally enabled on systems where the extra hardening outweighs the performance costs. Also, because page table check is synchronous, it can help with debugging double map memory corruption issues, by crashing kernel at the time wrong mapping occurs instead of later which is often the case with memory corruptions bugs.”…””}”(hhøhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h KhhÉhžhubhÛ)”}”(hXÂIt can also be used to do page table entry checks over various flags, dump warnings when illegal combinations of entry flags are detected. Currently, userfaultfd is the only user of such to sanity check wr-protect bit against any writable flags. Illegal flag combinations will not directly cause data corruption in this case immediately, but that will cause read-only data to be writable, leading to corrupt when the page content is later modified.”h]”hXÂIt can also be used to do page table entry checks over various flags, dump warnings when illegal combinations of entry flags are detected. Currently, userfaultfd is the only user of such to sanity check wr-protect bit against any writable flags. Illegal flag combinations will not directly cause data corruption in this case immediately, but that will cause read-only data to be writable, leading to corrupt when the page content is later modified.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h KhhÉhžhubeh}”(h]”Œ introduction”ah ]”h"]”Œ introduction”ah$]”h&]”uh1h´hh¶hžhhŸh³h Kubhµ)”}”(hhh]”(hº)”}”(hŒDouble mapping detection logic”h]”hŒDouble mapping detection logic”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjhžhhŸh³h K!ubhŒtable”“”)”}”(hhh]”hŒtgroup”“”)”}”(hhh]”(hŒcolspec”“”)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1j7hj4ubj8)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1j7hj4ubj8)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1j7hj4ubj8)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1j7hj4ubhŒthead”“”)”}”(hhh]”hŒrow”“”)”}”(hhh]”(hŒentry”“”)”}”(hhh]”hÛ)”}”(hŒCurrent Mapping”h]”hŒCurrent Mapping”…””}”(hjphžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K$hjmubah}”(h]”h ]”h"]”h$]”h&]”uh1jkhjhubjl)”}”(hhh]”hÛ)”}”(hŒ New mapping”h]”hŒ New mapping”…””}”(hj‡hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K$hj„ubah}”(h]”h ]”h"]”h$]”h&]”uh1jkhjhubjl)”}”(hhh]”hÛ)”}”(hŒ Permissions”h]”hŒ Permissions”…””}”(hjžhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K$hj›ubah}”(h]”h ]”h"]”h$]”h&]”uh1jkhjhubjl)”}”(hhh]”hÛ)”}”(hŒRule”h]”hŒRule”…””}”(hjµhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K$hj²ubah}”(h]”h ]”h"]”h$]”h&]”uh1jkhjhubeh}”(h]”h ]”h"]”h$]”h&]”uh1jfhjcubah}”(h]”h ]”h"]”h$]”h&]”uh1jahj4ubhŒtbody”“”)”}”(hhh]”(jg)”}”(hhh]”(jl)”}”(hhh]”hÛ)”}”(hŒ Anonymous”h]”hŒ Anonymous”…””}”(hjàhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K&hjÝubah}”(h]”h ]”h"]”h$]”h&]”uh1jkhjÚubjl)”}”(hhh]”hÛ)”}”(hŒ Anonymous”h]”hŒ Anonymous”…””}”(hj÷hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K&hjôubah}”(h]”h ]”h"]”h$]”h&]”uh1jkhjÚubjl)”}”(hhh]”hÛ)”}”(hŒRead”h]”hŒRead”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K&hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jkhjÚubjl)”}”(hhh]”hÛ)”}”(hŒAllow”h]”hŒAllow”…””}”(hj%hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K&hj"ubah}”(h]”h ]”h"]”h$]”h&]”uh1jkhjÚubeh}”(h]”h ]”h"]”h$]”h&]”uh1jfhj×ubjg)”}”(hhh]”(jl)”}”(hhh]”hÛ)”}”(hŒ Anonymous”h]”hŒ Anonymous”…””}”(hjEhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K(hjBubah}”(h]”h ]”h"]”h$]”h&]”uh1jkhj?ubjl)”}”(hhh]”hÛ)”}”(hŒ Anonymous”h]”hŒ Anonymous”…””}”(hj\hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K(hjYubah}”(h]”h ]”h"]”h$]”h&]”uh1jkhj?ubjl)”}”(hhh]”hÛ)”}”(hŒ Read / Write”h]”hŒ Read / Write”…””}”(hjshžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K(hjpubah}”(h]”h ]”h"]”h$]”h&]”uh1jkhj?ubjl)”}”(hhh]”hÛ)”}”(hŒProhibit”h]”hŒProhibit”…””}”(hjŠhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K(hj‡ubah}”(h]”h ]”h"]”h$]”h&]”uh1jkhj?ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jfhj×ubjg)”}”(hhh]”(jl)”}”(hhh]”hÛ)”}”(hŒ Anonymous”h]”hŒ Anonymous”…””}”(hjªhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K*hj§ubah}”(h]”h ]”h"]”h$]”h&]”uh1jkhj¤ubjl)”}”(hhh]”hÛ)”}”(hŒNamed”h]”hŒNamed”…””}”(hjÁhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K*hj¾ubah}”(h]”h ]”h"]”h$]”h&]”uh1jkhj¤ubjl)”}”(hhh]”hÛ)”}”(hŒAny”h]”hŒAny”…””}”(hjØhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K*hjÕubah}”(h]”h ]”h"]”h$]”h&]”uh1jkhj¤ubjl)”}”(hhh]”hÛ)”}”(hŒProhibit”h]”hŒProhibit”…””}”(hjïhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K*hjìubah}”(h]”h ]”h"]”h$]”h&]”uh1jkhj¤ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jfhj×ubjg)”}”(hhh]”(jl)”}”(hhh]”hÛ)”}”(hŒNamed”h]”hŒNamed”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K,hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jkhj ubjl)”}”(hhh]”hÛ)”}”(hŒ Anonymous”h]”hŒ Anonymous”…””}”(hj&hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K,hj#ubah}”(h]”h ]”h"]”h$]”h&]”uh1jkhj ubjl)”}”(hhh]”hÛ)”}”(hŒAny”h]”hŒAny”…””}”(hj=hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K,hj:ubah}”(h]”h ]”h"]”h$]”h&]”uh1jkhj ubjl)”}”(hhh]”hÛ)”}”(hŒProhibit”h]”hŒProhibit”…””}”(hjThžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K,hjQubah}”(h]”h ]”h"]”h$]”h&]”uh1jkhj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jfhj×ubjg)”}”(hhh]”(jl)”}”(hhh]”hÛ)”}”(hŒNamed”h]”hŒNamed”…””}”(hjthžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K.hjqubah}”(h]”h ]”h"]”h$]”h&]”uh1jkhjnubjl)”}”(hhh]”hÛ)”}”(hŒNamed”h]”hŒNamed”…””}”(hj‹hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K.hjˆubah}”(h]”h ]”h"]”h$]”h&]”uh1jkhjnubjl)”}”(hhh]”hÛ)”}”(hŒAny”h]”hŒAny”…””}”(hj¢hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K.hjŸubah}”(h]”h ]”h"]”h$]”h&]”uh1jkhjnubjl)”}”(hhh]”hÛ)”}”(hŒAllow”h]”hŒAllow”…””}”(hj¹hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K.hj¶ubah}”(h]”h ]”h"]”h$]”h&]”uh1jkhjnubeh}”(h]”h ]”h"]”h$]”h&]”uh1jfhj×ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jÕhj4ubeh}”(h]”h ]”h"]”h$]”h&]”Œcols”Kuh1j2hj/ubah}”(h]”h ]”h"]”h$]”h&]”uh1j-hjhžhhŸh³h Nubeh}”(h]”Œdouble-mapping-detection-logic”ah ]”h"]”Œdouble mapping detection logic”ah$]”h&]”uh1h´hh¶hžhhŸh³h K!ubhµ)”}”(hhh]”(hº)”}”(hŒEnabling Page Table Check”h]”hŒEnabling Page Table Check”…””}”(hjñhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjîhžhhŸh³h K2ubhÛ)”}”(hŒBuild kernel with:”h]”hŒBuild kernel with:”…””}”(hjÿhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K4hjîhžhubhŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒpPAGE_TABLE_CHECK=y Note, it can only be enabled on platforms where ARCH_SUPPORTS_PAGE_TABLE_CHECK is available. ”h]”hÛ)”}”(hŒoPAGE_TABLE_CHECK=y Note, it can only be enabled on platforms where ARCH_SUPPORTS_PAGE_TABLE_CHECK is available.”h]”hŒoPAGE_TABLE_CHECK=y Note, it can only be enabled on platforms where ARCH_SUPPORTS_PAGE_TABLE_CHECK is available.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K6hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjhžhhŸh³h Nubj)”}”(hŒ2Boot with 'page_table_check=on' kernel parameter. ”h]”hÛ)”}”(hŒ1Boot with 'page_table_check=on' kernel parameter.”h]”hŒ5Boot with ‘page_table_check=on’ kernel parameter.”…””}”(hj0hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K:hj,ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjhžhhŸh³h Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1j hŸh³h K6hjîhžhubhÛ)”}”(hŒ{Optionally, build kernel with PAGE_TABLE_CHECK_ENFORCED in order to have page table support without extra kernel parameter.”h]”hŒ{Optionally, build kernel with PAGE_TABLE_CHECK_ENFORCED in order to have page table support without extra kernel parameter.”…””}”(hjLhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K