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: <CAHRSSEy7bHsVr9CSbybRU0SvL2EHoWbF0wyZi72FJPXyPMDj+Q@mail.gmail.com>
Date:   Tue, 19 Feb 2019 08:54:59 -0800
From:   Todd Kjos <tkjos@...gle.com>
To:     Minchan Kim <minchan@...nel.org>
Cc:     Greg KH <gregkh@...uxfoundation.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Martijn Coenen <maco@...roid.com>,
        Arve Hjønnevåg <arve@...roid.com>
Subject: Re: [PATCH] binder: reduce mmap_sem write-side lock

On Mon, Feb 18, 2019 at 2:47 AM Minchan Kim <minchan@...nel.org> wrote:
>
> On Mon, Feb 18, 2019 at 09:32:08AM +0100, Greg KH wrote:
> > On Mon, Feb 18, 2019 at 05:11:45PM +0900, Minchan Kim wrote:
> > > binder has used write-side mmap_sem semaphore to release memory
> > > mapped at address space of the process. However, right lock to
> > > release pages is down_read, not down_write because page table lock
> > > already protects the race for parallel freeing.
> > >
> > > Please do not use mmap_sem write-side lock which is well known
> > > contented lock.
> > >
> > > Cc: Todd Kjos <tkjos@...gle.com>
> > > Cc: Martijn Coenen <maco@...roid.com>
> > > Cc: Arve Hjønnevåg <arve@...roid.com>
> > > Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> > > Signed-off-by: Minchan Kim <minchan@...nel.org>

Acked-by: Todd Kjos <tkjos@...gle.com>

> > > ---
> > >  drivers/android/binder_alloc.c | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > Is this just needed for the recent binder changes that are in
> > linux-next, or for older kernels as well?
>
> It has been there for several years but no need to fix older kernels
> because down_write of mmap_sem is technically not a bug to stop the
> working of binder. Rather than, it's just abuse of the lock so
> it's okay to fix only recent kernel.
>
> Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ