From: Christophe Leroy <christophe.leroy@c-s.fr>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>,
naveen.n.rao@linux.vnet.ibm.com
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: [PATCH 04/12] powerpc/powermac: Blacklist functions running with MMU disabled for kprobe
Date: Sun, 29 Mar 2020 09:41:04 +0000 (UTC) [thread overview]
Message-ID: <29793874e2963d6fe072d2bbd184151a2798c36d.1585474724.git.christophe.leroy@c-s.fr> (raw)
In-Reply-To: <dff05b59a161434a546010507000816750073f28.1585474724.git.christophe.leroy@c-s.fr>
kprobe does not handle events happening in real mode, all
functions running with MMU disabled have to be blacklisted.
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
arch/powerpc/platforms/powermac/cache.S | 2 ++
arch/powerpc/platforms/powermac/sleep.S | 5 ++++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/powermac/cache.S b/arch/powerpc/platforms/powermac/cache.S
index da69e0fcb4f1..ced225415486 100644
--- a/arch/powerpc/platforms/powermac/cache.S
+++ b/arch/powerpc/platforms/powermac/cache.S
@@ -184,6 +184,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
mtlr r10
blr
+_ASM_NOKPROBE_SYMBOL(flush_disable_75x)
/* This code is for 745x processors */
flush_disable_745x:
@@ -351,4 +352,5 @@ END_FTR_SECTION_IFSET(CPU_FTR_L3CR)
mtmsr r11 /* restore DR and EE */
isync
blr
+_ASM_NOKPROBE_SYMBOL(flush_disable_745x)
#endif /* CONFIG_PPC_BOOK3S_32 */
diff --git a/arch/powerpc/platforms/powermac/sleep.S b/arch/powerpc/platforms/powermac/sleep.S
index bd6085b470b7..f9a680fdd9c4 100644
--- a/arch/powerpc/platforms/powermac/sleep.S
+++ b/arch/powerpc/platforms/powermac/sleep.S
@@ -244,7 +244,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_SPEC7450)
mtmsr r2
isync
b 1b
-
+_ASM_NOKPROBE_SYMBOL(low_cpu_die)
/*
* Here is the resume code.
*/
@@ -282,6 +282,7 @@ _GLOBAL(core99_wake_up)
lwz r1,0(r3)
/* Pass thru to older resume code ... */
+_ASM_NOKPROBE_SYMBOL(core99_wake_up)
/*
* Here is the resume code for older machines.
* r1 has the physical address of SL_PC(sp).
@@ -429,6 +430,7 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_USE_HIGH_BATS)
lwz r0,4(r1)
mtlr r0
blr
+_ASM_NOKPROBE_SYMBOL(grackle_wake_up)
turn_on_mmu:
mflr r4
@@ -438,6 +440,7 @@ turn_on_mmu:
sync
isync
rfi
+_ASM_NOKPROBE_SYMBOL(turn_on_mmu)
#endif /* defined(CONFIG_PM) || defined(CONFIG_CPU_FREQ) */
--
2.25.0
next prev parent reply other threads:[~2020-03-29 9:50 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-29 9:41 [PATCH 01/12] powerpc/52xx: Blacklist functions running with MMU disabled for kprobe Christophe Leroy
2020-03-29 9:41 ` [PATCH 02/12] powerpc/82xx: Blacklist pq2_restart() " Christophe Leroy
2020-03-29 9:41 ` [PATCH 03/12] powerpc/83xx: Blacklist mpc83xx_deep_resume() " Christophe Leroy
2020-03-29 9:41 ` Christophe Leroy [this message]
2020-03-29 9:41 ` [PATCH 05/12] powerpc/mem: Blacklist flush_dcache_icache_phys() " Christophe Leroy
2020-03-29 9:41 ` [PATCH 06/12] powerpc/32s: Make local symbols non visible in hash_low Christophe Leroy
2020-03-30 17:06 ` Naveen N. Rao
2020-03-30 17:22 ` Christophe Leroy
2020-03-30 17:49 ` Naveen N. Rao
2020-03-29 9:41 ` [PATCH 07/12] powerpc/32s: Blacklist functions running with MMU disabled for kprobe Christophe Leroy
2020-03-29 9:41 ` [PATCH 08/12] powerpc/rtas: Remove machine_check_in_rtas() Christophe Leroy
2020-03-29 9:41 ` [PATCH 09/12] powerpc/32: Blacklist functions running with MMU disabled for kprobe Christophe Leroy
2020-03-29 9:41 ` [PATCH 10/12] powerpc/entry32: Blacklist exception entry points " Christophe Leroy
2020-03-30 17:08 ` Naveen N. Rao
2020-03-30 18:33 ` Christophe Leroy
2020-03-31 5:51 ` Christophe Leroy
2020-03-31 6:17 ` Naveen N. Rao
2020-03-31 6:28 ` Christophe Leroy
2020-03-31 6:44 ` Naveen N. Rao
2020-03-31 6:13 ` Naveen N. Rao
2020-03-29 9:41 ` [PATCH 11/12] powerpc/entry32: Blacklist syscall exit " Christophe Leroy
2020-03-29 9:41 ` [PATCH 12/12] powerpc/entry32: Blacklist exception " Christophe Leroy
2020-03-30 17:13 ` [PATCH 01/12] powerpc/52xx: Blacklist functions running with MMU disabled " Naveen N. Rao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=29793874e2963d6fe072d2bbd184151a2798c36d.1585474724.git.christophe.leroy@c-s.fr \
--to=christophe.leroy@c-s.fr \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=naveen.n.rao@linux.vnet.ibm.com \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).