From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 24 19:20:23 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8E4E416A4D4; Fri, 24 Sep 2004 19:20:23 +0000 (GMT) Received: from mail.broadpark.no (mail.broadpark.no [217.13.4.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0995443D39; Fri, 24 Sep 2004 19:20:23 +0000 (GMT) (envelope-from des@des.no) Received: from dwp.des.no (37.80-203-228.nextgentel.com [80.203.228.37]) by mail.broadpark.no (Postfix) with ESMTP id 98F6541A3; Fri, 24 Sep 2004 21:21:03 +0200 (MEST) Received: by dwp.des.no (Postfix, from userid 2602) id 77E90B85E; Fri, 24 Sep 2004 21:20:21 +0200 (CEST) To: Robert Watson References: From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Fri, 24 Sep 2004 21:20:21 +0200 In-Reply-To: (Robert Watson's message of "Fri, 24 Sep 2004 14:11:19 -0400 (EDT)") Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable cc: bzeeb-lists@lists.zabbadoz.net cc: Mike Meyer cc: Gordon David cc: freebsd-hackers@freebsd.org Subject: Re: execute a user process in the kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Sep 2004 19:20:23 -0000 Robert Watson writes: > Well, we have kproc/kthread APIs, but none of that is semantically > compatible with the notion of execve(), which is a very user-centric > concept ("replace the address space with a mapping of binary "). You > could fudge together a related notion, though, involving loadable kernel > modules that have a main() routine run from a thread. That said, the > notion of simply running user code in kernel (as has been pointed out) is > fraught with peril, primarily because the kernel is basically one big > program with many special requirements, and user applications are written > with the assumption that they are the only program, not running in the > context of another program. I believe the OP actually wanted the kernel to spawn a userland process, but I may have misunderstood. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no