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]
Date: Fri, 12 Apr 2024 05:29:10 +0100
From: Al Viro <viro@...iv.linux.org.uk>
To: Jens Axboe <axboe@...nel.dk>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCHSET RFC 0/437] Kill off old fops ->read() and ->write()

On Thu, Apr 11, 2024 at 09:12:20AM -0600, Jens Axboe wrote:
> Hi,
> 
> This patchset will obviously be split, commit messages updated, and
> specific driver patches targeted to where they belong. But I figured
> it'd be useful to blast out the full set at least once for reference,
> and then I'll continue down the right path for the next one.
> 
> Subject line says it all, really. 10 years ago we added ->read_iter()
> and ->write_iter() to struct file_operations. These are great, as they
> pass in an iov_iter rather than a user buffer + length, and they also
> take a struct kiocb rather than just a file. Since then we've had two
> paths for any read or write - one legacy one that can't do per-IO hints
> like "This read should be non-blocking", they strictly only work with
> O_NONBLOCK on the file, and a newer one that supports everything the
> old path does and a bunch more. We've had a few issues with the
> iov_iter based path being slower, but those have basically been
> resolved with solutions like ITER_UBUF to optimize the single segment
> case that is often the fast path.
> 
> There are basically three parts to this series:
> 
> 1) Add generic helpers that we need to convert drivers.
> 2) Convert any use of fops->read() and ->write()
> 3) Kill off old cruft.
> 3a) Profit.

The fundamental problem with that is that a bunch of drivers
do care about the vector boundaries.  Very much so.  It's very
common to have this kind of situation:
	write() parses the buffer sloppily, and ignores the junk in
the end, claiming that everything that been written.
	writev() feeds each vector to write().

>From a cursory look through that pile, you seem to have broken
writev() on at least some (if not all) of those.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ