lkml.org 
[lkml]   [2002]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: PTRACE_GET_THREAD_AREA
Date
In article <200212200832.gBK8Wfg29816@magilla.sf.frob.com>,
Roland McGrath <roland@redhat.com> wrote:
>This patch vs 2.5.51 (should apply fine to 2.5.52) adds two new ptrace
>requests for i386, PTRACE_GET_THREAD_AREA and PTRACE_SET_THREAD_AREA.
>These let another process using ptrace do the equivalent of performing
>get_thread_area and set_thread_area system calls for another thread.

Looks fine, except I'd ask you to split up the get/set logic as separate
functions, instead of making that case-statement thing horribly big.

Big functions are bad.

So please make it look something like

case PTRACE_GET_THREAD_AREA:
ret = ptrace_get_area(addr, (struct user_desc *) data);
break;

case PTRACE_SET_THREAD_AREA:
ret = ptrace_set_area(addr, (struct user_desc *) data);
break;

instead, ok?

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:31    [W:0.530 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site