From owner-freebsd-hackers Tue Oct 28 07:45:51 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id HAA29803 for hackers-outgoing; Tue, 28 Oct 1997 07:45:51 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from heron.doc.ic.ac.uk (2EZuVVpbWYd7CpekyPiK0jMFqQacZiy6@heron.doc.ic.ac.uk [146.169.2.31]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id HAA29793 for ; Tue, 28 Oct 1997 07:45:39 -0800 (PST) (envelope-from njs3@doc.ic.ac.uk) Received: from ash2.doc.ic.ac.uk [146.169.16.30] ([iQjOFrToA66k7yP7FHwGpmqXGMX2CcNV]) by heron.doc.ic.ac.uk with smtp (Exim 1.62 #3) id 0xQDps-00062A-00; Tue, 28 Oct 1997 15:45:40 +0000 Received: from njs3 by ash2.doc.ic.ac.uk with local (Exim 1.62 #1) id 0xQDpm-0007NH-00; Tue, 28 Oct 1997 15:45:34 +0000 From: njs3@doc.ic.ac.uk (Niall Smart) Date: Tue, 28 Oct 1997 15:45:34 +0000 X-Mailer: Mail User's Shell (7.2.5 10/14/92) To: hackers@freebsd.org Subject: Re: Loading code from userland Message-Id: Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Oct 28, 7:28am, Alfred Perlstein wrote: > this seems like a bad idea, you would have arbitrary user code being > executed at a privledged level, it's better to make seperate lkms for each > method. Arbitrary? root decides which lkm's to load. > you might be able to set something up alongs the lines that the kernel > calls a procedure in your program to do something, however no rights > should be given to the user code that could compromise the system. This is communication between the kernel and a userland process, which is not what I wanted to do, I want to load code into the kernel. The reason for this is not that the code requires supervisor permissions but that the overhead of the context switches and buffer copying would make the whole thing far too slow to be practical. In any case, the kernel<->userland communication primitives probably require that the userland process runs as root anyway. Though if thats the case it could be changed. Niall