€•ÿ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ŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ'/translations/pt_BR/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.”…””}”(hj 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”…””}”(hj3h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj0h²hh³hÇh´K!ubhŒtable”“”)”}”(hhh]”hŒtgroup”“”)”}”(hhh]”(hŒcolspec”“”)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1jKhjHubjL)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1jKhjHubjL)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1jKhjHubjL)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1jKhjHubhŒthead”“”)”}”(hhh]”hŒrow”“”)”}”(hhh]”(hŒentry”“”)”}”(hhh]”hï)”}”(hŒCurrent Mapping”h]”hŒCurrent Mapping”…””}”(hj„h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K$hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj|ubj€)”}”(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&]”uh1jhj|ubj€)”}”(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&]”uh1jhj|ubj€)”}”(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&]”uh1jhj|ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jzhjwubah}”(h]”h ]”h"]”h$]”h&]”uh1juhjHubhŒtbody”“”)”}”(hhh]”(j{)”}”(hhh]”(j€)”}”(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&]”uh1jhjîubj€)”}”(hhh]”hï)”}”(hŒ Anonymous”h]”hŒ Anonymous”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K&hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjîubj€)”}”(hhh]”hï)”}”(hŒRead”h]”hŒRead”…””}”(hj"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K&hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjîubj€)”}”(hhh]”hï)”}”(hŒAllow”h]”hŒAllow”…””}”(hj9h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K&hj6ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjîubeh}”(h]”h ]”h"]”h$]”h&]”uh1jzhjëubj{)”}”(hhh]”(j€)”}”(hhh]”hï)”}”(hŒ Anonymous”h]”hŒ Anonymous”…””}”(hjYh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K(hjVubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjSubj€)”}”(hhh]”hï)”}”(hŒ Anonymous”h]”hŒ Anonymous”…””}”(hjph²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K(hjmubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjSubj€)”}”(hhh]”hï)”}”(hŒ Read / Write”h]”hŒ Read / Write”…””}”(hj‡h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K(hj„ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjSubj€)”}”(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&]”uh1jhjSubeh}”(h]”h ]”h"]”h$]”h&]”uh1jzhjëubj{)”}”(hhh]”(j€)”}”(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&]”uh1jhj¸ubj€)”}”(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&]”uh1jhj¸ubj€)”}”(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&]”uh1jhj¸ubj€)”}”(hhh]”hï)”}”(hŒProhibit”h]”hŒProhibit”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K*hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj¸ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jzhjëubj{)”}”(hhh]”(j€)”}”(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&]”uh1jhjubj€)”}”(hhh]”hï)”}”(hŒ Anonymous”h]”hŒ Anonymous”…””}”(hj:h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K,hj7ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj€)”}”(hhh]”hï)”}”(hŒAny”h]”hŒAny”…””}”(hjQh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K,hjNubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj€)”}”(hhh]”hï)”}”(hŒProhibit”h]”hŒProhibit”…””}”(hjhh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K,hjeubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jzhjëubj{)”}”(hhh]”(j€)”}”(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&]”uh1jhj‚ubj€)”}”(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&]”uh1jhj‚ubj€)”}”(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&]”uh1jhj‚ubj€)”}”(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&]”uh1jhj‚ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jzhjëubeh}”(h]”h ]”h"]”h$]”h&]”uh1jéhjHubeh}”(h]”h ]”h"]”h$]”h&]”Œcols”Kuh1jFhjCubah}”(h]”h ]”h"]”h$]”h&]”uh1jAhj0h²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”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjh²hh³hÇh´K2ubhï)”}”(hŒBuild kernel with:”h]”hŒBuild kernel with:”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K4hjh²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.”…””}”(hj,h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K6hj(ubah}”(h]”h ]”h"]”h$]”h&]”uh1j&hj#h²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.”…””}”(hjDh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K:hj@ubah}”(h]”h ]”h"]”h$]”h&]”uh1j&hj#h²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1j!h³hÇh´K6hjh²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.”…””}”(hj`h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K