summaryrefslogtreecommitdiff
path: root/certs
diff options
context:
space:
mode:
authorDaniel Thompson <daniel.thompson@linaro.org>2020-09-27 22:15:30 +0100
committerDaniel Thompson <daniel.thompson@linaro.org>2020-10-01 14:23:21 +0100
commit4c4197eda710d197c7474abcceb3f8789ec22a64 (patch)
tree99ba58ab76ee1bac1dfeff6cb530103fdd7808e0 /certs
parentf2d10ff4a903813df767a4b56b651a26b938df06 (diff)
kgdb: Add NOKPROBE labels on the trap handler functions
Currently kgdb honours the kprobe blocklist but doesn't place its own trap handling code on the list. Add labels to discourage attempting to use kgdb to debug itself. Not every functions that executes from the trap handler needs to be marked up: relatively early in the trap handler execution (just after we bring the other CPUs to a halt) all breakpoints are replaced with the original opcodes. This patch marks up code in the debug_core that executes between trap entry and the breakpoints being deactivated and, also, code that executes between breakpoint activation and trap exit. To be clear these changes are not sufficient to make recursive trapping impossible since they do not include library calls made during kgdb's entry/exit logic. However going much further whilst we are sharing the kprobe blocklist risks reducing the capabilities of kprobe and this would be a bad trade off (especially so given kgdb's users are currently conditioned to avoid recursive traps). Reviewed-by: Douglas Anderson <dianders@chromium.org> Link: https://lore.kernel.org/r/20200927211531.1380577-3-daniel.thompson@linaro.org Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Diffstat (limited to 'certs')
0 files changed, 0 insertions, 0 deletions