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>] [day] [month] [year] [list]
Message-ID: <20160610193652.GA14622@redhat.com>
Date:	Fri, 10 Jun 2016 21:36:52 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Andrea Parri <parri.andrea@...il.com>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] events/uprobes: move smp_read_barrier_depends() where
 needed

On 06/10, Andrea Parri wrote:
>
> On Fri, Jun 10, 2016 at 4:39 PM, Oleg Nesterov <oleg@...hat.com> wrote:
>
> > On 06/10, Oleg Nesterov wrote:
> > >
> > > On 06/10, Andrea Parri wrote:
> > > >
> > > > More simply/clean, as you said, maybe; one advantage of keeping
> > > > the "raw" smp_read_barrier_depends() in get_trampoline_vaddr() is
> > > > that we can avoid it when area is NULL;
> > >
> > > Do you really think it makes sense to optimize out read_barrier_depends
> > here?
> > >
> > > It can only be NULL in handle_swbp(), and in this case we are going to
> > do a
> > > lot of work, and in particular install this xol vma,
> >
> > Not to mention that alpha doesn't support uprobes, so this all is currently
> > cosmetic.
> >
>
> Do you mean a "cosmetic" improvement over the current version?  ;-)

Yes, if you mean "turn smp_read_barrier_depends into lockless_dereference" ;)
So I will be happy to ack this patch if you make it.

But "optimize out smp_read_barrier_depends if NULL" imho makes no sense.

And, speaking of get_trampoline_vaddr() in particular, it is a bit ugly anyway.
prepare_uretprobe() can not hit area == NULL and doesn't need a barrier, while
handle_swbp() actually wants is_trampoline(bp_vaddr). Not that I really think
this needs a cleanup, at least until we change this code to use multiple
trampolines (say, for different stacks).

Oleg.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ