6 Jan 2005 mathieu   » (Master)

Accessing the processor debugging registers at first seemed easy: all I had to do was to use ptrace (PTRACE_{PEEK|POKE}USR,...) and /usr/include/sys/user.h. Well, this is true but ptrace cannot be used to peek and poke at yourself. It can be used only if you are the parent of a ptraced child process and only on the child process. So, I got back to reading the kernel source to find a way to circumvent all these security checks. How sad. Me, being a cracker just because I can't do some very reasonable things...

The funny thing is that writing in my own memory-mapped executable image seems to be as hard as accessing the debugging registers. Yes, I thought I could get away from the hard stuff by writing a good old "int3" where I wanted my breakpoints to be but the only way I seem to be allowed to do this is by using ptrace, and, as explained above, ptrace cannot be used on oneself. *sigh*. So much fun...

Latest blog entries     Older blog entries

New Advogato Features

FOAF updates: Trust rankings are now exported, making the data available to other users and websites. An external FOAF URI has been added, allowing users to link to an additional FOAF file.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!