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] [thread-next>] [day] [month] [year] [list]
Message-ID: <8A79962F-9B22-4F28-9A7A-F9DB1D855966@nutanix.com>
Date: Tue, 4 Mar 2025 18:31:57 +0000
From: Harshit Agarwal <harshit@...anix.com>
To: Juri Lelli <juri.lelli@...hat.com>, Steven Rostedt <rostedt@...dmis.org>
CC: Ingo Molnar <mingo@...hat.com>, Peter Zijlstra <peterz@...radead.org>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Dietmar Eggemann
	<dietmar.eggemann@....com>,
        Ben Segall <bsegall@...gle.com>, Mel Gorman
	<mgorman@...e.de>,
        Valentin Schneider <vschneid@...hat.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Jon Kohler
	<jon@...anix.com>,
        Gauri Patwardhan <gauri.patwardhan@...anix.com>,
        Rahul
 Chunduru <rahul.chunduru@...anix.com>,
        Will Ton <william.ton@...anix.com>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: Re: [PATCH v3] sched/rt: Fix race in push_rt_task

Thanks Juri for pointing this out.
I can send the fix for deadline as well. 
Is it okay if I do it in a separate patch?

From taking a quick look at the code, I can see that the same fix won’t 
apply as is in case of deadline since it has two different callers for
find_lock_later_rq.
One is push_dl_task for which we can call pick_next_pushable_dl_task
and make sure it is at the head. This is where we have the bug.
Another one is dl_task_offline_migration which gets the task from
dl_task_timer which in turn gets it from sched_dl_entity.
I haven’t gone through the deadline code thoroughly but I think this race
shouldn’t exist for the offline task (2nd) case. If that is true then the fix
could be to check in push_dl_task if the task returned by find_lock_later_rq
is still at the head of the queue or not.
Let me know Steve and Juri if this plan sounds good. I will send the fix
accordingly.

Regards,
Harshit


> On Mar 4, 2025, at 8:18 AM, Juri Lelli <juri.lelli@...hat.com> wrote:
> 
> !-------------------------------------------------------------------|
>  CAUTION: External Email
> 
> |-------------------------------------------------------------------!
> 
> On 04/03/25 10:30, Steven Rostedt wrote:
>> On Tue, 4 Mar 2025 09:15:55 +0000
>> Juri Lelli <juri.lelli@...hat.com> wrote:
>> 
>>> As usual, we have essentially the same in deadline.c, do you think we
>>> should/could implement the same fix proactively in there as well? Steve?
>>> 
>> 
>> Probably. It would be better if we could find a way to consolidate the
>> functionality so that when we fix a bug in one, the other gets fixed too.
> 
> That would be nice indeed.
> 
> Thanks,
> Juri
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ