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]
Date:   Tue, 2 Jul 2019 11:36:08 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     syzbot <syzbot+8cc1843d4eec9c0dfb35@...kaller.appspotmail.com>,
        aarcange@...hat.com, avagin@...il.com, davem@...emloft.net,
        ebiederm@...ssion.com, linux-kernel@...r.kernel.org,
        oleg@...hat.com, prsood@...eaurora.org,
        syzkaller-bugs@...glegroups.com, tj@...nel.org,
        Ingo Molnar <mingo@...nel.org>
Subject: Re: INFO: task hung in exit_mm

On Tue, Jul 02, 2019 at 11:06:08AM +0200, Peter Zijlstra wrote:
> On Mon, Jul 01, 2019 at 05:14:12PM -0700, Andrew Morton wrote:
> > On Mon, 01 Jul 2019 01:27:04 -0700 syzbot <syzbot+8cc1843d4eec9c0dfb35@...kaller.appspotmail.com> wrote:
> > 
> > > Hello,
> > > 
> > > syzbot found the following crash on:
> > 
> > At a guess I'd say that perf_mmap() hit a deadlock on event->mmap_mutex
> > while holding down_write(mmap_sem) (via vm_mmap_pgoff).  The
> > down_read(mmap_sem) in do_exit() happened to stumble across this and
> > that's what got reported.
> 
> lockdep never reported that and I don't see event->mmap_mutex being held
> anywhere.
> 
> AFAICT CPU0 is running 8355 and only 'has' mmap_sem -- it's blocked
> waiting to acquire.
> 
> CPU1 is running 8354 and has mmap_sem and is waiting to acquire
> event->mmap_mutex.
> 
> But nobody is actually owning it
> 
> We take mmap_mutex in:
> 
>   perf_mmap() - called with mmap_sem held
>   perf_mmap_close() - called with mmap_sem held
> 
>   _free_event() - no faults/mmap while holding it
>   perf_poll() - idem
>   perf_event_set_output() - idem
> 
> I don't see any of those functions in the below stacktrace, and having
> just looked them over, I don't see how they would end up trying to
> acquire mmap_sem and AB-BA.
> 
> Now, clearly there's something screwy, but I'm not seeing a deadlock.
> Let me go play with that reproducer.
> 
> > > HEAD commit:    249155c2 Merge branch 'parisc-5.2-4' of git://git.kernel.o..
> > > git tree:       upstream
> > > console output: https://syzkaller.appspot.com/x/log.txt?x=1306be61a00000
> > > kernel config:  https://syzkaller.appspot.com/x/.config?x=9a31528e58cc12e2
> > > dashboard link: https://syzkaller.appspot.com/bug?extid=8cc1843d4eec9c0dfb35
> > > compiler:       clang version 9.0.0 (/home/glider/llvm/clang  

Also note that I very much do not trust that compiler to build a working
kernel. There's still known code-gen bugs with it.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ