Subject: Re: wscons: "ESC in kernel output" triggers a panic?
To: Bang Jun-Young <bjy@mogua.org>
From: Bill Studenmund <wrstuden@zembu.com>
List: tech-kern
Date: 02/21/2001 14:31:23
On Tue, 20 Feb 2001, Bang Jun-Young wrote:
> "Nathan J. Williams" wrote:
> >
> > Some testing code of mine recently tripped over this bit of code in
> > wsemul_vt100.c:
> >
> > case ASCII_ESC:
> > #ifdef DIAGNOSTIC
> > if (kernel)
> > panic("ESC in kernel output");
> > #endif
> >
> > I'm puzzled. What is this good for? Why is printing an escape sequence
> > from the kernel forbidden, and in such a drastic way?
>
> The kernel shouldn't depend on or expect any particular terminal type
> to be used, so its purpose would be to prevent a kernel hacker from
> inserting escape sequences into kernel messages by mistake.
Yes, but by panicing when they are seen, we make a DoS attack...
Take care,
Bill