summaryrefslogtreecommitdiff
path: root/arch/arm64/kernel/probes
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2019-02-26 15:52:47 +0300
committerWill Deacon <will.deacon@arm.com>2019-04-09 13:21:13 +0300
commit26a04d84bc5311d7785b229b353f327e866ab61a (patch)
tree44725268289823df76ada1f5cdc0959284cbccc8 /arch/arm64/kernel/probes
parentcb764a69fa41179fb222b53b1a33a9d7373f9249 (diff)
downloadlinux-26a04d84bc5311d7785b229b353f327e866ab61a.tar.xz
arm64: debug: Separate debug hooks based on target exception level
Mixing kernel and user debug hooks together is highly error-prone as it relies on all of the hooks to figure out whether the exception came from kernel or user, and then to act accordingly. Make our debug hook code a little more robust by maintaining separate hook lists for user and kernel, with separate registration functions to force callers to be explicit about the exception levels that they care about. Reviewed-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/kernel/probes')
-rw-r--r--arch/arm64/kernel/probes/uprobes.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/arm64/kernel/probes/uprobes.c b/arch/arm64/kernel/probes/uprobes.c
index 636ca0119c0e..7d6ea88796a6 100644
--- a/arch/arm64/kernel/probes/uprobes.c
+++ b/arch/arm64/kernel/probes/uprobes.c
@@ -195,8 +195,7 @@ static int uprobe_single_step_handler(struct pt_regs *regs,
/* uprobe breakpoint handler hook */
static struct break_hook uprobes_break_hook = {
- .esr_mask = BRK64_ESR_MASK,
- .esr_val = BRK64_ESR_UPROBES,
+ .imm = BRK64_ESR_UPROBES,
.fn = uprobe_breakpoint_handler,
};
@@ -207,8 +206,8 @@ static struct step_hook uprobes_step_hook = {
static int __init arch_init_uprobes(void)
{
- register_break_hook(&uprobes_break_hook);
- register_step_hook(&uprobes_step_hook);
+ register_user_break_hook(&uprobes_break_hook);
+ register_user_step_hook(&uprobes_step_hook);
return 0;
}