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:   Thu, 11 Feb 2021 13:43:34 +0100
From:   Michal Hocko <mhocko@...e.com>
To:     Dan Carpenter <dan.carpenter@...cle.com>
Cc:     Jan Kara <jack@...e.cz>, Hillf Danton <hdanton@...a.com>,
        syzbot <syzbot+a7ab8df042baaf42ae3c@...kaller.appspotmail.com>,
        linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org,
        syzkaller-bugs@...glegroups.com,
        Tahsin Erdogan <tahsin@...gle.com>, tytso@....edu
Subject: Re: possible deadlock in fs_reclaim_acquire (2)

On Thu 11-02-21 14:49:43, Dan Carpenter wrote:
> On Thu, Feb 11, 2021 at 11:50:38AM +0100, 'Michal Hocko' via syzkaller-bugs wrote:
> > On Thu 11-02-21 11:22:25, Jan Kara wrote:
> > > On Thu 11-02-21 12:07:29, Hillf Danton wrote:
> > 
> > I haven't received Hillf's email.
> > 
> > [...]
> > > > Fix 71b565ceff37 ("ext4: drop ext4_kvmalloc()") by restoring the
> > > > GFP_NOFS introduced in dec214d00e0d ("ext4: xattr inode deduplication").
> > > > 
> > > > Note this may be the fix also to possible deadlock
> > > >  Reported-by: syzbot+bfdded10ab7dcd7507ae@...kaller.appspotmail.com
> > > >  https://lore.kernel.org/linux-ext4/000000000000563a0205bafb7970@google.com/
> > > 
> > > Please no. Ext4 is using scoping API to limit allocations to GFP_NOFS
> > > inside transactions. In this case something didn't work which seems like a
> > > lockdep bug at the first sight but I'll talk to mm guys about it.
> > > Definitely to problem doesn't seem to be in ext4.
> > 
> > Agreed. kvmalloc(NOFS) is not even supported because vmalloc doesn't
> > support GFP_KERNEL incompatible requests.
> 
> Okay.  I have created a new Smatch warning when people pass GFP_NOFS
> to kvmalloc() and friends.  We'll see if it finds anything tomorrow.

Thanks! Let me just clarify a bit. The kvmalloc doesn't support
GFP_KERNEL incompatible requests and it simply skips vmalloc fallback.
So this is not a correctness issue. It is the API abuse though.

-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ