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>] [day] [month] [year] [list]
Message-ID: <jhjblgyqfsf.mognet@arm.com>
Date:   Mon, 19 Oct 2020 18:36:16 +0100
From:   Valentin Schneider <valentin.schneider@....com>
To:     Tao Zhou <ouwen210@...mail.com>
Cc:     Peter Zijlstra <peterz@...radead.org>, tglx@...utronix.de,
        mingo@...nel.org, linux-kernel@...r.kernel.org,
        bigeasy@...utronix.de, qais.yousef@....com, swood@...hat.com,
        juri.lelli@...hat.com, vincent.guittot@...aro.org,
        dietmar.eggemann@....com, rostedt@...dmis.org, bsegall@...gle.com,
        mgorman@...e.de, bristot@...hat.com, vincent.donnefort@....com,
        tj@...nel.org
Subject: Re: [PATCH v3 10/19] sched: Fix migrate_disable() vs set_cpus_allowed_ptr()


On 19/10/20 17:32, Tao Zhou wrote:
> Hi Valentin,
>>
>> Side thought: don't we need to NULL p->migration_pending in __sched_fork()?
>>
>
> No need, if fork happen, the forked task will inherit that pending.

Which is what I'm worrying about. I think we can ignore migrate_disable()
for now and just consider a task fork()'ing while another tries to
sched_setaffinity() it; say the fork() happens just after the pending has
been installed.

Unless I'm overthinking it, we could end up with a dangling pending
reference, which will wreck havock to any later affine_move_task() (see the
if (p->migration_pending) paths).

> If pending is NULL, when call SCA, it will install pending. If pending
> is not NULL, it means it is in migrate region and wait for complete.
> If NULL pending in __sched_fork() it will install a new pending in this
> case which is not right to me. Add a flag(ENABLE_MIGRATE) to arg will
> differ the path where in.
>
> Always likely miss something.
>
> Tao
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ