lkml.org 
[lkml]   [2009]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ptrace: copy_process() should disable stepping
On 11/08, Roland McGrath wrote:
>
> That is inappropriate use of arch details in generic code. It might
> happen to be harmless fritter in practice on the arch's we have but it
> is certainly not the correct way to go about things. You should just
> call user_disable_single_step() unconditionally. Even on an arch with
> no such machinery at all that should be defined safely as a no-op (see
> linux/ptrace.h). If there is some reason not to do that, please
> explain it.

Yes, we have arch_has_single_step.

I added test_tsk_thread_flag(TIF_SINGLESTEP) check for 2 reasons: to
optimize out user_disable_single_step() in the likely case, and because
I wasn't sure it is safe to call user_disable_single_step() unconditionally.

OK, will resend, thanks.

Oleg.



\
 
 \ /
  Last update: 2009-11-09 17:31    [W:0.062 / U:0.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site