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]
Date: Thu, 16 May 2024 18:38:06 +0200
From: Sven Schnelle <svens@...ux.ibm.com>
To: Ingo Molnar <mingo@...hat.com>, Peter Zijlstra <peterz@...radead.org>
Cc: Valentin Schneider <vschneid@...hat.com>,
        Juri Lelli
 <juri.lelli@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Steven Rostedt
 <rostedt@...dmis.org>, Ben Segall <bsegall@...gle.com>,
        Mel Gorman
 <mgorman@...e.de>,
        Daniel Bristot de Oliveira <bristot@...hat.com>,
        Heiko Carstens <hca@...ux.ibm.com>, linux-s390@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sched/core: Test online status in available_idle_cpu()

Sven Schnelle <svens@...ux.ibm.com> writes:

> Valentin Schneider <vschneid@...hat.com> writes:
>
>> On 29/04/24 07:54, Sven Schnelle wrote:
>>> The current implementation of available_idle_cpu() doesn't test
>>> whether a possible cpu is offline. On s390 this dereferences a
>>> NULL pointer in arch_vcpu_is_preempted() because lowcore is not
>>> allocated for offline cpus. On x86, tracing also shows calls to
>>> available_idle_cpu() after a cpu is disabled, but it looks like
>>> this isn't causing any (obvious) issue. Nevertheless, add a check
>>> and return early if the cpu isn't online.
>>>
>>> Signed-off-by: Sven Schnelle <svens@...ux.ibm.com>
>>
>>
>> So most of the uses of that function is in wakeup task placement.
>> o find_idlest_cpu() works on the sched_domain spans, so shouldn't
> deal with
>>   offline CPUs.
>> o select_idle_sibling() may issue an available_idle_cpu(prev) with
> an
>>   offline previous, which would trigger your issue.
>>
>> Currently, even if select_idle_sibling() picks an offline CPU, this
> will
>> get corrected by select_fallback_rq() at the end of
>> select_task_rq(). However, it would make sense to realize @prev
> isn't a
>> suitable pick before making it to the fallback machinery, in which
> case
>> your patch makes sense beyond just fixing s390.
>>
>> Reviewed-by: Valentin Schneider <vschneid@...hat.com>
>
> Thanks for the review! Ingo/Peter, gentle ping, are you planning to
> take
> this patch?

Ping?

Thanks,

Sven

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ