Hi,
I am not very familiar with the internals of ftrace, hence this question.
Suppose klp_ftrace_handler() is running on one CPU and, at the same
time, klp_disable_func() calls unregister_ftrace_function() and then
ftrace_set_filter_ip() on another CPU.
Is it guaranteed then, that by the time ftrace_set_filter_ip() returns,
klp_ftrace_handler() is no longer running?
klp_disable_func() is written with this assumption in mind as it kfrees
struct klp_ops instance that klp_ftrace_handler() might be using.
Nothing crashed in my experiments with that code so far, it is just not
obvious to me if the above guarantee exists.
Regards,
Evgenii
--
To unsubscribe from this list: send the line "unsubscribe live-patching" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html