diff options
| author | Masami Hiramatsu (Google) <mhiramat@kernel.org> | 2026-11-11 23:13:59 +0900 |
|---|---|---|
| committer | Masami Hiramatsu (Google) <mhiramat@kernel.org> | 2026-11-13 17:33:04 +0900 |
| commit | c55722233c041865d1477a58adbc52540bfad017 (patch) | |
| tree | d49679dd50234e5961f7833c2bacf007ee7671ea /rust/kernel/alloc/kvec/errors.rs | |
| parent | 081f8fba975a2f2361d74e5e34dbc1837599394a (diff) | |
kprobes: Re-optimize blocked sibling probe when cooling finishes
When an optimized kprobe is disabled (for example, to arm a new kprobe
in its jump-optimized instruction range), its jump is replaced with a
breakpoint (or disarmed) and the probe is placed on the cooling list
until the Tasks RCU grace period completes. While the disabled probe is
still on the cooling list, any sibling probe whose jump range covers
this probe's address cannot be optimized because can_optimize() sees the
not-yet-disarmed probe via get_kprobe().
In optprobe_finalize_generation(), when a disabled probe on cooling_list
finishes cooling and transitions to safely disarmed (list_del_init()),
check whether an optimized sibling probe covers op->kp.addr via
get_optimized_kprobe() and re-queue it for optimization, matching the
freeing_list path in do_free_cleaned_kprobes().
Link: https://lore.kernel.org/all/179440643954.328088.8524265330405527243.stgit@devnote2/
Fixes: 06e0d3b89da1 ("kprobes: Make optprobe optimizer multi-generational and asynchronous")
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Diffstat (limited to 'rust/kernel/alloc/kvec/errors.rs')
0 files changed, 0 insertions, 0 deletions
