This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: A linux patch for a typo
- To: "H.J. Lu" <hjl@lucon.org>
- Subject: Re: A linux patch for a typo
- From: Linus Torvalds <torvalds@transmeta.com>
- Date: Mon, 25 May 1998 16:08:16 -0700 (PDT)
- cc: libc-hacker@cygnus.com, egcs@cygnus.com, linux-gcc@vger.rutgers.edu, kjahds@kjahds.com, lmfken@lmf.ericsson.se, ian@lasermoon.co.uk, mat@lcs.mit.edu, doughera@lafcol.lafayette.edu, brian@mathworks.com, john@etools.com, craig@metrolink.com, imp@village.org, robf@Willows.Com, meissner@cygnus.com, rfg@monkeys.com, roell@xinside.com, burley@gnu.org, linux-binutils-in@polstra.com, galenh@micron.net, ralf@mailhost.uni-koblenz.de
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