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: <52171128.3070206@huawei.com>
Date:	Fri, 23 Aug 2013 15:37:12 +0800
From:	Li Zefan <lizefan@...wei.com>
To:	Tejun Heo <tj@...nel.org>
CC:	LKML <linux-kernel@...r.kernel.org>,
	Cgroups <cgroups@...r.kernel.org>,
	Containers <containers@...ts.linux-foundation.org>
Subject: Re: [PATCH 10/11] cpuset: allow writing offlined masks to cpuset.cpus/mems

On 2013/8/21 22:18, Tejun Heo wrote:
> Hello,
> 
> On Wed, Aug 21, 2013 at 06:01:21PM +0800, Li Zefan wrote:
>> -		if (!cpumask_subset(trialcs->cpus_allowed, cpu_active_mask))
>> +		if (!cpumask_subset(trialcs->cpus_allowed,
>> +				    top_cpuset.cpus_allowed))
> 
> Hmmm... top_cpuset.cpus_allowed is filled using cpumask_setall(),
> which may include more bits than cpu_possible_mask, which is kinda
> weird.  We probably wanna initialize it with cpu_possible_mask and
> also maybe using cpu_possible_mask in the above would be clearer?

In cpuset_init(), all the bits in cpus_allowed are set. Then in
cpuset_init_smp(), it's set to cpu_active_mask.

so we should set top_cpuset.cpus_allowed to possible_mask if mount
with sane_behavior, otherwise set it to active_mask.

> 
> Also, shouldn't this be dependent upon sane_behavior?
> 

We already treat top_cpus.cpus_allowed differently depending on
save_behavior, so the if statement works correctly.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ