On Wed, 7 Jan 2026 14:16:05 +0000
Will Deacon [off-list ref] wrote:
I still don't understand why we need anything new in the arch code for this.
We've selected HAVE_ARCH_FTRACE_REGS and we implement
ftrace_regs_set_instruction_pointer() and ftrace_regs_set_return_value()
so the core code already has everything it needs to make this work
without additional arch support.
I believe the issue is that the BPF code takes a pt_regs and does the
update directly with that, and not the ftrace_regs.
I'm guessing this is due to BPF programs modifying the pt_regs directly,
and BPF programs do not yet understand ftrace_regs?
Because arm64 requires making a copy of pt_regs as the ftrace_regs has a
different layout, and the ftrace_regs is what does the changes, if the
pt_regs passed to the BPF program modifies the values it needs a way to
propagate that back to the ftrace_regs.
-- Steve