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: <CA+G9fYt3x1C1u7_xe5zUXgOY-fr5O25tFTgffyrxG1avncRzbA@mail.gmail.com>
Date: Tue, 16 Dec 2025 23:42:21 +0530
From: Naresh Kamboju <naresh.kamboju@...aro.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: sched-ext@...ts.linux.dev, open list <linux-kernel@...r.kernel.org>, 
	lkft-triage@...ts.linaro.org, Ingo Molnar <mingo@...nel.org>, 
	Vincent Guittot <vincent.guittot@...aro.org>, Juri Lelli <juri.lelli@...hat.com>, 
	Dietmar Eggemann <dietmar.eggemann@....com>, Steven Rostedt <rostedt@...dmis.org>, 
	Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>, 
	Valentin Schneider <vschneid@...hat.com>, Tejun Heo <tj@...nel.org>, void@...ifault.com, 
	arighi@...dia.com, changwoo@...lia.com, 
	Dan Carpenter <dan.carpenter@...aro.org>, Arnd Bergmann <arnd@...db.de>
Subject: Re: Boot regression: next-20251215: arm64: WARNING:
 kernel/sched/core.c:10851 at sched_change_end

On Tue, 16 Dec 2025 at 19:47, Peter Zijlstra <peterz@...radead.org> wrote:
>
> On Tue, Dec 16, 2025 at 06:11:11PM +0530, Naresh Kamboju wrote:
> > [Re-sending with unwrapping]
> >
> > The following boot warning is noticed on qemu-arm64 booting the
> > Linux next-20251215 and next-20251216.
> >
> > Regression Analysis:
> > - New regression? Yes
> > - Reproducibility? Yes
> >
> > First seen on next-20251215
> > Bad:  next-20251215 and next-20251216
> > Good: next-20251212
> >
> > Boot regression: arm64: WARNING: kernel/sched/core.c:10851 at sched_change_end
> >
> > Are these expected warnings ? Anyone noticed ?
> >
> > Reported-by: Linux Kernel Functional Testing <lkft@...aro.org>
>
> Still a wrapped mess :/
>
> Anyway, afaik you're the first to notice.

<trim>

> This is:
>
>         WARN_ON_ONCE(sched_class_above(ctx->class, p->sched_class) &&
>                         !test_tsk_need_resched(p));
>
> And rt_mutex_setprio() doesn't set need_resched() on demotion; but
> worse, reading it now, I realize that if p != current, nobody ever will.
>
> I suppose something like so will cure things?

I have tested this patch and did not encounter any regressions.

Tested-by:  Linux Kernel Functional Testing <lkft@...aro.org>

>
> ---
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index 7d0a862a8c75..5b17d8e3cb55 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -10833,23 +10833,24 @@ void sched_change_end(struct sched_change_ctx *ctx)
>                 if (p->sched_class->switched_to)
>                         p->sched_class->switched_to(rq, p);
>
> -               /*
> -                * If this was a class promotion; let the old class know it
> -                * got preempted. Note that none of the switch*_from() methods
> -                * know the new class and none of the switch*_to() methods
> -                * know the old class.
> -                */
> -               if (ctx->running && sched_class_above(p->sched_class, ctx->class)) {
> -                       rq->next_class->wakeup_preempt(rq, p, 0);
> -                       rq->next_class = p->sched_class;
> +               if (ctx->running) {
> +                       /*
> +                        * If this was a class promotion; let the old class
> +                        * know it got preempted. Note that none of the
> +                        * switch*_from() methods know the new class and none
> +                        * of the switch*_to() methods know the old class.
> +                        */
> +                       if (sched_class_above(p->sched_class, ctx->class)) {
> +                               rq->next_class->wakeup_preempt(rq, p, 0);
> +                               rq->next_class = p->sched_class;
> +                       }
> +                       /*
> +                        * If this was a degradation in class; make sure to
> +                        * reschedule.
> +                        */
> +                       if (sched_class_above(ctx->class, p->sched_class))
> +                               resched_curr(rq);
>                 }
> -
> -               /*
> -                * If this was a degradation in class someone should have set
> -                * need_resched by now.
> -                */
> -               WARN_ON_ONCE(sched_class_above(ctx->class, p->sched_class) &&
> -                            !test_tsk_need_resched(p));
>         } else {
>                 p->sched_class->prio_changed(rq, p, ctx->prio);
>         }
>

 - https://tuxapi.tuxsuite.com/v1/groups/linaro/projects/lkft/tests/36wC2DzDokQEutv2FqXwjRjSv82

- Naresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ