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 10:53:45 -0700 (PDT)
- cc: GNU C Library <libc-hacker@cygnus.com>, egcs@cygnus.com, linuxgcc <linux-gcc@vger.rutgers.edu>, Kenneth Albanowski <kjahds@kjahds.com>, Kenneth Osterberg <lmfken@lmf.ericsson.se>, ian@lasermoon.co.uk, Mat Hostetter <mat@lcs.mit.edu>, Andy Dougherty <doughera@lafcol.lafayette.edu>, Brian Bourgault <brian@mathworks.com>, "John W. Christy" <john@etools.com>, Craig Groeschel <craig@metrolink.com>, Warner Losh <imp@village.org>, Rob Farnum <robf@Willows.Com>, Michael Meissner <meissner@cygnus.com>, Ron Guilmette <rfg@monkeys.com>, Thomas Roell <roell@xinside.com>, Craig Burley <burley@gnu.org>, John Polstra <linux-binutils-in@polstra.com>, Galen Hazelwood <galenh@micron.net>, Ralf Baechle <ralf@mailhost.uni-koblenz.de>
On Sun, 24 May 1998, H.J. Lu wrote:
>
> Here is a patch for typo in linux 2.1.10.3. My upcoming gdb FPU support
> patch needs it.
Did you even _try_ your patch?
As far as I can tell, if you apply your patch the kernel shouldn't even
boot, or at least not work correctly. The "pt_regs" structure _has_ to
match what the kernel actually pushes on the stack, and quite frankly, if
the user level code ever cares, the user level code is _broken_.
User level code should never EVER touch this structure. If anything you
have references "struct pt_regs", then that code is YOUR bug, and I don't
want to know.
Look into "asm/user.h", and _please_ do not send patches to the kernel
without even having tested them.
I have long considered it _wrong_ for libc to have anything at all to do
with the kernel header files, why do you still use them? It used to make
sense back in -92 when the system was changing so fast that fundamental
interfaces changed, and you were supposed to sometimes have to recompile
your libc when you changed a kernel.
Those days are long gone, please just take a snapshot of whatever random
kernel you have today, and copy whatever defines you need from that kernel
tree into your glibc tree, and then modify _that_.
Linus