Let's say I connect to the sys_ * (e.g. sys_open) handler; when I find that the argument passed from user space is malicious, I print a stack trace in user space. How should I do it?
(dump_stack () only prints the kernel stack)
oprofilehas support for stack trace of user space, and they are calculated in the kernel by moving stacks of user space. (But note: it does not allow characters that are executed by reporting tools in user space.)
oprofile
, () oprofile / , .
, "" oprofile , .
(, SIGBUS, SIGKABRT), , .
:
do_send_sig_info(SIGABRT, SEND_SIG_FORCED, current, true);
gdb, .
.