arm64: debug: Separate debug hooks based on target exception level
authorWill Deacon <will.deacon@arm.com>
Tue, 26 Feb 2019 12:52:47 +0000 (12:52 +0000)
committerWill Deacon <will.deacon@arm.com>
Tue, 9 Apr 2019 10:21:13 +0000 (11:21 +0100)
commit26a04d84bc5311d7785b229b353f327e866ab61a
tree44725268289823df76ada1f5cdc0959284cbccc8
parentcb764a69fa41179fb222b53b1a33a9d7373f9249
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>
arch/arm64/include/asm/brk-imm.h
arch/arm64/include/asm/debug-monitors.h
arch/arm64/kernel/debug-monitors.c
arch/arm64/kernel/kgdb.c
arch/arm64/kernel/probes/uprobes.c
arch/arm64/kernel/traps.c