Subject: Re: kernel panic messages
To: Bill Studenmund <>
From: Greg A. Woods <>
List: tech-kern
Date: 05/04/2003 02:35:32
[ On Saturday, May 3, 2003 at 16:25:38 (-0700), Bill Studenmund wrote: ]
> Subject: Re: kernel panic messages
> On Sat, 3 May 2003, Martin Husemann wrote:
> > On Sun, May 04, 2003 at 01:45:10AM +1000, matthew green wrote:
> > > i've been rather annoyed by a panic message not being unique
> > > in the past.  a simple additional number for strings for now
> > > would not be a step backwards...
> >
> > how about changing the panic signature to include __FILE__ and __LINE__ just
> > before the const char * fmt?
> Doubles or tripples the number of strings. If all we need to do is add a
> number to the existing string, let's just do that.

Would you rather grep the whole source tree every time you search out a
panic (or have to build some tag indexing system), or would you rather
just go directly to the right place?

How about we make it not __FILE__, but rather a pointer to the .ident
section so that the same string that's already there, and which already
includes not just the filename but also the revision info, is used?

A wrapper macro could implement this trivially (just like assert()), and
it could still be disabled with just as much ease by anyone who really
needed to trim all the tiny bits of extra fat from their kernels.

								Greg A. Woods

+1 416 218-0098;            <>;           <>
Planix, Inc. <>; VE3TCP; Secrets of the Weird <>