Re: execute a user process in the kernel
From: Dag-Erling Smørgrav (des_at_des.no)
Date: 09/24/04
- Previous message: Jacques A. Vidrine: "Re: Older releases? was Re: FreeBSD Security Advisory FreeBSD-SA-02:21.tcpip"
- In reply to: Mike Meyer: "Re: execute a user process in the kernel"
- Next in thread: Robert Watson: "Re: execute a user process in the kernel"
- Reply: Robert Watson: "Re: execute a user process in the kernel"
- Reply: Bruce M Simpson: "Re: execute a user process in the kernel"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: Mike Meyer <mwm@mired.org> Date: Fri, 24 Sep 2004 18:21:25 +0200
Mike Meyer <mwm@mired.org> writes:
> Gordon David <kylincsos@hotmail.com> writes:
> > Kqueue is a good method to notify the user. But I want the code in
> > the kernel directly calls a user program.
> How about starting with the code in kern/kern_exec.c?
execve(2) assumes you already have a process. You get a process by
forking another process. The only process we ever create from scratch
is init(8), and that takes a s**tload of work (see kern/init_main.c).
This is why we have stuff like nfsiod(8) which does nothing but
provide the kernel with a process context it can use for other stuff.
You could, of course, write a kernel API for creating processes from
scratch. They'd still need a parent, but you can use init(8) (pid 1)
for that.
DES
-- Dag-Erling Smørgrav - des@des.no _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
- Previous message: Jacques A. Vidrine: "Re: Older releases? was Re: FreeBSD Security Advisory FreeBSD-SA-02:21.tcpip"
- In reply to: Mike Meyer: "Re: execute a user process in the kernel"
- Next in thread: Robert Watson: "Re: execute a user process in the kernel"
- Reply: Robert Watson: "Re: execute a user process in the kernel"
- Reply: Bruce M Simpson: "Re: execute a user process in the kernel"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|