Subject: Re: wscons: "ESC in kernel output" triggers a panic?
To: Nathan J. Williams <nathanw@MIT.EDU>
From: Bang Jun-Young <bjy@mogua.org>
List: tech-kern
Date: 02/20/2001 16:01:43
"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.

Jun-Young

--
Bang Jun-Young <bjy@mogua.org>