arm utrace

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Roland McGrath
Subject: arm utrace
Date: Monday, March 5, 2007 - 3:41 am

Thanks for the feedback, and sorry for the typo in my email address in the
porting howto (I've fixed that).


Any changes I made in arch code were part of mass query-replace changes and
other things I did while grepping for symbols I was removing.  I didn't
intend to remove any useful code and anything changing something wrongly
was an error on my part probably due to misunderstanding the arch code.  
I was just trying to leave arch's I wasn't porting myself slightly closer
to a compilable state.  I'd be glad to amend anything in the patch that is
not right.


I see.  I don't understand why you don't use regs->ARM_ORIG_r0 for this,
but I am not the expert.  If in fact there is no slot in struct pt_regs
that is right to use, the utrace way to do this is to add another regset
containing just the one word of "syscall about to be made".  It only needs
to be meaningfully settable and gettable when at the syscall entry stop.
Your PTRACE_SET_SYSCALL support would use this.


We can change the signature to (struct task_struct *, struct pt_regs *).
Then following the above plan it can do tsk->thread.syscall = -1.


What those remarks mean is that UTRACE_ACTION_SINGLESTEP will only ever be
for something with semantics like hardware single-step support has, i.e. no
side effects on memory or anything else outside the thread's CPU state.
That is not to say that software single-step will never be implemented in
the utrace world.  

What you need is temporary breakpoint insertion, ideally a breakpoint that
would be per-thread.  Eventually we will have a general facility based on
utrace that provides breakpoints, and later per-thread breakpoints, and it
will get improved over time.  New things using utrace can see
ARCH_HAS_SINGLE_STEP not set and fall back to using breakpoint insertion,
and they will know the different ramifications it might have on the
semantics or performance compared to a machine where UTRACE_ACTION_SINGLESTEP
is available.  ptrace can be like this when that infrastructure is available.
In the meantime, ptrace alone can use the old code and nothing is lost.


If that's the worst problem you have, we're in fat city!  I think it's good
to reduce linux/ptrace.h includes so the dependency goes away from every
place not actually dealing with ptrace.  The trap frame struct pt_regs is
traditionally defined in asm/ptrace.h, so that needs to be included in a
lot of places, but linux/ptrace.h is just ptrace hooey nothing much inside
the kernel needs to see.


Thanks,
Roland
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
2.6.21-rc2-mm1, Andrew Morton, (Fri Mar 2, 4:00 am)
Re: 2.6.21-rc2-mm1, Andrew Morton, (Fri Mar 2, 4:04 am)
Re: 2.6.21-rc2-mm1, Russell King, (Fri Mar 2, 4:04 am)
Re: 2.6.21-rc2-mm1, Andrew Morton, (Fri Mar 2, 4:08 am)
Re: 2.6.21-rc2-mm1, Russell King, (Fri Mar 2, 4:10 am)
Re: 2.6.21-rc2-mm1, Andrew Morton, (Fri Mar 2, 4:15 am)
Re: 2.6.21-rc2-mm1, Bryan Wu, (Fri Mar 2, 7:24 am)
[-mm patch] cpu_idle: fix build break , Frederik Deweerdt, (Fri Mar 2, 7:40 am)
Re: [-mm patch] cpu_idle: fix build break, Venkatesh Pallipadi, (Fri Mar 2, 8:24 am)
Re: 2.6.21-rc2-mm1, Michal Piotrowski, (Fri Mar 2, 8:56 am)
Re: 2.6.21-rc2-mm1 - fb_ddc_read() not defined, Valdis.Kletnieks, (Fri Mar 2, 9:03 am)
Re: [-mm patch] cpu_idle: fix build break, Frederik Deweerdt, (Fri Mar 2, 9:24 am)
Re: 2.6.21-rc2-mm1 - fb_ddc_read() not defined, James Simmons, (Fri Mar 2, 9:31 am)
Re: 2.6.21-rc2-mm1, Badari Pulavarty, (Fri Mar 2, 9:32 am)
Re: 2.6.21-rc2-mm1 - fb_ddc_read() not defined, Valdis.Kletnieks, (Fri Mar 2, 9:51 am)
[patch -mm] x86_64: fake numa cmdline flag fix, David Rientjes, (Fri Mar 2, 10:03 am)
Re: 2.6.21-rc2-mm1, Andrew Morton, (Fri Mar 2, 10:10 am)
Re: 2.6.21-rc2-mm1, Badari Pulavarty, (Fri Mar 2, 10:15 am)
Re: [patch -mm] x86_64: fake numa cmdline flag fix, Badari Pulavarty, (Fri Mar 2, 10:21 am)
Re: 2.6.21-rc2-mm1, Randy Dunlap, (Fri Mar 2, 10:30 am)
Re: 2.6.21-rc2-mm1: pata_via: wrong cable detection, Laurent Riffard, (Fri Mar 2, 3:52 pm)
Re: 2.6.21-rc2-mm1, Michal Piotrowski, (Fri Mar 2, 4:42 pm)
Re: 2.6.21-rc2-mm1, Andrew Morton, (Fri Mar 2, 5:40 pm)
Re: 2.6.21-rc2-mm1, Michal Piotrowski, (Fri Mar 2, 6:22 pm)
Re: 2.6.21-rc2-mm1, Andrew Morton, (Fri Mar 2, 6:41 pm)
Re: 2.6.21-rc2-mm1 - build error with CONFIG_NO_HZ=y and C ..., Antonino A. Daplas, (Sat Mar 3, 12:45 am)
Re: 2.6.21-rc2-mm1, Michal Piotrowski, (Sat Mar 3, 3:08 am)
Re: 2.6.21-rc2-mm1, Andrew Morton, (Sat Mar 3, 5:06 am)
Re: 2.6.21-rc2-mm1, Russell King, (Sat Mar 3, 11:03 am)
Re: 2.6.21-rc2-mm1, Mariusz Kozlowski, (Sun Mar 4, 2:07 am)
Re: 2.6.21-rc2-mm1, Mariusz Kozlowski, (Sun Mar 4, 2:48 am)
Re: 2.6.21-rc2-mm1, Andrew Morton, (Sun Mar 4, 4:34 am)
Re: 2.6.21-rc2-mm1, Mariusz Kozlowski, (Sun Mar 4, 5:01 am)
Re: 2.6.21-rc2-mm1, Mariusz Kozlowski, (Sun Mar 4, 10:06 am)
Re: 2.6.21-rc2-mm1, Michal Piotrowski, (Sun Mar 4, 10:13 am)
Re: 2.6.21-rc2-mm1, Michal Piotrowski, (Sun Mar 4, 10:20 am)
Re: 2.6.21-rc2-mm1, J.A. , (Sun Mar 4, 5:11 pm)
Re: 2.6.21-rc2-mm1, Andrew Morton, (Sun Mar 4, 5:29 pm)
Re: 2.6.21-rc2-mm1, Andrew Morton, (Sun Mar 4, 6:17 pm)
[-mm patch] saa7134: fix MODULES=n compilation, Adrian Bunk, (Sun Mar 4, 6:47 pm)
2.6.21-rc2-mm1: drivers/net/wireless/ compile error, Adrian Bunk, (Sun Mar 4, 6:47 pm)
[-mm patch] drivers/cpuidle/: make code static, Adrian Bunk, (Sun Mar 4, 6:47 pm)
[-mm patch] make fb_deferred_io_mkwrite() static, Adrian Bunk, (Sun Mar 4, 6:49 pm)
[-mm patch] fix the ROMFS_* dependencies, Adrian Bunk, (Sun Mar 4, 6:49 pm)
Re: 2.6.21-rc2-mm1, Andrew Morton, (Mon Mar 5, 3:14 am)
Re: 2.6.21-rc2-mm1, Antonino A. Daplas, (Mon Mar 5, 3:30 am)
arm utrace, Roland McGrath, (Mon Mar 5, 3:41 am)
Re: 2.6.21-rc2-mm1: drivers/net/wireless/ compile error, Michael Buesch, (Mon Mar 5, 3:41 am)
Re: [-mm patch] fix the ROMFS_* dependencies , David Howells, (Mon Mar 5, 6:36 am)
Re: 2.6.21-rc2-mm1, Zan Lynx, (Mon Mar 5, 9:34 am)
Re: 2.6.21-rc2-mm1, J.A. , (Mon Mar 5, 3:20 pm)
Re: 2.6.21-rc2-mm1, Andrew Morton, (Mon Mar 5, 4:11 pm)
i2c vs nVidia [Re: 2.6.21-rc2-mm1], J.A. , (Mon Mar 5, 5:16 pm)
Re: i2c vs nVidia [Re: 2.6.21-rc2-mm1], Andrew Morton, (Mon Mar 5, 5:33 pm)
Re: i2c vs nVidia [Re: 2.6.21-rc2-mm1], Greg KH, (Mon Mar 5, 5:44 pm)
[PATCH] sched: fix idle at tick, Con Kolivas, (Mon Mar 5, 11:25 pm)
Re: i2c vs nVidia [Re: 2.6.21-rc2-mm1], Jean Delvare, (Tue Mar 6, 1:45 am)
Re: i2c vs nVidia [Re: 2.6.21-rc2-mm1], Jean Delvare, (Tue Mar 6, 3:56 am)
Re: [-mm patch] fix the ROMFS_* dependencies, Adrian Bunk, (Tue Mar 6, 4:43 pm)