Hajime Tazaki writes:
> On Sat, 14 Dec 2024 05:01:58 +0900,
> Eric W. Biederman wrote:
>
>> >> Last time I looked the regular binfmt_elf works just fine
>> >> without an mmu. I looked again and at a quick skim the
>> >> regular elf loader still
Hajime Tazaki writes:
> Hello Eric,
>
> thanks for the feedback.
>
> On Thu, 12 Dec 2024 23:22:47 +0900,
> Eric W. Biederman wrote:
>>
>> Hajime Tazaki writes:
>>
>> > As UML supports CONFIG_MMU=n case, it has to use an alternate ELF
>> &g
Hajime Tazaki writes:
> As UML supports CONFIG_MMU=n case, it has to use an alternate ELF
> loader, FDPIC ELF loader. In this commit, we added necessary
> definitions in the arch, as UML has not been used so far. It also
> updates Kconfig file to use BINFMT_ELF_FDPIC under !MMU environment.
Wh
Steven Rostedt writes:
> On Tue, 28 Jun 2022 17:42:22 -0500
> "Eric W. Biederman" wrote:
>
>> diff --git a/kernel/ptrace.c b/kernel/ptrace.c
>> index 156a99283b11..cb85bcf84640 100644
>> --- a/kernel/ptrace.c
>> +++ b/kernel/ptrace.c
>> @@
Alexander Gordeev writes:
> On Sat, Jun 25, 2022 at 11:34:46AM -0500, Eric W. Biederman wrote:
>> I haven't gotten as far as reproducing this but I have started giving
>> this issue some thought.
>>
>> This entire thing smells like a memory barrier is missing som
Alexander Gordeev writes:
> On Tue, Jun 21, 2022 at 09:02:05AM -0500, Eric W. Biederman wrote:
>> Alexander Gordeev writes:
>>
>> > On Thu, May 05, 2022 at 01:26:45PM -0500, Eric W. Biederman wrote:
>> >> From: Peter Zijlstra
>> >>
>> >
Alexander Gordeev writes:
> On Tue, Jun 21, 2022 at 09:02:05AM -0500, Eric W. Biederman wrote:
>> Alexander Gordeev writes:
>>
>> > On Thu, May 05, 2022 at 01:26:45PM -0500, Eric W. Biederman wrote:
>> >> From: Peter Zijlstra
>> >>
>> >
Alexander Gordeev writes:
> On Thu, May 05, 2022 at 01:26:45PM -0500, Eric W. Biederman wrote:
>> From: Peter Zijlstra
>>
>> Currently ptrace_stop() / do_signal_stop() rely on the special states
>> TASK_TRACED and TASK_STOPPED resp. to keep unique state. That is, t
Kyle Huey writes:
> On Thu, May 19, 2022 at 11:05 AM Eric W. Biederman
> wrote:
>>
>> Sebastian Andrzej Siewior writes:
>>
>> > On 2022-05-18 20:26:05 [-0700], Kyle Huey wrote:
>> >> Is there a git branch somewhere I can pull to test this?
Oleg Nesterov writes:
> On 05/18, Eric W. Biederman wrote:
>>
>> The code in ptrace_signal to populate siginfo if the signal number
>> changed is buggy. If the tracer contined the tracee using
>> ptrace_detach it is guaranteed to use the real_parent (or possibly a
&g
Oleg Nesterov writes:
> On 05/24, Oleg Nesterov wrote:
>>
>> On 05/24, Oleg Nesterov wrote:
>> >
>> > I fail to understand this patch...
>> >
>> > On 05/18, Eric W. Biederman wrote:
>> > >
>> > > Today if a process is
Oleg Nesterov writes:
> On 05/24, Oleg Nesterov wrote:
>>
>> Sorry for delay.
>>
>> On 05/18, Eric W. Biederman wrote:
>> >
>> > Ever since commit 28d838cc4dfe ("Fix ptrace self-attach rule") it has
>> > been impossible to attach an
"Guilherme G. Piccoli" writes:
> The panic() function is somewhat convoluted - a lot of changes were
> made over the years, adding comments that might be misleading/outdated
> now, it has a code structure that is a bit complex to follow, with
> lots of conditionals, for example. The panic notifie
Sebastian Andrzej Siewior writes:
> On 2022-05-18 17:49:50 [-0500], Eric W. Biederman wrote:
>>
>> For ptrace_stop to work on PREEMT_RT no spinlocks can be taken once
>> ptrace_freeze_traced has completed successfully. Which fundamentally
>> means the lock da
Doug Anderson writes:
> Hi,
>
> On Wed, May 18, 2022 at 3:54 PM Eric W. Biederman
> wrote:
>>
>> kdb has a bug that when using the ps command to display a list of
>> processes, if a process is being debugged the debugger as the parent
>> process.
>&g
Peter Zijlstra writes:
> On Wed, May 18, 2022 at 05:53:42PM -0500, Eric W. Biederman wrote:
>> kdb has a bug that when using the ps command to display a list of
>> processes, if a process is being debugged the debugger as the parent
>> process.
>>
>> This is s
Sebastian Andrzej Siewior writes:
> On 2022-05-18 20:26:05 [-0700], Kyle Huey wrote:
>> Is there a git branch somewhere I can pull to test this? It doesn't apply
>> cleanly to Linus's tip.
>
> https://kernel.googlesource.com/pub/scm/linux/kernel/git/ebiederm/user-namespace.git
> ptrace_stop-clea
to TASK_TRACED. Which on PREEMPT_RT means the
code can sleep and change __state. Not only that but it means that
wait_task_inactive could potentially detect the code scheduling away
at that point and fail, causing ptrace_check_attach to fail.
Signed-off-by: "Eric W. Biederman"
--
Now that siglock protects tsk->parent and tsk->ptrace there is no need
to grab tasklist_lock in ptrace_check_attach. The siglock can handle
all of the locking needs of ptrace_check_attach.
Signed-off-by: "Eric W. Biederman"
---
kernel/ptrace.c | 23 +--
1
entry is reused as the dead task list. The field
tsk->sibling is not protected by siglock when children are reparented
because their original parent dies.
The field tsk->ptrace is protected by siglock except for the options
which may change without siglock being held.
Signed-off-by: "
ce.
When ptrace_setoptions is called the tracee has been frozen with
ptrace_freeze_traced, and most be explicitly unfrozen by the tracer
before it can do anything. As ptrace_setoption is run in the tracer
there can be no contention by the simple fact that the tracee can't
run.
Signed-off-by: &quo
ty of a race and ptrace_freeze_traced is
all of the protection ptrace_set_signr needs to operate without
contention move ptrace_set_signr outside of tasklist_lock
and remove the documentation about the race that is no more.
Signed-off-by: "Eric W. Biederman"
---
kernel/ptrace.c | 19 +
resume with remove the comment and the return
code from ptrace_stop.
Signed-off-by: "Eric W. Biederman"
---
kernel/ptrace.c | 1 -
kernel/signal.c | 13 -
2 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index a0a07d140751..e0e
Now that siginfo is only modified by the tracer and that siginfo is
cleared with the signal is canceled have ptrace_signal directly examine
siginfo.
This makes the code a little simpler and handles the case when
the tracer exits without calling ptrace_detach.
Signed-off-by: "Eric W. Bied
IGINFO and PTRACE_SETSIGINFO") when last_siginfo was
introduced and the tracer could change siginfo.
Fixes: v2.1.68
History-Tree: https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git
Signed-off-by: "Eric W. Biederman"
---
kernel/ptrace.c | 31
checks later by immediately
clearing siginfo if si_signo is not valid.
Signed-off-by: "Eric W. Biederman"
---
kernel/ptrace.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index a24eed725cec..a0a07d140751 100644
--- a/kerne
ce to
do_notify_parent_cldstop()")
Signed-off-by: "Eric W. Biederman"
---
kernel/exit.c | 19 ++-
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/kernel/exit.c b/kernel/exit.c
index f072959fcab7..0e26f73c49ac 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
f the code need to take
the unnecessary lock as well.
So remove the unnecessary lock to make the code more
efficient, simpler, and less confusing.
Signed-off-by: "Eric W. Biederman"
---
kernel/ptrace.c | 30 --
1 file changed, 8 insertions(+), 22 deletions(-)
display a debugger as the parent of a process.
Cc: Douglas Miller
Cc: Michael Ellerman
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Fixes: 6dfb54049f9a ("powerpc/xmon: Add xmon command to dump process/task
similar to ps(1)")
Signed-off-by: "Eric W. Biederman"
---
arch/pow
e sense of what it is trying to do.
Signed-off-by: "Eric W. Biederman"
---
kernel/ptrace.c | 24 +++-
1 file changed, 3 insertions(+), 21 deletions(-)
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index 328a34a99124..ca0e47691229 100644
--- a/kernel/ptrace.c
+
Rather than update the unused definition of IA64_TASK_REAL_PARENT_OFFSENT
when I move tsk->real_parent into signal_struct remove it now.
Cc: linux-i...@vger.kernel.org
Signed-off-by: "Eric W. Biederman"
---
arch/ia64/kernel/asm-offsets.c | 1 -
1 file changed, 1 deletion(-)
diff
real_parent so that it is clear kdb does not want to
display a debugger as the parent of a process.
Cc: Jason Wessel
Cc: Daniel Thompson
Cc: Douglas Anderson
Fixes: 5d5314d6795f ("kdb: core for kgdb back end (1 of 2)"
Signed-off-by: "Eric W. Biederman"
---
kernel/debug/kdb/
Rather than update this defition when I move tsk->real_parent into
signal_struct remove it now.
Cc: Richard Henderson
Cc: Ivan Kokshaysky
Cc: Matt Turner
Cc: linux-al...@vger.kernel.org
Signed-off-by: "Eric W. Biederman"
---
arch/alpha/kernel/asm-offsets.c | 1 -
1 file change
block for PREEMPT_RT in the ptrace_stop path.
Eric W. Biederman (16):
signal/alpha: Remove unused definition of TASK_REAL_PARENT
signal/ia64: Remove unused definition of IA64_TASK_REAL_PARENT_OFFSET
kdb: Use real_parent when displaying a list of processes
powerpc/xmon: Use r
"Eric W. Biederman" writes:
> Oleg Nesterov writes:
>
>> On 05/05, Eric W. Biederman wrote:
>>>
>>> Eric W. Biederman (11):
>>> signal: Rename send_signal send_signal_locked
>>> signal: Replace __group_send_sig_info with send
Sebastian Andrzej Siewior writes:
> On 2022-05-10 09:26:36 [-0500], Eric W. Biederman wrote:
>> Does anyone else have any comments on this patchset?
>>
>> If not I am going to apply this to a branch and get it into linux-next.
>
> Looks good I guess.
> Be aware t
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->p
Oleg Nesterov writes:
> On 05/05, Eric W. Biederman wrote:
>>
>> Eric W. Biederman (11):
>> signal: Rename send_signal send_signal_locked
>> signal: Replace __group_send_sig_info with send_signal_locked
>> ptrace/um: Replace PT_DTRACE with TIF_
Kees Cook writes:
> On Thu, May 05, 2022 at 01:25:57PM -0500, Eric W. Biederman wrote:
>> The states TASK_STOPPED and TASK_TRACE are special in they can not
>> handle spurious wake-ups. This plus actively depending upon and
>> changing the value of tsk->__state causes
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_KILLAB
Oleg Nesterov writes:
> On 05/05, Eric W. Biederman wrote:
>>
>> Eric W. Biederman (11): signal: Rename send_signal send_signal_locked
>> signal: Replace __group_send_sig_info with send_signal_locked
>> ptrace/um: Replace PT_DTRACE with TIF_SINGLESTEP ptrace/xtensa:
&g
in signal_wake_up_state. This prevents the clearing
of TASK_STOPPED and TASK_TRACED from getting lost.
* Added warnings if JOBCTL_STOPPED or JOBCTL_TRACED are not cleared
Signed-off-by: Peter Zijlstra (Intel)
Link: https://lkml.kernel.org/r/20220421150654.757693...@infradead.org
Signed-off-by: E
Make code analysis simpler and future changes easier by
always taking siglock in ptrace_resume.
Signed-off-by: "Eric W. Biederman"
---
kernel/ptrace.c | 13 ++---
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index 83
hen woken up ptrace_stop now clears
JOBCTL_PTRACE_FROZEN and when left sleeping ptrace_unfreezed_traced
clears JOBCTL_PTRACE_FROZEN.
Signed-off-by: "Eric W. Biederman"
---
include/linux/sched.h| 2 +-
include/linux/sched/jobctl.h | 2 ++
include/linux/sched/signal.h | 5 +++--
ke
er has set a signal to continue with would need
to be implemented.
[1] 66519f549ae5 ("[PATCH] fix ptracer death race yielding bogus BUG_ON")
History-Tree: https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git
Signed-off-by: "Eric W.
one of the issues. Failing and warning when
the assumptions of the code are broken is good.
Signed-off-by: "Eric W. Biederman"
---
kernel/ptrace.c | 14 +++---
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index 7105821595bc
user space behavior only in that PTRACE_KILL on a process
not stopped in ptrace_stop will also kill it. As that has always
been the intent of the code this seems like a reasonable change.
Cc: sta...@vger.kernel.org
Reported-by: Al Viro
Suggested-by: Al Viro
Signed-off-by: "Eric W. Biederman&q
...@hirez.programming.kicks-ass.net
Signed-off-by: "Eric W. Biederman"
---
kernel/signal.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/signal.c b/kernel/signal.c
index 72d96614effc..3fd2ce133387 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -88
e up the thread and enter ptrace_stop normally even
when the thread starts out stopped.
This makes ptrace_attach_sync_user_rbs completely unnecessary. So just
remove it.
Cc: linux-i...@vger.kernel.org
Signed-off-by: "Eric W. Biederman"
---
arch/ia64/include/asm/ptrace.h | 4 ---
ed but unused.
Remove the definitions of PT_SINGLESTEP and PT_BLOCKSTEP as they have no more
users.
Cc: sta...@vger.kernel.org
Acked-by: Max Filippov
Signed-off-by: "Eric W. Biederman"
---
arch/xtensa/kernel/ptrace.c | 4 ++--
arch/xtensa/kernel/signal.c | 4 ++--
include/linux/p
ve the definition PT_DTRACE as uml is the last user.
Cc: sta...@vger.kernel.org
Acked-by: Johannes Berg
Signed-off-by: "Eric W. Biederman"
---
arch/um/include/asm/thread_info.h | 2 ++
arch/um/kernel/exec.c | 2 +-
arch/um/kernel/process.c | 2 +-
arch/um
Rename send_signal and __send_signal to send_signal_locked and
__send_signal_locked to make send_signal usable outside of
signal.c.
Signed-off-by: "Eric W. Biederman"
---
include/linux/signal.h | 2 ++
kernel/signal.c| 24
2 files changed, 14 inserti
The function __group_send_sig_info is just a light wrapper around
send_signal_locked with one parameter fixed to a constant value. As
the wrapper adds no real value update the code to directly call the
wrapped function.
Signed-off-by: "Eric W. Biederman"
---
drivers/tty/tty_jobctrl.
ttach I don't think there are any
races or issues to be concerned about from the ptrace side.
More work is needed to support PREEMPT_RT, but these changes get things
closer.
This set of changes continues to look like it will provide a firm
foundation for solving the PREEMPT_RT and free
Oleg Nesterov writes:
> On 05/04, Eric W. Biederman wrote:
>>
>> -static int ptrace_stop(int exit_code, int why, int clear_code,
>> -unsigned long message, kernel_siginfo_t *info)
>> +static int ptrace_stop(int exit_code, int
Oleg Nesterov writes:
> On 05/04, Eric W. Biederman wrote:
>>
>> With the removal of the incomplete detection of the tracer going away
>> in ptrace_stop, ptrace_stop always sleeps in schedule after
>> ptrace_freeze_traced succeeds. Modify ptrace_check_attach to
&g
Oleg Nesterov writes:
> On 05/04, Eric W. Biederman wrote:
>>
>> -static int ptrace_stop(int exit_code, int why, int clear_code,
>> -unsigned long message, kernel_siginfo_t *info)
>> +static int ptrace_stop(int exit_code, int
Sebastian Andrzej Siewior writes:
> On 2022-05-04 17:40:56 [-0500], Eric W. Biederman wrote:
>> 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, an
in signal_wake_up_state. This prevents the clearing
of TASK_STOPPED and TASK_TRACED from getting lost.
* Added warnings if JOBCTL_STOPPED or JOBCTL_TRACED are not cleared
Signed-off-by: Peter Zijlstra (Intel)
Link: https://lkml.kernel.org/r/20220421150654.757693...@infradead.org
Signed-off-by: E
Make code analysis simpler and future changes easier by
always taking siglock in ptrace_resume.
Signed-off-by: "Eric W. Biederman"
---
kernel/ptrace.c | 13 ++---
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index 83
hen woken up ptrace_stop now clears
JOBCTL_PTRACE_FROZEN and when left sleeping ptrace_unfreezed_traced
clears JOBCTL_PTRACE_FROZEN.
Signed-off-by: "Eric W. Biederman"
---
include/linux/sched.h| 2 +-
include/linux/sched/jobctl.h | 2 ++
include/linux/sched/signal.h | 5
9f549ae5 ("[PATCH] fix ptracer death race yielding bogus BUG_ON")
History-Tree: https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git
Signed-off-by: "Eric W. Biederman"
---
kernel/ptrace.c | 14 ++---
kernel/signal.c | 81 ++-
user space behavior only in that PTRACE_KILL on a process
not stopped in ptrace_stop will also kill it. As that has always
been the intent of the code this seems like a reasonable change.
Cc: sta...@vger.kernel.org
Reported-by: Al Viro
Suggested-by: Al Viro
Signed-off-by: "Eric W. Biederman&q
e up the thread and enter ptrace_stop normally even
when the thread starts out stopped.
This makes ptrace_attach_sync_user_rbs completely unnecessary. So just
remove it.
Cc: linux-i...@vger.kernel.org
Signed-off-by: "Eric W. Biederman"
---
arch/ia64/include/asm/ptrace.h | 4 ---
...@hirez.programming.kicks-ass.net
Signed-off-by: "Eric W. Biederman"
---
kernel/signal.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/signal.c b/kernel/signal.c
index 72d96614effc..3fd2ce133387 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -88
ed but unused.
Remove the definitions of PT_SINGLESTEP and PT_BLOCKSTEP as they have no more
users.
Cc: sta...@vger.kernel.org
Acked-by: Max Filippov
Signed-off-by: "Eric W. Biederman"
---
arch/xtensa/kernel/ptrace.c | 4 ++--
arch/xtensa/kernel/signal.c | 4 ++--
include/linux/p
ve the definition PT_DTRACE as uml is the last user.
Cc: sta...@vger.kernel.org
Acked-by: Johannes Berg
Signed-off-by: "Eric W. Biederman"
---
arch/um/include/asm/thread_info.h | 2 ++
arch/um/kernel/exec.c | 2 +-
arch/um/kernel/process.c | 2 +-
arch/um
The function __group_send_sig_info is just a light wrapper around
send_signal_locked with one parameter fixed to a constant value. As
the wrapper adds no real value update the code to directly call the
wrapped function.
Signed-off-by: "Eric W. Biederman"
---
drivers/tty/tty_jobctrl.
Rename send_signal and __send_signal to send_signal_locked and
__send_signal_locked to make send_signal usable outside of
signal.c.
Signed-off-by: "Eric W. Biederman"
---
include/linux/signal.h | 2 ++
kernel/signal.c| 24
2 files changed, 14 inserti
ved this set of changes looks
like it is moving in a good direction.
Eric W. Biederman (10):
signal: Rename send_signal send_signal_locked
signal: Replace __group_send_sig_info with send_signal_locked
ptrace/um: Replace PT_DTRACE with TIF_SINGLESTEP
ptrace/xtensa: Rep
"Eric W. Biederman" writes:
> Oleg Nesterov writes:
>
>> On 05/03, Eric W. Biederman wrote:
>>>
>>> Oleg Nesterov writes:
>>>
>>> > But why is it bad if the tracee doesn't sleep in schedule ? If it races
>>> > wi
Oleg Nesterov writes:
> On 05/03, Eric W. Biederman wrote:
>>
>> Oleg Nesterov writes:
>>
>> > But why is it bad if the tracee doesn't sleep in schedule ? If it races
>> > with SIGKILL. I still can't understand this.
>> >
>
Oleg Nesterov writes:
> On 05/02, Eric W. Biederman wrote:
>>
>> Oleg Nesterov writes:
>>
>> >> #define TASK_KILLABLE(TASK_WAKEKILL |
>> >> TASK_UNINTERRUPTIBLE)
>> >> #define TASK_STOPPED (T
Oleg Nesterov writes:
> On 04/29, Eric W. Biederman wrote:
>>
>> Call send_sig_info in PTRACE_KILL instead of ptrace_resume. Calling
>> ptrace_resume is not safe to call if the task has not been stopped
>> with ptrace_freeze_traced.
>
> Oh, I was never, never
Oleg Nesterov writes:
> On 04/29, Eric W. Biederman wrote:
>>
>> Stop playing with tsk->__state to remove TASK_WAKEKILL while a ptrace
>> command is executing.
>
> Eric, I'll read this patch and the rest of this series tomorrow.
> Somehow I failed to fo
s prevents the clearing
of TASK_STOPPED and TASK_TRACED from getting lost.
* Added warnings if JOBCTL_STOPPED or JOBCTL_TRACED are not cleared
Signed-off-by: Peter Zijlstra (Intel)
Link: https://lkml.kernel.org/r/20220421150654.757693...@infradead.org
Signed-off-by: Eric W. Biederm
cceeds modify
ptrace_check_attach to warn if wait_task_inactive fails.
Signed-off-by: "Eric W. Biederman"
---
kernel/ptrace.c | 14 +++---
kernel/signal.c | 68 ++---
2 files changed, 28 insertions(+), 54 deletions(-)
diff --git a/kernel/p
new flag to decided how to set return signal.
Signed-off-by: "Eric W. Biederman"
---
include/linux/sched/jobctl.h | 2 ++
kernel/ptrace.c | 5 +
kernel/signal.c | 12 ++--
3 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/include/l
Make code analysis simpler and future changes easier by
always taking siglock in ptrace_resume.
Signed-off-by: "Eric W. Biederman"
---
kernel/ptrace.c | 13 ++---
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index 22
e up the thread and enter ptrace_stop normally even
when the thread starts out stopped.
This makes ptrace_attach_sync_user_rbs completely unnecessary. So just
remove it.
Cc: linux-i...@vger.kernel.org
Signed-off-by: "Eric W. Biederman"
---
arch/ia64/include/asm/ptrace.h | 4 ---
w clears
JOBCTL_PTRACE_FROZEN and when left sleeping ptrace_unfreezed_traced
clears JOBCTL_PTRACE_FROZEN.
Signed-off-by: "Eric W. Biederman"
---
include/linux/sched.h| 2 +-
include/linux/sched/jobctl.h | 2 ++
include/linux/sched/signal.h | 8 +++-
kernel/ptrace.c
Call send_sig_info in PTRACE_KILL instead of ptrace_resume. Calling
ptrace_resume is not safe to call if the task has not been stopped
with ptrace_freeze_traced.
Cc: sta...@vger.kernel.org
Reported-by: Al Viro
Suggested-by: Al Viro
Signed-off-by: "Eric W. Biederman"
---
kernel/pt
...@hirez.programming.kicks-ass.net
Signed-off-by: "Eric W. Biederman"
---
kernel/signal.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/signal.c b/kernel/signal.c
index 72d96614effc..3fd2ce133387 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -88
ed but unused.
Remove the definitions of PT_SINGLESTEP and PT_BLOCKSTEP as they have no more
users.
Cc: sta...@vger.kernel.org
Acked-by: Max Filippov
Signed-off-by: "Eric W. Biederman"
---
arch/xtensa/kernel/ptrace.c | 4 ++--
arch/xtensa/kernel/signal.c | 4 ++--
include/linux/p
ve the definition PT_DTRACE as uml is the last user.
Cc: sta...@vger.kernel.org
Acked-by: Johannes Berg
Signed-off-by: "Eric W. Biederman"
---
arch/um/include/asm/thread_info.h | 2 ++
arch/um/kernel/exec.c | 2 +-
arch/um/kernel/process.c | 2 +-
arch/um
The function send_signal_locked does more than __group_send_sig_info so
replace it.
Signed-off-by: "Eric W. Biederman"
---
drivers/tty/tty_jobctrl.c | 4 ++--
include/linux/signal.h | 1 -
kernel/signal.c| 8 +---
kernel/time/posix-cpu-timers.c | 6
Rename send_signal send_signal_locked and make to make
it usable outside of signal.c.
Signed-off-by: "Eric W. Biederman"
---
include/linux/signal.h | 2 ++
kernel/signal.c| 24
2 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/inc
nges and then have a firm foundation
for the rest of the challenges.
There are cleanups to the ptrace support for xtensa, um, and
ia64.
I have sucked in the first patch of Peter's freezer change as
with minor modifications I believe it is ready to go.
Eric W. Biederman (12):
signal:
"Eric W. Biederman" writes:
> Peter Zijlstra writes:
>
>> On Wed, Apr 27, 2022 at 09:47:10AM -0500, Eric W. Biederman wrote:
>>
>>> Hmm. If we have the following process tree.
>>>
>>> A
>>> \
>>> B
&g
Peter Zijlstra writes:
> On Wed, Apr 27, 2022 at 09:47:10AM -0500, Eric W. Biederman wrote:
>
>> Hmm. If we have the following process tree.
>>
>> A
>> \
>> B
>>\
>> C
>>
>> Process A, B, and C are al
Oleg Nesterov writes:
> On 04/27, Eric W. Biederman wrote:
>>
>> "Eric W. Biederman" writes:
>>
>> > diff --git a/include/linux/sched/signal.h b/include/linux/sched/signal.h
>> > index 3c8b34876744..1947c85aa9d9 100644
>> > --- a/i
"Eric W. Biederman" writes:
> diff --git a/include/linux/sched/signal.h b/include/linux/sched/signal.h
> index 3c8b34876744..1947c85aa9d9 100644
> --- a/include/linux/sched/signal.h
> +++ b/include/linux/sched/signal.h
> @@ -437,7 +437,8 @@ extern void signal_wake_up_st
Oleg Nesterov writes:
2> On 04/26, Eric W. Biederman wrote:
>>
>> static void ptrace_unfreeze_traced(struct task_struct *task)
>> {
>> -if (READ_ONCE(task->__state) != __TASK_TRACED)
>> +if (!(READ_ONCE(task->jobctl) & JOBCTL_DELAY_WAKEKILL))
Oleg Nesterov writes:
> On 04/27, Oleg Nesterov wrote:
>>
>> On 04/26, Eric W. Biederman wrote:
>> >
>> > @@ -2209,6 +2213,34 @@ static int ptrace_stop(int exit_code, int why, int
>> > clear_code,
>> >spin_lock_irq(¤t->sigh
Oleg Nesterov writes:
> On 04/27, Oleg Nesterov wrote:
>>
>> On 04/27, Eric W. Biederman wrote:
>> >
>> > Oleg Nesterov writes:
>> >
>> > > On 04/26, Eric W. Biederman wrote:
>> > >>
>> > >> @@ -253,7 +252,7 @@
Oleg Nesterov writes:
> On 04/26, Eric W. Biederman wrote:
>>
>> @@ -253,7 +252,7 @@ static int ptrace_check_attach(struct task_struct
>> *child, bool ignore_state)
>> */
>> if (lock_task_sighand(child, &flags)) {
>> if
"Eric W. Biederman" writes:
> Oleg Nesterov writes:
>
>> On 04/26, Eric W. Biederman wrote:
>>>
>>> @@ -2164,7 +2166,9 @@ static void do_notify_parent_cldstop(struct
>>> task_struct *tsk,
>>> }
>>>
>>> s
"Eric W. Biederman" writes:
> "Eric W. Biederman" writes:
>
>> Asking wait_task_inactive to verify that tsk->__state == __TASK_TRACED
>> was needed to detect the when ptrace_stop would decide not to stop
>> after calling "set_special_state(TAS
Oleg Nesterov writes:
> On 04/26, Eric W. Biederman wrote:
>>
>> @@ -2164,7 +2166,9 @@ static void do_notify_parent_cldstop(struct
>> task_struct *tsk,
>> }
>>
>> sighand = parent->sighand;
>> -spin_lock_irqsave(&sighand->
Johannes Berg writes:
> On Tue, 2022-04-26 at 17:52 -0500, Eric W. Biederman wrote:
>> User mode linux is the last user of the PT_DTRACE flag. Using the flag to
>> indicate
>> single stepping is a little confusing and worse changing tsk->ptrace without
>> lockin
1 - 100 of 112 matches
Mail list logo