From: Jens Axboe <[email protected]>
To: Jackie Liu <[email protected]>
Cc: Pavel Begunkov <[email protected]>, [email protected]
Subject: Re: [PATCH v2] io_uring: fix dead-hung for non-iter fixed rw
Date: Sun, 24 Nov 2019 20:47:13 -0700 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
> On Nov 24, 2019, at 8:38 PM, Jackie Liu <[email protected]> wrote:
>
>
>
>> 2019年11月25日 10:38,Jens Axboe <[email protected]> 写道:
>>
>>> On 11/24/19 5:43 PM, Jackie Liu wrote:
>>>
>>>
>>>> 2019年11月25日 01:52,Pavel Begunkov <[email protected]> 写道:
>>>>
>>>> On 24/11/2019 20:10, Jens Axboe wrote:
>>>>> On 11/24/19 1:58 AM, Pavel Begunkov wrote:
>>>>>> Read/write requests to devices without implemented read/write_iter
>>>>>> using fixed buffers causes general protection fault, which totally
>>>>>> hangs a machine.
>>>>>>
>>>>>> io_import_fixed() initialises iov_iter with bvec, but loop_rw_iter()
>>>>>> accesses it as iovec, so dereferencing random address.
>>>>>>
>>>>>> kmap() page by page in this case
>>>>>
>>>>> This looks good to me, much cleaner/simpler. I've added a few pipe fixed
>>>>> buffer tests to liburing as well. Didn't crash for me, but obvious
>>>>> garbage coming out. I've flagged this for stable as well.
>>>>>
>>>> The problem I have is that __user pointer is meant to be checked
>>>> for not being a kernel address. I suspect, it could fail in some
>>>> device, which double checks the pointer after vfs (e.g. using access_ok()).
>>>> Am I wrong? Not a fault at least...
>>>>
>>>> #define access_ok(...) __range_not_ok(addr, user_addr_max());
>>>>
>>>> BTW, is there anybody testing it for non x86-64 arch?
>>>>
>>>
>>> I have some aarch64 platform, What test do you want me to do?
>>
>> A basic one to try would be:
>>
>> axboe@x1:/home/axboe/git/liburing $ test/stdout
>> This is a pipe test
>> This is a fixed pipe test
>>
>> But in general I'd just run make runtests in the liburing directory
>> and go through all of them.
>>
>
> For test/stdout is PASS. Tested-by: Jackie Liu <[email protected]>
Thanks!
> But test/accept-link and test/fixed-link failed in for-5.5/io_uring-post branch.
> that is expect?
Yes, the fix for that is in 5.4, didn’t merge it into the 5.5 branch. It’ll pass once Linus pulls the 5.5 bits and the branches merge.
—
Jens Axboe
next prev parent reply other threads:[~2019-11-25 3:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <[email protected]>
2019-11-24 8:58 ` [PATCH v2] io_uring: fix dead-hung for non-iter fixed rw Pavel Begunkov
2019-11-24 17:10 ` Jens Axboe
2019-11-24 17:52 ` Pavel Begunkov
2019-11-25 0:43 ` Jackie Liu
2019-11-25 2:38 ` Jens Axboe
2019-11-25 3:33 ` Jackie Liu
2019-11-25 3:47 ` Jens Axboe [this message]
2019-11-25 10:12 ` Pavel Begunkov
2019-11-25 2:37 ` Jens Axboe
2019-11-25 10:46 ` Pavel Begunkov
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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox