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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <98887e63-51de-f5ad-8fb8-56269aaf4bcf@redhat.com>
Date:   Wed, 15 Dec 2021 11:29:41 -0500
From:   Waiman Long <longman@...hat.com>
To:     Michal Koutný <mkoutny@...e.com>
Cc:     Tejun Heo <tj@...nel.org>, Zefan Li <lizefan.x@...edance.com>,
        Johannes Weiner <hannes@...xchg.org>,
        Jonathan Corbet <corbet@....net>,
        Shuah Khan <shuah@...nel.org>, cgroups@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
        linux-kselftest@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        Roman Gushchin <guro@...com>, Phil Auld <pauld@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Juri Lelli <juri.lelli@...hat.com>,
        Frederic Weisbecker <frederic@...nel.org>,
        Marcelo Tosatti <mtosatti@...hat.com>
Subject: Re: [PATCH v9 3/7] cgroup/cpuset: Refining features and constraints
 of a partition


On 12/15/21 09:49, Michal Koutný wrote:
> On Sun, Dec 05, 2021 at 01:32:16PM -0500, Waiman Long <longman@...hat.com> wrote:
>> @@ -1455,34 +1450,16 @@ static void update_cpumasks_hier(struct cpuset *cs, struct tmpmasks *tmp)
>>   			switch (parent->partition_root_state) {
>> [...]
>> -
>>   			case PRS_ENABLED:
>> -				if (update_parent_subparts_cpumask(cp, partcmd_update, NULL, tmp))
>> -					update_tasks_cpumask(parent);
>> +				update_parent = true;
>> [...]
>> +		if (update_parent) {
>> +			if (update_parent_subparts_cpumask(cp, partcmd_update, NULL, tmp))
>> +				update_tasks_cpumask(parent);
>> +			/*
>> +			 * The cpuset partition_root_state may be changed
>> +			 * to PRS_ERROR. Capture it.
>> +			 */
>> +			new_prs = cp->partition_root_state;
>> +		}
> IIUC, this ensures that when a parent becomes partition root again, this
> would propagate downwards to invalidated children.
>
> However, the documentation says:
>
>> +       Changing a partition root (valid or invalid) to "member" is
>> +       always allowed.  If there are child partition roots underneath
>> +       it, they will become invalid and unrecoverable.  So care must
>> +       be taken to double check for this condition before disabling
>> +       a partition root.
> I.e. it suggests a child can be trapped in the unrecoverable state (i.e.
> not fixable by writing into cpuset.cpus.partition).
> But this does not happen, right?

There are additional checks for the member to partition transition which 
requires that the target cpuset shouldn't have child cpuset. That 
prevents the recovering of a invalid partition root under a member 
cpuset. We could certainly remove that restriction by adding additional 
code as well as additional tests to verify it works. I haven't done that 
simply to avoid adding more complexity to the current code.

Cheers,
Longman

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ