lkml.org 
[lkml]   [2001]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: inserting a Forth-like language into the Linux kernel
Date
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/

\
 
 \ /
  Last update: 2005-03-22 12:52    [W:0.031 / U:23.128 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site