lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAEf4BzZjjA=PMOES-RyQ9Xyi_UEKGa7_qFunwi4w7uY3qDLiww@mail.gmail.com>
Date: Tue, 17 Sep 2024 10:19:45 +0200
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Andrii Nakryiko <andrii@...nel.org>, linux-trace-kernel@...r.kernel.org, 
	peterz@...radead.org, rostedt@...dmis.org, mhiramat@...nel.org, 
	bpf@...r.kernel.org, linux-kernel@...r.kernel.org, jolsa@...nel.org, 
	paulmck@...nel.org, willy@...radead.org, surenb@...gle.com, 
	akpm@...ux-foundation.org, linux-mm@...ck.org, mjguzik@...il.com, 
	brauner@...nel.org, jannh@...gle.com
Subject: Re: [PATCH 2/2] uprobes: add speculative lockless VMA-to-inode-to-uprobe
 resolution

On Sun, Sep 15, 2024 at 5:04 PM Oleg Nesterov <oleg@...hat.com> wrote:
>
> On 09/05, Andrii Nakryiko wrote:
> >
> > +static struct uprobe *find_active_uprobe_speculative(unsigned long bp_vaddr)
> > +{
> > +     const vm_flags_t flags = VM_HUGETLB | VM_MAYEXEC | VM_MAYSHARE;
> ...
> > +     if (!vm_file || (vma->vm_flags & flags) != VM_MAYEXEC)
> > +             goto bail;
>
> Not that this can really simplify your patch, feel free to ignore, but I don't
> think you need to check vma->vm_flags.
>
> Yes, find_active_uprobe_rcu() does the same valid_vma(vma, false) check, but it
> too can/should be removed, afaics.

yep, agreed, I'll see to simplify both, you points make total sense


>
> valid_vma(vma, false) makes sense in, say, unapply_uprobe() to quickly filter
> out vma's which can't have this bp installed, but not in the handle_swbp() paths.
>
> Oleg.
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ