Messages in this thread | | | Date | Fri, 7 Mar 2008 15:18:41 -0800 (PST) | From | Linus Torvalds <> | Subject | Re: [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
| |