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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190218104725.GA160999@google.com>
Date:   Mon, 18 Feb 2019 19:47:25 +0900
From:   Minchan Kim <minchan@...nel.org>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     LKML <linux-kernel@...r.kernel.org>, Todd Kjos <tkjos@...gle.com>,
        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 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>
> > ---
> >  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