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: <20230328154156.kcm4nha2jeej74rr@wittgenstein>
Date:   Tue, 28 Mar 2023 17:41:56 +0200
From:   Christian Brauner <brauner@...nel.org>
To:     Tejun Heo <tj@...nel.org>, Johannes Weiner <hannes@...xchg.org>
Cc:     Zefan Li <lizefan.x@...edance.com>, cgroups@...r.kernel.org,
        linux-kernel@...r.kernel.org, gscrivan@...hat.com
Subject: Re: CLONE_INTO_CGROUP probably needs to call controller attach
 handlers

On Tue, Mar 28, 2023 at 05:39:52PM +0200, Christian Brauner wrote:
> Hey,
> 
> Giuseppe reported that the the affinity mask isn't updated when a
> process is spawned directly into the target cgroup via
> CLONE_INTO_CGROUP. However, migrating a process will cause the affinity
> mask to be updated (see the repro at [1].
> 
> I took a quick look and the issue seems to be that we don't call the
> various attach handlers during CLONE_INTO_CGROUP whereas we do for
> migration. So the solution seems to roughly be that we need to call the
> various attach handlers during CLONE_INTO_CGROUP as well when the
> parent's cgroups is different from the child cgroup. I think we need to
> call all of them, can, cancel and attach.
> 
> The plumbing here might be a bit intricate since the arguments that the
> fork handlers take are different from the attach handlers.

But note, as Johannes already pointed out somewhere else, that there's
probably a lot of code that doesn't apply to the CLONE_INTO_CGROUP case
so it might also make sense to just move the missing pieces into the
fork handlers.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ