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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 10 Apr 2018 14:02:42 +0300
From:   Cyrill Gorcunov <gorcunov@...il.com>
To:     Michal Hocko <mhocko@...nel.org>
Cc:     Yang Shi <yang.shi@...ux.alibaba.com>, adobriyan@...il.com,
        willy@...radead.org, mguzik@...hat.com, akpm@...ux-foundation.org,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [v3 PATCH] mm: introduce arg_lock to protect arg_start|end and
 env_start|end in mm_struct

On Tue, Apr 10, 2018 at 12:42:15PM +0200, Michal Hocko wrote:
> On Tue 10-04-18 12:40:47, Cyrill Gorcunov wrote:
> > On Tue, Apr 10, 2018 at 11:09:17AM +0200, Michal Hocko wrote:
> > > On Tue 10-04-18 05:52:54, Yang Shi wrote:
> > > [...]
> > > > So, introduce a new spinlock in mm_struct to protect the concurrent
> > > > access to arg_start|end, env_start|end and others except start_brk and
> > > > brk, which are still protected by mmap_sem to avoid concurrent access
> > > > from do_brk().
> > > 
> > > Is there any fundamental problem with brk using the same lock?
> > 
> > Seems so. Look into mm/mmap.c:brk syscall which reads and writes
> > brk value under mmap_sem ('cause of do_brk called inside).
> 
> Why cannot we simply use the lock when the value is updated?

Because do_brk does vma manipulations, for this reason it's
running under down_write_killable(&mm->mmap_sem). Or you
mean something else?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ