lkml.org 
[lkml]   [1998]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectHow execute user program from kernel module?
Hello,

I'm trying for some functionality of ALSA (Advanced Linux Sound
Architecture) driver execute user program (as root) which will parse
events from sound driver (soundcard startup, soundcard shutdown etc..)
from kernel module. This action is needed for load / save mixer values and
probably for loading some firmware to some soundcards at startup. ALSA
driver supports kerneld/kmod and without possibility of load previous
state of sound driver by startup and store current state of sound driver
by shutdown things doesn't working properly (mainly mixer). I'm not saying
that these actions must be done with some user program, but I don't have
better idea :-(
To subject: I was partly success with 2.1.92 kernel, but this code
doesn't work with 2.0.34-pre2 kernel :-( Code uses kernel_thread function
to create new thread and this thread runs execve (with using set_fs(get_ds())).
I'm not sure if this method is good. I see some comments in asm/unistd.h
that memory from new task isn't freed with standard way. Code also
doesn't work in 2.0.34-pre2 kernel (nearly all syscalls return error 14
(EFAULT) - I'm thinking that this mean that parameters are in invalid
memory).
My question is if user program can be run from kernel module and
if it's possible, please, send me hints or pointer to some source code.

Thank you,
Jaroslav

-----
Jaroslav Kysela <perex@jcu.cz>
Academic Computer Centre, University of South Bohemia
Branisovska 31, C. Budejovice, CZ-370 05 Czech Republic


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:42    [W:0.067 / U:0.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site