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: <20180813085635.GA8927@quack2.suse.cz>
Date:   Mon, 13 Aug 2018 10:56:35 +0200
From:   Jan Kara <jack@...e.cz>
To:     Jia-Ju Bai <baijiaju1990@...il.com>
Cc:     akpm@...ux-foundation.org, jack@...e.cz,
        mgorman@...hsingularity.net, ak@...ux.intel.com,
        mawilcox@...rosoft.com, viro@...iv.linux.org.uk,
        ross.zwisler@...ux.intel.com, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>
Subject: Re: [BUG] mm: truncate: a possible sleep-in-atomic-context bug in
 truncate_exceptional_pvec_entries()

Hi,

On Mon 13-08-18 11:10:23, Jia-Ju Bai wrote:
> The kernel may sleep with holding a spinlock.
> 
> The function call paths (from bottom to top) in Linux-4.16 are:
> 
> [FUNC] schedule
> fs/dax.c, 259: schedule in get_unlocked_mapping_entry
> fs/dax.c, 450: get_unlocked_mapping_entry in __dax_invalidate_mapping_entry
> fs/dax.c, 471: __dax_invalidate_mapping_entry in dax_delete_mapping_entry
> mm/truncate.c, 97: dax_delete_mapping_entry in
> truncate_exceptional_pvec_entries
> mm/truncate.c, 82: spin_lock_irq in truncate_exceptional_pvec_entries
> 
> I do not find a good way to fix, so I only report.
> This is found by my static analysis tool (DSAC).

Thanks for report but this is a false positive. Note that the lock is
acquired only if we are not operating on DAX mapping but we can get to
dax_delete_mapping_entry() only if we are operating on DAX mapping.

								Honza

-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ