Thread (5 messages) 5 messages, 2 authors, 2019-03-22

Re: Read data to kernel buffer by blkdev_read_iter

From: Ivan Safonov <hidden>
Date: 2019-03-22 16:21:56

On 3/22/19 6:36 PM, Bart Van Assche wrote:
On Fri, 2019-03-22 at 17:57 +0300, Ivan Safonov wrote:
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help