RE: a small doubt

Bret Indrelee (bindrelee@sbs-cp.com)
Fri, 8 Oct 1999 09:18:36 -0500


Oliver Xymoron [mailto:oxymoron@waste.org] wrote:
> On 7 Oct 1999, Jes Sorensen wrote:
> > David> Such architectures are mistaken, since they are not going to
> > David> catch NULL pointer derefences in the kernel correctly in all
> > David> such cases.
> >
> > Nod, I don't want to chase bugs that way, however on some
> > architectures it may be expensive working around not
> mapping page zero
> > in kernel space.
> >
> > I remember Alan moaning at me for relying on page zero not being
> > mapped ages ago.
>
> Why don't we simply use an OOPS() macro that causes an oops in an
> arch-specific way? And throw this in a generic place:
>
> #ifndef OOPS
> #define OOPS() (*(int *)0=0)
> #endif

What is wrong with just using the existing panic() from kernel.h?

If there is information that panic() doesn't save which you would get with
an OOPS message, then that is a problem with panic.

-Bret

-------------------------------------------------------------
SBS Technologies, Connectivity Products
... solutions for real-time connectivity

Bret Indrelee, Engineer
SBS Technologies, Inc., Connectivity Products
1284 Corporate Center Drive, St. Paul MN 55121
Direct: (651) 905-4731
Main: (651) 905-4700 Fax: (651) 905-4701
E-mail: bindrelee@sbs-cp.com http://www.sbs.com
-------------------------------------------------------------

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/