lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <63319d5c-00c4-48da-8388-fe46cd2191a8@gmail.com>
Date: Tue, 22 Apr 2025 09:50:07 +0100
From: Pavel Begunkov <asml.silence@...il.com>
To: 姜智伟 <qq282012236@...il.com>
Cc: axboe@...nel.dk, io-uring@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] io_uring: Add new functions to handle user fault
 scenarios

On 4/22/25 09:22, 姜智伟 wrote:
> On Tue, Apr 22, 2025 at 3:59 PM Pavel Begunkov <asml.silence@...il.com> wrote:
>>
>> On 4/22/25 04:01, Zhiwei Jiang wrote:
>> ...
>>> I tracked the address that triggered the fault and the related function
>>> graph, as well as the wake-up side of the user fault, and discovered this
>>> : In the IOU worker, when fault in a user space page, this space is
>>> associated with a userfault but does not sleep. This is because during
>>> scheduling, the judgment in the IOU worker context leads to early return.
>>> Meanwhile, the listener on the userfaultfd user side never performs a COPY
>>> to respond, causing the page table entry to remain empty. However, due to
>>> the early return, it does not sleep and wait to be awakened as in a normal
>>> user fault, thus continuously faulting at the same address,so CPU loop.
>>>
>>> Therefore, I believe it is necessary to specifically handle user faults by
>>> setting a new flag to allow schedule function to continue in such cases,
>>> make sure the thread to sleep.Export the relevant functions and struct for
>>> user fault.
>>
>> That's an interesting scenario. Not looking deeper into it, I don't see
>> any callers to set_userfault_flag_for_ioworker(), and so there is no one
>> to set IO_WORKER_F_FAULT. Is there a second patch patch I lost?
>>
>> --
>> Pavel Begunkov
>>
> Sorry, the following changes haven't been submitted yet. I was planning
> to submit them separately, thinking they belong to two different subsystems.
> The other changes that haven't been submitted are as follows:

They should always come together, there is no way to review it
otherwise. Maintainers will decide how to apply patches best
when it's time for that.

-- 
Pavel Begunkov


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ