lkml.org 
[lkml]   [2008]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86_64 ptrace orig_ax on ia32 task

On Fri, 7 Mar 2008, Roland McGrath wrote:
>
> This makes 64-bit ptrace calls setting the 64-bit orig_ax field
> for a 32-bit task sign-extend the low 32 bits up to 64. This
> matches what a 64-bit debugger expects when tracing a 32-bit task.

Hmm. Why make this conditional on CONFIG_IA32_EMULATION and TIF_IA32?

That field is never really 64-bit anyway. The only allowable values are
- system call number (== small positive value)
- a small negative number for traps

So I'd suggest just making it entirely unconditionally just do

case offsetof(struct user_regs_struct, orig_ax):
value = (long) (s32) value;
break;

and be done with it. Why have arbitrarily different code on x86 and x86-64
when there is no real reason for it?

Linus


\
 
 \ /
  Last update: 2008-03-08 00:23    [W:0.095 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site