Thread (28 messages) 28 messages, 10 authors, 3d ago

Re: [PATCH bpf-next 4/9] uprobes/x86: Don't WARN if an optimized probe can't be written

flat view

From: Jann Horn <jannh@google.com>
Date: 2026-10-22 17:56:59
Also in: bpf, linux-mm, linux-perf-users, lkml

On Thu, Oct 22, 2026 at 3:57 AM Alexei Starovoitov
[off-list ref] wrote:
quoted hunk ↗ jump to hunk
@@ -1197,7 +1194,7 @@ static int __arch_uprobe_optimize(struct arch_uprobe *auprobe, struct mm_struct
        if (IS_ERR(tramp))
                return PTR_ERR(tramp);
        ret = swbp_optimize(auprobe, vma, vaddr, tramp->vm_start);
-       if (WARN_ON_ONCE(ret) && new_mapping)
+       if (ret && new_mapping)
                WARN_ON_ONCE(do_munmap(mm, tramp->vm_start, PAGE_SIZE, NULL));
Not an issue with your patch, just FYI regarding this preexisting
WARN_ON_ONCE():
A failing small GFP_KERNEL allocation could theoretically cause
do_munmap() to fail; the VMA tree has the ugly quirk that you can't
reliably _remove_ elements without memory allocation.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help