From: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>
To: "Alex Xu (Hello71)" <alex_y_xu@yahoo.ca>
Cc: linux-kernel@vger.kernel.org, tj@kernel.org, guro@fb.com,
oleg@redhat.com, kernel-team@fb.com
Subject: Re: [REGRESSION] ptrace broken from "cgroup: cgroup v2 freezer" (76f969e)
Date: Sun, 12 May 2019 21:57:29 -0400 [thread overview]
Message-ID: <1916.1557712649@turing-police> (raw)
In-Reply-To: <1557709124.798rxdb4l3.astroid@alex-desktop.none>
[-- Attachment #1: Type: text/plain, Size: 1336 bytes --]
On Sun, 12 May 2019 21:20:12 -0400, "Alex Xu (Hello71)" said:
> I bisected this to 76f969e, "cgroup: cgroup v2 freezer". I reverted the
> entire patchset (reverting only that one caused a conflict), which
> resolved the issue. I skimmed the patch and came up with this
> workaround, which also resolves the issue. I am not at all clear on the
> technical workings of the patchset, but it seems to me like a process's
> frozen status is supposed to be "suspended" when a frozen process is
> ptraced, and "unsuspended" when ptracing ends. Therefore, it seems
> suspicious to always "enter frozen" whether or not the cgroup is
> actually frozen. It seems like the code should instead check if the
> cgroup is actually frozen, and if so, restore the frozen status.
Your analysis seems to be more or less correct, especially since your
one-line workaround patch makes things start working again.
> - cgroup_enter_frozen();
> + //cgroup_enter_frozen();
However, I'm sure this isn't a proper fix - it needs an if statement guarding
it (or a check inside the function). If the kernel is ever in a state where it
*should* be frozen, and it doesn't freeze, things will misbehave.
One has to wonder how many things would be different if the ptrace()
system call wasn't such a steaming pile of dingo's kidneys....
[-- Attachment #2: Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2019-05-13 1:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-13 1:20 [REGRESSION] ptrace broken from "cgroup: cgroup v2 freezer" (76f969e) Alex Xu (Hello71)
2019-05-13 1:57 ` Valdis Klētnieks [this message]
2019-05-13 12:17 ` Oleg Nesterov
2019-05-13 16:38 ` Oleg Nesterov
2019-05-13 16:54 ` Roman Gushchin
2019-05-13 17:03 ` Roman Gushchin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1916.1557712649@turing-police \
--to=valdis.kletnieks@vt.edu \
--cc=alex_y_xu@yahoo.ca \
--cc=guro@fb.com \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox