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.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -173,6 +173,7 @@ struct kretprobe_instance { · 172 unmodified lines | ||
| 173 | 173 | struct kretprobe *rp; |
| 174 | 174 | kprobe_opcode_t *ret_addr; |
| 175 | 175 | struct task_struct *task; |
| 176 | + void *fp; | |
| 176 | 177 | char data[0]; |
| 177 | 178 | }; |
| 178 | 179 | |