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: <jhj366seozd.mognet@arm.com>
Date:   Thu, 18 Jun 2020 09:51:18 +0100
From:   Valentin Schneider <valentin.schneider@....com>
To:     Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc:     Scott Wood <swood@...hat.com>, linux-kernel@...r.kernel.org,
        Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        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>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] sched: __set_cpus_allowed_ptr(): Check cpus_mask, not cpus_ptr


On 18/06/20 09:07, Sebastian Andrzej Siewior wrote:
> On 2020-06-17 17:49:48 [-0500], Scott Wood wrote:
>> > Makes sense, but what about the rest of the checks? Further down there is
>> >
>> >         /* Can the task run on the task's current CPU? If so, we're done
>> > */
>> >         if (cpumask_test_cpu(task_cpu(p), new_mask))
>> >                 goto out;
>> >
>> > If the task is currently migrate disabled and for some stupid reason it
>> > gets affined elsewhere, we could try to move it out - which AFAICT we
>> > don't
>> > want to do because migrate disabled. So I suppose you'd want an extra
>> > bailout condition here when the task is migrate disabled.
>> >
>> > ISTR in RT you do re-check the affinity and potentially move the task away
>> > when re-enabling migration, so that should work out all fine.
>>
>> On RT the above test is:
>>
>>         /* Can the task run on the task's current CPU? If so, we're done */
>>         if (cpumask_test_cpu(task_cpu(p), new_mask) ||
>>             p->cpus_ptr != &p->cpus_mask)
>>                 goto out;
>>
>> ...so we do bail out if we're migrate disabled.
>
> correct. There is a complete migrate_disable() patch in the RT queue
> which has to wait. This patch however looked to be independent of that
> and could "fix" the pointer part which is already here so I sent it.
>

Okay, thanks. I don't see any harm in including that extra check with the
patch, but either way:

Reviewed-by: Valentin Schneider <valentin.schneider@....com>

>> -Scott
>
> Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ