Re: [PATCH 1/1] system call notification with self_ptrace

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Pierre Morel
Date: Wednesday, September 10, 2008 - 7:17 am

Hi,

Andrew Morton wrote:
Thanks, yes I am sure it might.
Yes, we plan to release a tool to trace an application soon.
Yes, of course I have one for x86 and one for s390.
I am cleaning them to make them available.
OK, I will prepare this.
Yes, I will prepare this too.
Right.  It should be self_ptrace.

I used to steal one bit in the ptrace bit-field of the task_struct but 
Oleg pointed out that the ptrace bit-field is used in a lot of places 
without any bit mask, so I chose another way to remember that I (the 
thread) am instrumenting myself.

Alternatively, I could also use the ptrace bit-field and modify every 
reference to use a mask for any test, set or reset of the bit-field.

I provision a 64 bit wide bit-field for future extensions of the 
instrumentation.  I could of course use a smaller bit-field as only 1 
bit is really useful for now. I used 64 bit to be memory aligned with 
most of the architectures.

There is no lock for the instrumentation bit-field because it is used 
for self tracing only, and only current ever accesses the flag.


-- 
=============
Pierre Morel
RTOS and Embedded Linux

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/1] system call notification with self_ptrace, Pierre Morel, (Mon Sep 8, 5:02 am)
Re: [PATCH 1/1] system call notification with self_ptrace, Pierre Morel, (Wed Sep 10, 7:17 am)
Re: [PATCH 1/1] system call notification with self_ptrace, Oleg Nesterov, (Wed Sep 10, 9:20 am)
Re: [PATCH 1/1] system call notification with self_ptrace, Oleg Nesterov, (Fri Sep 12, 7:32 am)