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: <20150108114950.GB3351@infradead.org>
Date:	Thu, 8 Jan 2015 03:49:50 -0800
From:	Christoph Hellwig <hch@...radead.org>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org, Linus Torvalds <torvalds@...ux-foundation.org>,
	Milosz Tanski <milosz@...in.com>
Subject: pread2/ pwrite2

On Tue, Jan 06, 2015 at 12:47:14AM -0800, Andrew Morton wrote:
> > progress, which is a bit frustrating.
> 
> I took a look at pread2() as well and I have two main issues:
> 
> - The patchset includes a pwrite2() syscall which has nothing to do
>   with nonblocking reads and which was poorly described and had little
>   justification for inclusion.

It allows to do O_SYNC writes on a per-I/O basis.  This is very useful
for file servers (smb, cifs) as well as storage target devices.

Note: that part was my addition, and the complaint about lacking
description ever made it to me.  Can you point to the relevant
questions?

> - We've talked for years about implementing this via fincore+pread
>   and at least two fincore implementations are floating about.  Now
>   along comes pread2() which does it all in one hit.
> 
>   Which approach is best?  I expect fincore+pread is simpler, more
>   flexible and more maintainable.  But pread2() will have lower CPU
>   consumption and lower average-case latency.

fincore+pread is inherently racy and thus entirely unsuitable for the
use case of a non-blockign main thread.

Nevermind that the pread2 path is way simpler than any of the proposed
fincore patches.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ