Re: Read data to kernel buffer by blkdev_read_iter

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

 



On 3/22/19 6:36 PM, Bart Van Assche wrote:
On Fri, 2019-03-22 at 17:57 +0300, Ivan Safonov wrote:
In the previous message I misled you: iov_iter has ITER_KVEC type only
if set_fs(get_ds()) present before iov_iter_init(). In this case
_without_ IOCB_DIRECT blkdev_read_iter() work fine. With IOCB_DIRECT
blkdev_read_iter() return -EFAULT.

Have you tried to store a physical address in iov_base instead of a virtual
address?
I tried: already -EFAULT.

vm_area_struct description says: ranges consist of virtual addresses:
/*
 * This struct defines a memory VMM memory area. There is one of these
 * per VM-area/task.  A VM area is any part of the process virtual memory
 * space that has a special rule for the page-fault handlers (ie a shared
 * library, the executable area etc).
 */

So, the physical addresses could not solve this problem.

I think there should be no memory checks for the kernel allocated memory, or the blkdev_read_iter() is not available to work with vmalloc'ed memory at all.

--
Ivan Safonov.



[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