Skip to content

Commit e620931

Browse files
chleroympe
authored andcommitted
powerpc/32s: Blacklist functions running with MMU disabled for kprobe
kprobe does not handle events happening in real mode, all functions running with MMU disabled have to be blacklisted. Signed-off-by: Christophe Leroy <[email protected]> Acked-by: Naveen N. Rao <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/dabed523c1b8955dd425152ce260b390053e727a.1585670437.git.christophe.leroy@c-s.fr
1 parent f892c21 commit e620931

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

arch/powerpc/mm/book3s32/hash_low.S

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ _GLOBAL(hash_page)
163163
stw r0, (mmu_hash_lock - PAGE_OFFSET)@l(r8)
164164
blr
165165
#endif /* CONFIG_SMP */
166+
_ASM_NOKPROBE_SYMBOL(hash_page)
166167

167168
/*
168169
* Add an entry for a particular page to the hash table.
@@ -267,6 +268,7 @@ _GLOBAL(add_hash_page)
267268
lwz r0,4(r1)
268269
mtlr r0
269270
blr
271+
_ASM_NOKPROBE_SYMBOL(add_hash_page)
270272

271273
/*
272274
* This routine adds a hardware PTE to the hash table.
@@ -474,6 +476,7 @@ END_FTR_SECTION_IFCLR(CPU_FTR_NEED_COHERENT)
474476

475477
sync /* make sure pte updates get to memory */
476478
blr
479+
_ASM_NOKPROBE_SYMBOL(create_hpte)
477480

478481
.section .bss
479482
.align 2
@@ -630,6 +633,7 @@ _GLOBAL(flush_hash_pages)
630633
isync
631634
blr
632635
EXPORT_SYMBOL(flush_hash_pages)
636+
_ASM_NOKPROBE_SYMBOL(flush_hash_pages)
633637

634638
/*
635639
* Flush an entry from the TLB
@@ -667,6 +671,7 @@ _GLOBAL(_tlbie)
667671
sync
668672
#endif /* CONFIG_SMP */
669673
blr
674+
_ASM_NOKPROBE_SYMBOL(_tlbie)
670675

671676
/*
672677
* Flush the entire TLB. 603/603e only
@@ -708,3 +713,4 @@ _GLOBAL(_tlbia)
708713
isync
709714
#endif /* CONFIG_SMP */
710715
blr
716+
_ASM_NOKPROBE_SYMBOL(_tlbia)

0 commit comments

Comments
 (0)