This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A linux patch for a typo




On Mon, 25 May 1998, H.J. Lu wrote:
> > 
> > User level code should never EVER touch this structure. If anything you
> 
> I am working a gdb patch. It needs to know that.

No, it needs to know the stuff that is in <asm/user.h>

> Here is my copy of the original linux/include/asm-i386/ptrace.h in
> kernel 2.1.103. Unless yours is different from mine, please tell me
> where are the fields in struct pt_regs for FS and GS

There ARE no %fs and %gs registers _anywhere_ in the kernel stack
structure. They used to be there, and they still appear in the
"user_pt_regs" structure in the place where they used to appear. 

The 2.1.x kernels leave them unmodified in the segment registers
themselves, because saving and restoring them is a waste of time when the
kernel doesn't actually need them. 

This is exactly the kind of reason I don't want people to depend on kernel
header files. The fact that two structure entries just magically disappear
when you go from 2.0.x to 2.1.x because 2.1.x has a faster system call
interface is not something that any user level program should ever even
know about.. 

		Linus



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]