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: <20201119143012.GA2458028@google.com>
Date:   Thu, 19 Nov 2020 14:30:12 +0000
From:   Quentin Perret <qperret@...gle.com>
To:     Will Deacon <will@...nel.org>
Cc:     linux-arm-kernel@...ts.infradead.org, linux-arch@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Catalin Marinas <catalin.marinas@....com>,
        Marc Zyngier <maz@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Morten Rasmussen <morten.rasmussen@....com>,
        Qais Yousef <qais.yousef@....com>,
        Suren Baghdasaryan <surenb@...gle.com>,
        Tejun Heo <tj@...nel.org>, Li Zefan <lizefan@...wei.com>,
        Johannes Weiner <hannes@...xchg.org>,
        Ingo Molnar <mingo@...hat.com>,
        Juri Lelli <juri.lelli@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        kernel-team@...roid.com
Subject: Re: [PATCH v3 11/14] sched: Reject CPU affinity changes based on
 arch_cpu_allowed_mask()

On Thursday 19 Nov 2020 at 11:07:24 (+0000), Will Deacon wrote:
> Yeah, the cpuset code ignores the return value of set_cpus_allowed_ptr() in
> update_tasks_cpumask() so the failure won't be propagated, but then again I
> think that might be the right thing to do. Nothing prevents 32-bit and
> 64-bit tasks from co-existing in the same cpuseti afaict, so forcing the
> 64-bit tasks onto the 32-bit-capable cores feels much worse than the
> approach taken here imo.

Ack. And thinking about it more, failing the cgroup operation wouldn't
guarantee that the task's affinity and the cpuset are aligned anyway. We
could still exec into a 32 bit task from within a 64 bit-only cpuset.

> The interesting case is what happens if the cpuset for a 32-bit task is
> changed to contain only the 64-bit-only cores. I think that's a userspace
> bug

Maybe, but I think Android will do exactly that in some cases :/

> but the fallback rq selection should avert disaster.

I thought _this_ patch was 'fixing' this case by making the cpuset
operation pretty much a nop on the task affinity? The fallback rq stuff
is all about hotplug no?

Thanks,
Quentin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ