From: NIIBE Y. <gn...@m1...> - 2002-09-11 22:57:52
|
Jeremy Siegel wrote: > However: REG_SYSCALL (and its successors) were not updated; I think this > implies that using them as arguments to sys_ptrace() (e.g. 4*REG_FPUL) would > yield unexpected results. And from what I see in some of the GDB and > GLIBC versions we're working with, there are defines for these values in > other files which would need to be updated independently. Err... Yup. > Unless someone's already submitted such updates, I suggest we just put back a > field at the end of pt_regs, even if it's empty; only its presence is > required so ptrace() users like gdb have a view of "user" space consistent > with the kernel. [Actually, I'd like to fill it in with info like the old > syscall_nr, i.e. system call and argcount; then "get_wchan()" might be able > to return something more useful, and strace could consistency-check the > argument count if desired.] How about following: Put back the field for 2.4 kernel with empty value. 2.5 has same issues for clobbered "r0", porting the fix, remove the field for userspace too. That is, no userspace change for 2.4, but for 2.5. Please go ahead for 2.4 changes. I'll forward-port it to 2.5. The field would be useful, but it costs. With no tra field, the latency of system call improves for some cycles (I know it's almost zero, though), and stack consumption decreases 4-byte (which makes sense for me). -- |