Skip to content

Support ftrace direct callers with livepatch #485

Open

Description

@rnav

Shung-Hsi Yu reports that BPF fentry progs are no longer invoked if a function is livepatched:
http://lkml.kernel.org/r/rwmwrvvtg3pd7qrnt3of6dideioohwhsplancoc2gdrjran7bg@j5tqng6loymr

Today, we detect livepatch and jump to that before checking if there is a ftrace direct caller. We instead need to prioritize a ftrace direct caller before livepatch. State needs to be setup so that the ftrace direct caller then "returns" to the livepatch-loaded function. For BPF trampolines, this also means that we need to have the trampolines take the function address to call into for F_CALL_ORIG.

Activity

  1. self-assigned this
    on Aug 13, 2025
  2. hbathini commented on Oct 2, 2025

    @hbathini
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions