Re: inserting a Forth-like language into the Linux kernel

From: Rick Hohensee (humbubba@smarty.smart.net)
Date: Sat May 05 2001 - 01:27:05 EST


In 2.4.0-test10, in my kspamd kernel-thread that's like a hollowed-out
kswapd, I have x86 asm code like this...

[enter from in-kernel init]

[open 3 FDs on tty1]

LOOP:
        pushf
        pusha
        call schedule
        popa
        popf

        [ here is some code to use the write syscall to send
                one byte to FD 1. A d, for example. ]

jmp LOOP

The d's get written until a syslog happens. If I do do_syslog(6,6,6); in
the C kspamd wrapper code it's about like so...

<gobs of d's>ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
dddddddddddddddINIT: entering runlevel 8

        [more normal logging stuff, ext2 warnings and so on]

If I don't do the do_syslog() the same thing happens somewhat earlier,
i.e. on a from-the-kernel-itself syslog.

Boot is normal. I can't shift&pg_up vt1, which normally I can, but I can
switch vt's, email you, etc. /proc/4/status for kspamd shows

Name: kspamd
State: R (running)
Pid: 4
PPid: 1

PIDs 1, 2 and 3 don't have any open FD's. My simplistic wrapper pegs CPU
use at 1.0.

Why don't my d's continue?

Might this be easier to do in a 2.0 kernel?

Rick Hohensee
www.clienux.com

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



This archive was generated by hypermail 2b29 : Mon May 07 2001 - 21:00:21 EST