Re: [PATCH 2/4] x86/kprobes: Fix frame pointer annotations
From: Peter Zijlstra
Date: Fri May 10 2019 - 08:19:17 EST
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.