]> asedeno.scripts.mit.edu Git - linux.git/commit
arm64: kprobes: Avoid calling kprobes debug handlers explicitly
authorWill Deacon <will.deacon@arm.com>
Tue, 26 Feb 2019 14:35:00 +0000 (14:35 +0000)
committerWill Deacon <will.deacon@arm.com>
Tue, 9 Apr 2019 10:21:13 +0000 (11:21 +0100)
commita22d570aee77ae626e4d3532478ae8058a24bdb3
tree0e56e10e67dab8e3cc56fa4add1aa28c2c146e65
parent26a04d84bc5311d7785b229b353f327e866ab61a
arm64: kprobes: Avoid calling kprobes debug handlers explicitly

Kprobes bypasses our debug hook registration code so that it doesn't
get tangled up with recursive debug exceptions from things like lockdep:

  http://lists.infradead.org/pipermail/linux-arm-kernel/2015-February/324385.html

However, since then, (a) the hook list has become RCU protected and (b)
the kprobes hooks were found not to filter out exceptions from userspace
correctly. On top of that, the step handler is invoked directly from
single_step_handler(), which *does* use the debug hook list, so it's
clearly not the end of the world.

For now, have kprobes use the debug hook registration API like everybody
else. We can revisit this in the future if this is found to limit
coverage significantly.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/kprobes.h
arch/arm64/kernel/debug-monitors.c
arch/arm64/kernel/probes/kprobes.c