On Mon, May 11, 2026 at 7:45 AM Oleg Nesterov [off-list ref] wrote:
On 05/08, Andrii Nakryiko wrote:
quoted
+static bool resolve_uprobe_addr(unsigned long ip, unsigned long *probe_addr)
{
- struct vm_area_struct *vma = vma_lookup(current->mm, ip);
+ struct uprobes_state *state = ¤t->mm->uprobes_state;
it seems that there is a problem, with or without this change...
Lets forget about this patch for the moment, I am still trying to understand it.
What if register_for_each_vma() calls install_breakpoint(vma) and
vma->mm != current->mm ?
In this case install_breakpoint() path will call __is_optimized() and then
__in_uprobe_trampoline() which does vma_lookup(current->mm). This looks
obviously wrong ?
And unless I am totally confused, this patch "inherits" the problem...
No?
Yes, sashiko called this out as well. I'm going to pass mm explicitly
into is_optimized and all the way to resolve_uprobe_addr(), easy fix.
But we should have a stand-alone easily backportable fix for this even
without my changes, yes. I can add it as pre-patch or send separately.
Oleg.