History

x86/kprobes: Verify stack frame on kretprobe

Verify the stack frame pointer on kretprobe trampoline handler, If the stack frame pointer does not match, it skips the wrong entry and tries to find correct one. This can happen if user puts the kretprobe on the function which can be used in the path of ftrace user-function call. Such functions should not be probed, so this adds a warning message that reports which function should be blacklisted.

Masami Hiramatsu committed 7 years ago

Commit 3ff9c071 parent 3fe33312 files · +27 −0Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/kprobes.h+1−0
@@ -173,6 +173,7 @@ struct kretprobe_instance { · 172 unmodified lines
173 struct kretprobe *rp;173 struct kretprobe *rp;
174 kprobe_opcode_t *ret_addr;174 kprobe_opcode_t *ret_addr;
175 struct task_struct *task;175 struct task_struct *task;
176 void *fp;
176 char data[0];177 char data[0];
177};178};
178 179

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t