Skip to content

Commit 730a11f

Browse files
Liu Shixinwilldeacon
authored andcommitted
arm64/mm: add pud_user_exec() check in pud_user_accessible_page()
Add check for the executable case in pud_user_accessible_page() too like what we did for pte and pmd. Fixes: 42b2547 ("arm64/mm: enable ARCH_SUPPORTS_PAGE_TABLE_CHECK") Suggested-by: Will Deacon <[email protected]> Signed-off-by: Liu Shixin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 74c2f81 commit 730a11f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/arm64/include/asm/pgtable.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ static inline unsigned long pmd_page_vaddr(pmd_t pmd)
681681
#define pud_leaf(pud) (pud_present(pud) && !pud_table(pud))
682682
#define pud_valid(pud) pte_valid(pud_pte(pud))
683683
#define pud_user(pud) pte_user(pud_pte(pud))
684-
684+
#define pud_user_exec(pud) pte_user_exec(pud_pte(pud))
685685

686686
static inline void set_pud(pud_t *pudp, pud_t pud)
687687
{
@@ -867,7 +867,7 @@ static inline bool pmd_user_accessible_page(pmd_t pmd)
867867

868868
static inline bool pud_user_accessible_page(pud_t pud)
869869
{
870-
return pud_leaf(pud) && pud_user(pud);
870+
return pud_leaf(pud) && (pud_user(pud) || pud_user_exec(pud));
871871
}
872872
#endif
873873

0 commit comments

Comments
 (0)