Re: [PATCH 0/3] kprobes: Fix optprobe state after forced unoptimization

From
Masami Hiramatsu (Google) <mhiramat@kernel.org>
Date
2026-11-05 01:03:48
Also in
lkml
Reply to
Mani Tofigh via B4 Relay, 2026-11-03
On Tue, 03 Nov 2026 13:45:58 -0500, Mani Tofigh [off-list ref] wrote:
Since commit 06e0d3b89da1 ("kprobes: Make optprobe optimizer
multi-generational and asynchronous") a forced unoptimization can leave
a probe's int3 in the wrong state.  A disabled probe can be freed with
its int3 still in the text, an unhashed probe gets disarmed twice and a
reused probe never gets armed.

Patch 2 relies on patch 1 since it assumes every disabled probe on a
cooling list is already disarmed.
Thanks for the fix! Can you update the series according to the comment?
I'm also working on fixing the same commit, so I would like to rebase
mine on your series.

Thanks!
---
Mani Tofigh (3):
      kprobes: Disarm disabled optprobe on forced unoptimization
      kprobes: Do not disarm unhashed optprobe on dispatch
      kprobes: Arm reused optprobe on cooling list

 kernel/kprobes.c | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)
---
base-commit: d4d028a7ae6401ce70825a3eb663f0a2dfc49db6
change-id: 20261103-kprobes-optprobe-state-90dbf55b246c

Best regards,
--  
Mani Tofigh [off-list ref]
-- 
Masami Hiramatsu (Google) [off-list ref]
Thread (8 messages) 8 messages, 3 authors, last reply 11d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help