On 05/10, Eric W. Biederman wrote:
>
> > But I still think that a lockless
> >
> > if (!(task->jobctl & JOBCTL_PTRACE_FROZEN))
> > return;
> >
> > check at the start of ptrace_unfreeze_traced() makes sense to avoid
> > lock_task_sighand() if possible.
> >
> > And ptrace_resume() can
Oleg Nesterov writes:
> On 05/05, Eric W. Biederman wrote:
>>
>> static void ptrace_unfreeze_traced(struct task_struct *task)
>> {
>> -if (READ_ONCE(task->__state) != __TASK_TRACED)
>> -return;
>> -
>> -WARN_ON(!task->ptrace || task->parent != current);
>> +unsigned long
On 05/05, Eric W. Biederman wrote:
>
> static void ptrace_unfreeze_traced(struct task_struct *task)
> {
> - if (READ_ONCE(task->__state) != __TASK_TRACED)
> - return;
> -
> - WARN_ON(!task->ptrace || task->parent != current);
> + unsigned long flags;
>
> /*
> -
Oleg Nesterov writes:
> On 05/05, Eric W. Biederman wrote:
>>
>> --- a/include/linux/sched.h
>> +++ b/include/linux/sched.h
>> @@ -103,7 +103,7 @@ struct task_group;
>> /* Convenience macros for the sake of set_current_state: */
>> #define TASK_KILLABLE (TASK_WAKEKILL |
>
On 05/05, Eric W. Biederman wrote:
>
> --- a/include/linux/sched.h
> +++ b/include/linux/sched.h
> @@ -103,7 +103,7 @@ struct task_group;
> /* Convenience macros for the sake of set_current_state: */
> #define TASK_KILLABLE(TASK_WAKEKILL |
> TASK_UNINTERRUPTIBLE)
> #defi
Stop playing with tsk->__state to remove TASK_WAKEKILL while a ptrace
command is executing.
Instead remove TASK_WAKEKILL from the definition of TASK_TRACED, and
implement a new jobctl flag TASK_PTRACE_FROZEN. This new flag is set
in jobctl_freeze_task and cleared when ptrace_stop is awoken or in