On Fri, May 10, 2019 at 12:21:03PM +0900, Masami Hiramatsu wrote:
Yes, optprobe also has to save and restore the flags. Above trampline is for kretprobe, which is placed at the function return, so we don't have to care about flags.
Sure, optprobe is actually special here, because it branches out at 'random' places and does indeed need to preserve flags.
But both ftrace and retprobes are at C function call boundaries. Preserving flags doesn't make sense.