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: <20241026065247.GG9767@noisy.programming.kicks-ass.net>
Date: Sat, 26 Oct 2024 08:52:47 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Tejun Heo <tj@...nel.org>
Cc: Aboorva Devarajan <aboorvad@...ux.ibm.com>, void@...ifault.com,
	vincent.guittot@...aro.org, juri.lelli@...hat.com, mingo@...hat.com,
	bsegall@...gle.com, rostedt@...dmis.org, dietmar.eggemann@....com,
	vschneid@...hat.com, mgorman@...e.de, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sched: Pass correct scheduling policy to
 __setscheduler_class

On Fri, Oct 25, 2024 at 09:28:07AM -1000, Tejun Heo wrote:
> On Sat, Oct 26, 2024 at 12:20:20AM +0530, Aboorva Devarajan wrote:
> > The function __setscheduler_class determines the appropriate
> > sched_class based on the scheduling policy and priority. Previously,
> > the function used the task's pointer to retrieve the scheduling policy,
> > which could lead to incorrect decisions if the task's struct had an
> > outdated policy. This behaviour where the task pointer may reference an
> > outdated policy when __setscheduler_class is called, was introduced in
> > commit 98442f0ccd82 ("sched: Fix delayed_dequeue vs switched_from_fair()")
> > 
> > To resolve this, corresponding scheduling policy is passed directly
> > to __setscheduler_class instead of relying on the task pointer's cached
> > policy. This ensures that the correct policy is always used when
> > determining the scheduling class.
> > 
> > -------------------------------------------------------
> > Before Patch:
> > -------------------------------------------------------
> > 
> > ```
> > sched_ext # ./runner -t init_enable_count
> > ===== START =====
> > TEST: init_enable_count
> > DESCRIPTION: Verify we do the correct amount of counting of init,
> >              enable, etc callbacks.
> > OUTPUT:
> > ERR: init_enable_count.c:132
> > Expected skel->bss->enable_cnt == num_children (3 == 5)
> > not ok 1 init_enable_count #
> > =====  END  =====
> > 
> > =============================
> > 
> > RESULTS:
> > 
> > PASSED:  0
> > SKIPPED: 0
> > FAILED:  1
> > ```
> > -------------------------------------------------------
> > After Patch:
> > -------------------------------------------------------
> > 
> > ```
> > sched-ext # ./runner -t init_enable_count
> > ===== START =====
> > TEST: init_enable_count
> > DESCRIPTION: Verify we do the correct amount of counting of init,
> >              enable, etc callbacks.
> > OUTPUT:
> > ok 1 init_enable_count #
> > =====  END  =====
> > 
> > =============================
> > 
> > RESULTS:
> > 
> > PASSED:  1
> > SKIPPED: 0
> > FAILED:  0
> > ```
> > 
> > Fixes: 98442f0ccd82 ("sched: Fix delayed_dequeue vs switched_from_fair()")
> > Signed-off-by: Aboorva Devarajan <aboorvad@...ux.ibm.com>
> 
> Acked-by: Tejun Heo <tj@...nel.org>
> 
> Peter, do you want me to route this patch or would tip be better?

Once I've figured out what the word soup means and reverse engineerd
what it actually does I'll probably take it :/

That Changelog is horrible

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ