diff options
author | Will Deacon <will.deacon@arm.com> | 2019-02-26 16:37:09 +0100 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2019-04-09 12:21:13 +0200 |
commit | fb610f2a2006322bebeb30408fefce6a01df09ea (patch) | |
tree | f9e6531415ddea6b10f2cb1c665291a5fabc70db /arch/arm64/kernel/kgdb.c | |
parent | arm64: kprobes: Avoid calling kprobes debug handlers explicitly (diff) | |
download | linux-fb610f2a2006322bebeb30408fefce6a01df09ea.tar.xz linux-fb610f2a2006322bebeb30408fefce6a01df09ea.zip |
arm64: debug: Remove redundant user_mode(regs) checks from debug handlers
Now that the debug hook dispatching code takes the triggering exception
level into account, there's no need for the hooks themselves to poke
around with user_mode(regs).
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/kernel/kgdb.c')
-rw-r--r-- | arch/arm64/kernel/kgdb.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/arch/arm64/kernel/kgdb.c b/arch/arm64/kernel/kgdb.c index 4c01f299aeb2..30853d5b7859 100644 --- a/arch/arm64/kernel/kgdb.c +++ b/arch/arm64/kernel/kgdb.c @@ -244,9 +244,6 @@ int kgdb_arch_handle_exception(int exception_vector, int signo, static int kgdb_brk_fn(struct pt_regs *regs, unsigned int esr) { - if (user_mode(regs)) - return DBG_HOOK_ERROR; - kgdb_handle_exception(1, SIGTRAP, 0, regs); return DBG_HOOK_HANDLED; } @@ -254,9 +251,6 @@ NOKPROBE_SYMBOL(kgdb_brk_fn) static int kgdb_compiled_brk_fn(struct pt_regs *regs, unsigned int esr) { - if (user_mode(regs)) - return DBG_HOOK_ERROR; - compiled_break = 1; kgdb_handle_exception(1, SIGTRAP, 0, regs); @@ -266,7 +260,7 @@ NOKPROBE_SYMBOL(kgdb_compiled_brk_fn); static int kgdb_step_brk_fn(struct pt_regs *regs, unsigned int esr) { - if (user_mode(regs) || !kgdb_single_step) + if (!kgdb_single_step) return DBG_HOOK_ERROR; kgdb_handle_exception(1, SIGTRAP, 0, regs); |