Re: [PATCH v6 03/34] iov_iter: Pass I/O direction into iov_iter_get_pages*()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 17.01.23 09:44, David Howells wrote:
Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:

On Mon, Jan 16, 2023 at 11:08:24PM +0000, David Howells wrote:
Define FOLL_SOURCE_BUF and FOLL_DEST_BUF to indicate to get_user_pages*()
and iov_iter_get_pages*() how the buffer is intended to be used in an I/O
operation.  Don't use READ and WRITE as a read I/O writes to memory and
vice versa - which causes confusion.

The direction is checked against the iterator's data_source.

Why can't we use the existing FOLL_WRITE?

Because FOLL_WRITE doesn't mean the same as WRITE:

  (1) It looks like it should really be FOLL_CHECK_PTES_WRITABLE.  It's not
      defined as being anything to do with the I/O.

Especially combined with FOLL_FORCE, this is not true.

--
Thanks,

David / dhildenb




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux