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: <6458f1d3-e38e-4dbf-9202-511abb6a242e@kernel.org>
Date: Tue, 3 Feb 2026 15:00:11 +0800
From: Chao Yu <chao@...nel.org>
To: Barry Song <21cnbao@...il.com>
Cc: chao@...nel.org, jaegeuk@...nel.org,
 linux-f2fs-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] f2fs: fix lock priority inversion issue

On 1/31/2026 10:50 AM, Barry Song wrote:
> On Sat, Jan 31, 2026 at 10:27 AM Chao Yu <chao@...nel.org> wrote:
>>
>> If userspace thread has held f2fs rw semaphore, due to its low priority,
>> it could be runnable or preempted state for long time, during the time,
>> it will block high priority thread which is trying to grab the same rw
>> semaphore, e.g. cp_rwsem, io_rwsem...
>>
>> To fix such issue, let's detect thread's priority when it tries to grab
>> f2fs_rwsem lock, if the priority is lower than a priority threshold, let's
>> uplift the priority before it enters into critical region of lock, and
>> restore the priority after it leaves from critical region.
> 
> Hi Chao,
> 
> Is this even possible if can_nice() returns false, for example due to
> missing CAP_SYS_NICE?

Hi Barry,

I think so, the priority will be temporarily uplifted and restored in lock
duration.

> 
> Proxy execution [1] is currently under development to address general
> priority inversion; hopefully, it will resolve this issue.

Thanks for providing the material.

Yes, there should be generic solution in cpu scheduler and lock primitive
to resolve priority inversion issue. Then it will be benefit for all lock
users.

Not sure, it will be a little bit hard for rw semaphore, it needs to track
and check all reader threads' context in priority inversion scenario.

Thanks,

> 
> [1] https://lpc.events/event/18/contributions/1887/attachments/1402/3074/LPC_%20Proxy%20Exec%20deep%20dive%20outline.pdf
> 
> Thanks
> Barry


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ