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]
Date:   Thu, 10 Jun 2021 11:20:09 +0100
From:   Valentin Schneider <valentin.schneider@....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>,
        Quentin Perret <qperret@...gle.com>, Tejun Heo <tj@...nel.org>,
        Johannes Weiner <hannes@...xchg.org>,
        Ingo Molnar <mingo@...hat.com>,
        Juri Lelli <juri.lelli@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Daniel Bristot de Oliveira <bristot@...hat.com>,
        kernel-team@...roid.com, Li Zefan <lizefan@...wei.com>
Subject: Re: [PATCH v8 06/19] cpuset: Don't use the cpu_possible_mask as a last resort for cgroup v1

On 07/06/21 18:20, Will Deacon wrote:
> On Fri, Jun 04, 2021 at 06:11:03PM +0100, Valentin Schneider wrote:
>> On 02/06/21 17:47, Will Deacon wrote:
>> > @@ -3322,9 +3322,13 @@ void cpuset_cpus_allowed(struct task_struct *tsk, struct cpumask *pmask)
>> >
>> >  void cpuset_cpus_allowed_fallback(struct task_struct *tsk)
>> >  {
>> > +	const struct cpumask *cs_mask;
>> > +	const struct cpumask *possible_mask = task_cpu_possible_mask(tsk);
>> > +
>> >       rcu_read_lock();
>> > -	do_set_cpus_allowed(tsk, is_in_v2_mode() ?
>> > -		task_cs(tsk)->cpus_allowed : cpu_possible_mask);
>> > +	cs_mask = task_cs(tsk)->cpus_allowed;
>> > +	if (is_in_v2_mode() && cpumask_subset(cs_mask, possible_mask))
>> > +		do_set_cpus_allowed(tsk, cs_mask);
>>
>> Since the task will still go through the is_cpu_allowed() loop in
>> select_fallback_rq() after this, is the subset check actually required
>> here?
>
> Yes, I think it's needed. do_set_cpus_allowed() doesn't do any checking
> against the task_cpu_possible_mask, so if we returned to
> select_fallback_rq() with a mask containing a mixture of 32-bit-capable and
> 64-bit-only CPUs then we'd end up setting an affinity mask for a 32-bit
> task which contains 64-bit-only cores.
>

Once again, you're right :-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ