[PW_SID:1140771] mm/page_table_check: add explicit pmd_none check in pte_clear_range - #2416
[PW_SID:1140771] mm/page_table_check: add explicit pmd_none check in pte_clear_range#2416linux-riscv-bot wants to merge 2 commits into
Conversation
In __page_table_check_pte_clear_range(), the condition to determine whether to iterate over PTEs only checked pmd_bad() and pmd_leaf(). This relies on the implicit assumption that pmd_none() is always a subset of pmd_bad() on all architectures supporting PAGE_TABLE_CHECK. While this assumption currently holds for x86_64, arm64, s390, riscv, and powerpc, it is an architecture-dependent behavior that may not hold for future architectures. Add an explicit pmd_none() check to make the intent clear and avoid calling pte_offset_map() on an empty PMD, which could lead to undefined behavior. Signed-off-by: Ye Liu <liuye@kylinos.cn> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "mm/page_table_check: add explicit pmd_none check in pte_clear_range" |
|
Patch 1: "mm/page_table_check: add explicit pmd_none check in pte_clear_range" |
|
Patch 1: "mm/page_table_check: add explicit pmd_none check in pte_clear_range" |
|
Patch 1: "mm/page_table_check: add explicit pmd_none check in pte_clear_range" |
|
Patch 1: "mm/page_table_check: add explicit pmd_none check in pte_clear_range" |
|
Patch 1: "mm/page_table_check: add explicit pmd_none check in pte_clear_range" |
|
Patch 1: "mm/page_table_check: add explicit pmd_none check in pte_clear_range" |
|
Patch 1: "mm/page_table_check: add explicit pmd_none check in pte_clear_range" |
|
Patch 1: "mm/page_table_check: add explicit pmd_none check in pte_clear_range" |
|
Patch 1: "mm/page_table_check: add explicit pmd_none check in pte_clear_range" |
|
Patch 1: "mm/page_table_check: add explicit pmd_none check in pte_clear_range" |
|
Patch 1: "mm/page_table_check: add explicit pmd_none check in pte_clear_range" |
abf8962 to
9fa746d
Compare
PR for series 1140771 applied to workflow__riscv__fixes
Name: mm/page_table_check: add explicit pmd_none check in pte_clear_range
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1140771
Version: 1