Re: [RFC PATCH] ptrace: make ptrace() fail if the tracee changed its pid unexpectedly

2020-12-19 Thread Simon Marchi
On 2020-12-19 2:33 p.m., Oleg Nesterov wrote: > OOPS! Sorry Simon, yes I forgot to add reported-by. Andrew, or Eric, if > you take this patch, could you also add > > Reported-by: Simon Marchi I tried the original reproducer on a patched kernel, and it looks good. GDB's behav

Re: Possible race between PTRACE_SETVFPREGS and PTRACE_CONT on ARM?

2016-06-02 Thread Simon Marchi
On 16-06-02 09:15 AM, Russell King - ARM Linux wrote: > Hi, can I add a: > > Tested-by: Simon Marchi <simon.mar...@ericsson.com> > > tag to the commit please? Yes, of course.

Re: Possible race between PTRACE_SETVFPREGS and PTRACE_CONT on ARM?

2016-06-02 Thread Simon Marchi
On 16-06-02 09:15 AM, Russell King - ARM Linux wrote: > Hi, can I add a: > > Tested-by: Simon Marchi > > tag to the commit please? Yes, of course.

Re: Possible race between PTRACE_SETVFPREGS and PTRACE_CONT on ARM?

2016-06-01 Thread Simon Marchi
On 16-05-30 05:35 PM, Russell King - ARM Linux wrote: > So, the gdb verisons I have here seem to be particularly poor - but with > some modifications, I can test out on iMX6 by forcing gdb to do the right > thing - by inserting a couple of "mov r0, r0" instructions after the > "break_here" label.

Re: Possible race between PTRACE_SETVFPREGS and PTRACE_CONT on ARM?

2016-06-01 Thread Simon Marchi
On 16-05-30 05:35 PM, Russell King - ARM Linux wrote: > So, the gdb verisons I have here seem to be particularly poor - but with > some modifications, I can test out on iMX6 by forcing gdb to do the right > thing - by inserting a couple of "mov r0, r0" instructions after the > "break_here" label.

Possible race between PTRACE_SETVFPREGS and PTRACE_CONT on ARM?

2016-05-30 Thread Simon Marchi
Hello knowledgeable ARM people! (Background: https://sourceware.org/ml/gdb/2016-05/msg00020.html ) Debugging a flaky GDB test case on ARM lead me to think there might be race between PTRACE_SETVFPREGS and PTRACE_CONT on ARM (PTRACE_SETVFPREGS is ARM-specific anyway). The test case (and the

Possible race between PTRACE_SETVFPREGS and PTRACE_CONT on ARM?

2016-05-30 Thread Simon Marchi
Hello knowledgeable ARM people! (Background: https://sourceware.org/ml/gdb/2016-05/msg00020.html ) Debugging a flaky GDB test case on ARM lead me to think there might be race between PTRACE_SETVFPREGS and PTRACE_CONT on ARM (PTRACE_SETVFPREGS is ARM-specific anyway). The test case (and the

[PATCH] arch/tile: Fix syscall return value passed to tracepoint

2013-04-17 Thread Simon Marchi
Currently the syscall number is passed, but it should be the return value, which is kept in r0. Signed-off-by: Simon Marchi --- This patch applies on Chris Metcalf's tree: http://git.kernel.org/cgit/linux/kernel/git/cmetcalf/linux-tile.git arch/tile/include/uapi/arch/abi.h |2 ++ arch

[PATCH] arch/tile: Fix syscall return value passed to tracepoint

2013-04-17 Thread Simon Marchi
Currently the syscall number is passed, but it should be the return value, which is kept in r0. Signed-off-by: Simon Marchi simon.mar...@polymtl.ca --- This patch applies on Chris Metcalf's tree: http://git.kernel.org/cgit/linux/kernel/git/cmetcalf/linux-tile.git arch/tile/include/uapi/arch

[PATCH 1/4] tile: move declaration of sys_call_table to

2013-01-21 Thread Simon Marchi
When activating syscall tracing, kernel/trace/trace_syscalls.c doesn't find sys_call_table because it includes , not . Also, looking at the other architectures, that is probably where it should be. Signed-off-by: Simon Marchi --- arch/tile/include/asm/syscall.h |6 ++ arch/tile/include

[PATCH 3/4] tile: Add support for TIF_SYSCALL_TRACEPOINT

2013-01-21 Thread Simon Marchi
This patch adds support for the TIF_SYSCALL_TRACEPOINT on the tile architecture. Basically, it calls the appropriate tracepoints on syscall entry and exit. Signed-off-by: Simon Marchi --- arch/tile/include/asm/thread_info.h |8 arch/tile/kernel/intvec_64.S| 14

[PATCH 4/4] tile: select HAVE_SYSCALL_TRACEPOINTS

2013-01-21 Thread Simon Marchi
Signed-off-by: Simon Marchi --- arch/tile/Kconfig |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig index 8cab409..1adb853 100644 --- a/arch/tile/Kconfig +++ b/arch/tile/Kconfig @@ -22,6 +22,7 @@ config TILE select

[PATCH 2/4] tile: Add definition of NR_syscalls

2013-01-21 Thread Simon Marchi
It is required by the syscall tracepoint mechanism. Signed-off-by: Simon Marchi --- arch/tile/include/uapi/asm/unistd.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/tile/include/uapi/asm/unistd.h b/arch/tile/include/uapi/asm/unistd.h index cd7b6dd..c763c86

[PATCH 2/4] tile: Add definition of NR_syscalls

2013-01-21 Thread Simon Marchi
It is required by the syscall tracepoint mechanism. Signed-off-by: Simon Marchi simon.mar...@polymtl.ca --- arch/tile/include/uapi/asm/unistd.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/tile/include/uapi/asm/unistd.h b/arch/tile/include/uapi/asm/unistd.h

[PATCH 4/4] tile: select HAVE_SYSCALL_TRACEPOINTS

2013-01-21 Thread Simon Marchi
Signed-off-by: Simon Marchi simon.mar...@polymtl.ca --- arch/tile/Kconfig |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig index 8cab409..1adb853 100644 --- a/arch/tile/Kconfig +++ b/arch/tile/Kconfig @@ -22,6 +22,7 @@ config TILE

[PATCH 1/4] tile: move declaration of sys_call_table to asm/syscall.h

2013-01-21 Thread Simon Marchi
When activating syscall tracing, kernel/trace/trace_syscalls.c doesn't find sys_call_table because it includes asm/syscall.h, not asm/syscalls.h. Also, looking at the other architectures, that is probably where it should be. Signed-off-by: Simon Marchi simon.mar...@polymtl.ca --- arch/tile

[PATCH 3/4] tile: Add support for TIF_SYSCALL_TRACEPOINT

2013-01-21 Thread Simon Marchi
This patch adds support for the TIF_SYSCALL_TRACEPOINT on the tile architecture. Basically, it calls the appropriate tracepoints on syscall entry and exit. Signed-off-by: Simon Marchi simon.mar...@polymtl.ca --- arch/tile/include/asm/thread_info.h |8 arch/tile/kernel/intvec_64.S

[PATCH 3/3] arch/tile: Enable HAVE_ARCH_TRACEHOOK

2012-12-21 Thread Simon Marchi
Looks like we have everything needed for that. Signed-off-by: Simon Marchi --- arch/tile/Kconfig |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig index 875d008..8cab409 100644 --- a/arch/tile/Kconfig +++ b/arch/tile/Kconfig @@ -21,6

[PATCH 1/3] arch/tile: Call tracehook_report_syscall_{entry,exit} in syscall trace

2012-12-21 Thread Simon Marchi
Call tracehook functions for syscall tracing. The check for TIF_SYSCALL_TRACE was removed, because the same check is done right before in the assembly file. Signed-off-by: Simon Marchi --- arch/tile/kernel/intvec_32.S |6 -- arch/tile/kernel/intvec_64.S |6 -- arch/tile/kernel

[PATCH 2/3] arch/tile: Implement user_stack_pointer

2012-12-21 Thread Simon Marchi
It is needed when we turn on HAVE_ARCH_TRACEHOOK. Signed-off-by: Simon Marchi --- arch/tile/include/asm/ptrace.h |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch/tile/include/asm/ptrace.h b/arch/tile/include/asm/ptrace.h index 5ce052e..4be42fb 100644 --- a/arch

[PATCH 2/3] arch/tile: Implement user_stack_pointer

2012-12-21 Thread Simon Marchi
It is needed when we turn on HAVE_ARCH_TRACEHOOK. Signed-off-by: Simon Marchi simon.mar...@polymtl.ca --- arch/tile/include/asm/ptrace.h |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch/tile/include/asm/ptrace.h b/arch/tile/include/asm/ptrace.h index 5ce052e

[PATCH 3/3] arch/tile: Enable HAVE_ARCH_TRACEHOOK

2012-12-21 Thread Simon Marchi
Looks like we have everything needed for that. Signed-off-by: Simon Marchi simon.mar...@polymtl.ca --- arch/tile/Kconfig |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig index 875d008..8cab409 100644 --- a/arch/tile/Kconfig +++ b/arch

[PATCH 1/3] arch/tile: Call tracehook_report_syscall_{entry,exit} in syscall trace

2012-12-21 Thread Simon Marchi
Call tracehook functions for syscall tracing. The check for TIF_SYSCALL_TRACE was removed, because the same check is done right before in the assembly file. Signed-off-by: Simon Marchi simon.mar...@polymtl.ca --- arch/tile/kernel/intvec_32.S |6 -- arch/tile/kernel/intvec_64.S |6

[PATCH v3 1/3] arch/tile: implement user_regset interface on tile

2012-12-17 Thread Simon Marchi
This is a basic implementation of user_regset for the tile architecture. It reuses the basic blocks that were already there. Signed-off-by: Simon Marchi --- v2 included change for all tile architectures (not just tilegx) v3 changed #include to arch/tile/kernel/ptrace.c | 62

[PATCH v3 2/3] arch/tile: implement arch_ptrace using user_regset on tile

2012-12-17 Thread Simon Marchi
This patch changes arch_ptrace on tile so that it uses user_regset to implement the PTRACE_GETREGS and PTRACE_SETREGS operations. Signed-off-by: Simon Marchi --- arch/tile/kernel/ptrace.c | 15 ++- 1 files changed, 6 insertions(+), 9 deletions(-) diff --git a/arch/tile/kernel

[PATCH v3 3/3] arch/tile: set CORE_DUMP_USE_REGSET on tile

2012-12-17 Thread Simon Marchi
Following the previous patch which adds support for user_regset, tile can now use this feature. Signed-off-by: Simon Marchi --- arch/tile/include/asm/elf.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/tile/include/asm/elf.h b/arch/tile/include/asm/elf.h index

Re: [PATCH 1/3] arch/tile: implement user_regset interface on tilegx

2012-12-17 Thread Simon Marchi
On Mon, Dec 17, 2012 at 5:59 PM, Chris Metcalf wrote: > On 12/17/2012 5:07 PM, Simon Marchi wrote: >>> I think with this support added, we have all the prerequisites to add >>> "select HAVE_ARCH_TRACEHOOK" under "config TILE" in arch/tile/Kcon

[PATCH v2 3/3] arch/tile: set CORE_DUMP_USE_REGSET on tile

2012-12-17 Thread Simon Marchi
Following the previous patch which adds support for user_regset, tile can now use this feature. Signed-off-by: Simon Marchi --- arch/tile/include/asm/elf.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/tile/include/asm/elf.h b/arch/tile/include/asm/elf.h index

[PATCH v2 1/3] arch/tile: implement user_regset interface on tile

2012-12-17 Thread Simon Marchi
This is a basic implementation of user_regset for the tile architecture. It reuses the basic blocks that were already there. Signed-off-by: Simon Marchi --- arch/tile/kernel/ptrace.c | 62 + 1 files changed, 62 insertions(+), 0 deletions(-) diff

[PATCH v2 2/3] arch/tile: implement arch_ptrace using user_regset on tile

2012-12-17 Thread Simon Marchi
This patch changes arch_ptrace on tile so that it uses user_regset to implement the PTRACE_GETREGS and PTRACE_SETREGS operations. Signed-off-by: Simon Marchi --- arch/tile/kernel/ptrace.c | 15 ++- 1 files changed, 6 insertions(+), 9 deletions(-) diff --git a/arch/tile/kernel

Re: [PATCH 1/3] arch/tile: implement user_regset interface on tilegx

2012-12-17 Thread Simon Marchi
On Mon, Dec 17, 2012 at 12:06 PM, Chris Metcalf wrote: > On 12/14/2012 11:34 PM, Simon Marchi wrote: >> This is an implementation of user_regset for the tilegx architecture. It >> reuses the basic blocks that were already there. > > Thanks, Simon! A couple of comments

Re: [PATCH 1/3] arch/tile: implement user_regset interface on tilegx

2012-12-17 Thread Simon Marchi
On Mon, Dec 17, 2012 at 12:06 PM, Chris Metcalf cmetc...@tilera.com wrote: On 12/14/2012 11:34 PM, Simon Marchi wrote: This is an implementation of user_regset for the tilegx architecture. It reuses the basic blocks that were already there. Thanks, Simon! A couple of comments: I encourage

[PATCH v2 1/3] arch/tile: implement user_regset interface on tile

2012-12-17 Thread Simon Marchi
This is a basic implementation of user_regset for the tile architecture. It reuses the basic blocks that were already there. Signed-off-by: Simon Marchi simon.mar...@polymtl.ca --- arch/tile/kernel/ptrace.c | 62 + 1 files changed, 62 insertions

[PATCH v2 2/3] arch/tile: implement arch_ptrace using user_regset on tile

2012-12-17 Thread Simon Marchi
This patch changes arch_ptrace on tile so that it uses user_regset to implement the PTRACE_GETREGS and PTRACE_SETREGS operations. Signed-off-by: Simon Marchi simon.mar...@polymtl.ca --- arch/tile/kernel/ptrace.c | 15 ++- 1 files changed, 6 insertions(+), 9 deletions(-) diff --git

[PATCH v2 3/3] arch/tile: set CORE_DUMP_USE_REGSET on tile

2012-12-17 Thread Simon Marchi
Following the previous patch which adds support for user_regset, tile can now use this feature. Signed-off-by: Simon Marchi simon.mar...@polymtl.ca --- arch/tile/include/asm/elf.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/tile/include/asm/elf.h b/arch/tile

Re: [PATCH 1/3] arch/tile: implement user_regset interface on tilegx

2012-12-17 Thread Simon Marchi
On Mon, Dec 17, 2012 at 5:59 PM, Chris Metcalf cmetc...@tilera.com wrote: On 12/17/2012 5:07 PM, Simon Marchi wrote: I think with this support added, we have all the prerequisites to add select HAVE_ARCH_TRACEHOOK under config TILE in arch/tile/Kconfig, so we might as well do that too

[PATCH v3 3/3] arch/tile: set CORE_DUMP_USE_REGSET on tile

2012-12-17 Thread Simon Marchi
Following the previous patch which adds support for user_regset, tile can now use this feature. Signed-off-by: Simon Marchi simon.mar...@polymtl.ca --- arch/tile/include/asm/elf.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/tile/include/asm/elf.h b/arch/tile

[PATCH v3 2/3] arch/tile: implement arch_ptrace using user_regset on tile

2012-12-17 Thread Simon Marchi
This patch changes arch_ptrace on tile so that it uses user_regset to implement the PTRACE_GETREGS and PTRACE_SETREGS operations. Signed-off-by: Simon Marchi simon.mar...@polymtl.ca --- arch/tile/kernel/ptrace.c | 15 ++- 1 files changed, 6 insertions(+), 9 deletions(-) diff --git

[PATCH v3 1/3] arch/tile: implement user_regset interface on tile

2012-12-17 Thread Simon Marchi
This is a basic implementation of user_regset for the tile architecture. It reuses the basic blocks that were already there. Signed-off-by: Simon Marchi simon.mar...@polymtl.ca --- v2 included change for all tile architectures (not just tilegx) v3 changed #include uapi/arch/chip.h to arch/chip.h

[PATCH 2/3] arch/tile: implement arch_ptrace using user_regset on tilegx

2012-12-14 Thread Simon Marchi
This patch changes arch_ptrace on tilegx so that it uses the user_regset to implement the PTRACE_GETREGS and PTRACE_SETREGS operations. The ifdefs and the old code can be removed when user_regset support for the older architectures is there. Signed-off-by: Simon Marchi --- arch/tile/kernel

[PATCH 1/3] arch/tile: implement user_regset interface on tilegx

2012-12-14 Thread Simon Marchi
This is an implementation of user_regset for the tilegx architecture. It reuses the basic blocks that were already there. Signed-off-by: Simon Marchi --- I only tested these patches on a 3.0 kernel, as this is what my current setup allows me. Some testing on more recent versions would

[PATCH 3/3] arch/tile: set CORE_DUMP_USE_REGSET on tilegx

2012-12-14 Thread Simon Marchi
Following the previous patch which adds support for user_regset, tilegx can now use this feature. Signed-off-by: Simon Marchi --- arch/tile/include/asm/elf.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/tile/include/asm/elf.h b/arch/tile/include/asm/elf.h

[PATCH 1/3] arch/tile: implement user_regset interface on tilegx

2012-12-14 Thread Simon Marchi
This is an implementation of user_regset for the tilegx architecture. It reuses the basic blocks that were already there. Signed-off-by: Simon Marchi simon.mar...@polymtl.ca --- I only tested these patches on a 3.0 kernel, as this is what my current setup allows me. Some testing on more recent

[PATCH 3/3] arch/tile: set CORE_DUMP_USE_REGSET on tilegx

2012-12-14 Thread Simon Marchi
Following the previous patch which adds support for user_regset, tilegx can now use this feature. Signed-off-by: Simon Marchi simon.mar...@polymtl.ca --- arch/tile/include/asm/elf.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/tile/include/asm/elf.h b/arch

[PATCH 2/3] arch/tile: implement arch_ptrace using user_regset on tilegx

2012-12-14 Thread Simon Marchi
This patch changes arch_ptrace on tilegx so that it uses the user_regset to implement the PTRACE_GETREGS and PTRACE_SETREGS operations. The ifdefs and the old code can be removed when user_regset support for the older architectures is there. Signed-off-by: Simon Marchi simon.mar...@polymtl.ca

[PATCH] tilegx: request_irq with a non-null device name

2012-11-15 Thread Simon Marchi
This patch simply makes the tilegx net driver call request_irq with a non-null name. It makes the output in /proc/interrupts more obvious, but also helps tools that don't expect to find null there. Signed-off-by: Simon Marchi Acked-by: Chris Metcalf --- I am not sure if this patch will get

[PATCH] tilegx: request_irq with a non-null device name

2012-11-15 Thread Simon Marchi
This patch simply makes the tilegx net driver call request_irq with a non-null name. It makes the output in /proc/interrupts more obvious, but also helps tools that don't expect to find null there. Signed-off-by: Simon Marchi simon.mar...@polymtl.ca Acked-by: Chris Metcalf cmetc...@tilera.com

Re: [PATCH] tilegx: request_irq with a non-null device name

2012-11-13 Thread Simon Marchi
On Tue, Nov 13, 2012 at 1:37 PM, Chris Metcalf wrote: > On 11/13/2012 3:58 PM, Simon Marchi wrote: >> This patch simply makes the tilegx net driver call request_irq with a >> non-null name. It makes the output in /proc/interrupts more obvious, but >> also helps tools that

[PATCH] tilegx: request_irq with a non-null device name

2012-11-13 Thread Simon Marchi
This patch simply makes the tilegx net driver call request_irq with a non-null name. It makes the output in /proc/interrupts more obvious, but also helps tools that don't expect to find null there. Signed-off-by: Simon Marchi --- drivers/net/ethernet/tile/tilegx.c |2 +- 1 files changed, 1

[PATCH] tilegx: request_irq with a non-null device name

2012-11-13 Thread Simon Marchi
This patch simply makes the tilegx net driver call request_irq with a non-null name. It makes the output in /proc/interrupts more obvious, but also helps tools that don't expect to find null there. Signed-off-by: Simon Marchi simon.mar...@polymtl.ca --- drivers/net/ethernet/tile/tilegx.c |2

Re: [PATCH] tilegx: request_irq with a non-null device name

2012-11-13 Thread Simon Marchi
On Tue, Nov 13, 2012 at 1:37 PM, Chris Metcalf cmetc...@tilera.com wrote: On 11/13/2012 3:58 PM, Simon Marchi wrote: This patch simply makes the tilegx net driver call request_irq with a non-null name. It makes the output in /proc/interrupts more obvious, but also helps tools that don't expect