Skip to content

Commit 23a60a0

Browse files
committed
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 fixes from Catalin Marinas: - Fix a build error with CONFIG_CFI_CLANG + CONFIG_FTRACE when CONFIG_FUNCTION_GRAPH_TRACER is not enabled. - Fix a BUG_ON triggered by the page table checker due to incorrect file_map_count for non-leaf pmd/pud (the arm64 pmd_user_accessible_page() not checking whether it's a leaf entry). * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64/mm: fix incorrect file_map_count for non-leaf pmd/pud arm64: ftrace: Define ftrace_stub_graph only with FUNCTION_GRAPH_TRACER
2 parents f4408c3 + 5b47348 commit 23a60a0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

arch/arm64/include/asm/pgtable.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -863,12 +863,12 @@ static inline bool pte_user_accessible_page(pte_t pte)
863863

864864
static inline bool pmd_user_accessible_page(pmd_t pmd)
865865
{
866-
return pmd_present(pmd) && (pmd_user(pmd) || pmd_user_exec(pmd));
866+
return pmd_leaf(pmd) && (pmd_user(pmd) || pmd_user_exec(pmd));
867867
}
868868

869869
static inline bool pud_user_accessible_page(pud_t pud)
870870
{
871-
return pud_present(pud) && pud_user(pud);
871+
return pud_leaf(pud) && pud_user(pud);
872872
}
873873
#endif
874874

arch/arm64/kernel/entry-ftrace.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,11 +299,11 @@ SYM_TYPED_FUNC_START(ftrace_stub)
299299
ret
300300
SYM_FUNC_END(ftrace_stub)
301301

302+
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
302303
SYM_TYPED_FUNC_START(ftrace_stub_graph)
303304
ret
304305
SYM_FUNC_END(ftrace_stub_graph)
305306

306-
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
307307
/*
308308
* void return_to_handler(void)
309309
*

0 commit comments

Comments
 (0)