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-next>] [day] [month] [year] [list]
Date:	Fri, 19 Feb 2016 16:59:36 +0100
From:	Jan Kara <jack@...e.cz>
To:	Ted Tso <tytso@....edu>
Cc:	linux-ext4@...r.kernel.org, Jan Kara <jack@...e.cz>
Subject: [PATCH 0/6] ext4: Clean up io_end handling for AIO DIO

Hello,

Recently I had a look at how io_ends are handled for AIO DIO. When doing AIO
DIO we allocate io_end and attach it to inode. ext4_ext_map_blocks() then
fetches io_end from inode and operates on it. This scheme is somewhat fragile
because it relies on the fact that we hold i_mutex whenever we need io_end
which is non-obvious dependency (if it was not for io_end handling, i_data_sem
would be enough). dioread_nolock mode broke this assumption and was corrupting
io_end pointers until recently which somewhat demostrates my point.

This patch set converts ext4 to allocate io_end only once we spot unwritten
extent during direct IO write and uses bh->b_private and dio->private
to store it in the same fashion as XFS. That way passing of io_end pointer
happens via IO-local context and is thus independent of any locks.

The core of the change is in patch 5/6, the rest are related cleanups and
preparations for the change.

Patches pass xfstests in normal and dioread_nolock mode. Patch 5/6 conflicts
with changes of DIO completion on error however resolving these conflicts
should be straightforward.

								Honza
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ