Debugging Linux Kernel using ftrace Part17 - Finding out how user space code gets into kernel
We can find out what is the first kernel function called when the user space code gets into the kernel using 'max_graph_depth' file. This file can only be used with the function tracer.
max_graph_depth file contains the maximum depth it will trace into a function. Default value is 0, which means unlimited.
If you 'echo 1 > max_graph_depth', it will only the trace the first function and ignore the other functions.
You can see, 'do_syscall_64()' is the function through which the user space code gets into the kernel space.
If we want to find out the next function after 'do_syscall_64()', 'echo 2 > max_graph_depth'
max_graph_depth file contains the maximum depth it will trace into a function. Default value is 0, which means unlimited.
If you 'echo 1 > max_graph_depth', it will only the trace the first function and ignore the other functions.
You can see, 'do_syscall_64()' is the function through which the user space code gets into the kernel space.
If we want to find out the next function after 'do_syscall_64()', 'echo 2 > max_graph_depth'
Comments
Post a Comment