All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ivan Safonov <insafonov@gmail.com>
To: Bart Van Assche <bvanassche@acm.org>, linux-block@vger.kernel.org
Subject: Re: Read data to kernel buffer by blkdev_read_iter
Date: Fri, 22 Mar 2019 19:24:27 +0300	[thread overview]
Message-ID: <40b7870e-9fc4-0cdc-00f8-e9259bcadb8f@gmail.com> (raw)
In-Reply-To: <1553269013.65329.147.camel@acm.org>

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.

      reply	other threads:[~2019-03-22 16:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-22 13:06 Read data to kernel buffer by blkdev_read_iter Ivan Safonov
2019-03-22 13:42 ` Bart Van Assche
2019-03-22 14:57   ` Ivan Safonov
2019-03-22 15:36     ` Bart Van Assche
2019-03-22 16:24       ` Ivan Safonov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40b7870e-9fc4-0cdc-00f8-e9259bcadb8f@gmail.com \
    --to=insafonov@gmail.com \
    --cc=bvanassche@acm.org \
    --cc=linux-block@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.