[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <878rrys5yj.fsf@email.froward.int.ebiederm.org>
Date: Thu, 21 Apr 2022 12:26:44 -0500
From: "Eric W. Biederman" <ebiederm@...ssion.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: rjw@...ysocki.net, oleg@...hat.com, mingo@...nel.org,
vincent.guittot@...aro.org, dietmar.eggemann@....com,
rostedt@...dmis.org, mgorman@...e.de, bigeasy@...utronix.de,
Will Deacon <will@...nel.org>, linux-kernel@...r.kernel.org,
tj@...nel.org, linux-pm@...r.kernel.org
Subject: Re: [PATCH v2 5/5] freezer,sched: Rewrite core freezer logic
Peter Zijlstra <peterz@...radead.org> writes:
> --- a/kernel/ptrace.c
> +++ b/kernel/ptrace.c
> @@ -288,7 +288,7 @@ static int ptrace_check_attach(struct ta
> }
> __set_current_state(TASK_RUNNING);
>
> - if (!wait_task_inactive(child, TASK_TRACED) ||
> + if (!wait_task_inactive(child, TASK_TRACED|TASK_FREEZABLE) ||
> !ptrace_freeze_traced(child))
> return -ESRCH;
Do we mind that this is going to fail if the child is frozen
during ptrace_check_attach?
I think to avoid that we need to safely get this to
wait_task_inactive(child, 0), like the coredump code uses.
I would like to say that we can do without the wait_task_inactive,
but it looks like it is necessary to ensure that all of the userspace
registers are saved where the tracer can get at them.
Eric
Powered by blists - more mailing lists