Subject: Re: lkm problems...
To: Frank Dana <danaf@cs.rpi.edu>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: current-users
Date: 11/21/1995 08:10:33
On Tue, 21 Nov 1995 02:26:51 -0500 
 Frank Dana <danaf@cs.rpi.edu> wrote:

 > The only problem I had, other than needing to hack the code a little, is
 > that I _could_not_ do the modload from within multi-user mode. Even su'd
 > to root on the console, I got an erro from modload that it "could not
 > allocate memory: Operation mnot permitted." after which it did an exit(9);

Right ... That's sort-of by design, the thought being, if someone cracked 
root on your system, they could easily compromise the _running_ kernel.  
You can work around this in a couple of ways:

	* Load the lkm in /etc/rc.local, before the kernel goes to
	  securelevel 1.

	* Put "options INSECURE" in your kernel config file, which
	  prevents securelevel from being raised.

	* Load Roland McGrath's "defeat securelevel" LKM in /etc/rc.local,
	  thus eliminating the need to re-compile your kernel.

 > The only way I could get the module to load was to drop down to single
 > user mode. Dropping out of kernel security did the trick.
 > 
 > Is there an easier way? Some device I need to reconfigure or something?
 > The modload and lkm manpages weren't of any help.

--------------------------------------------------------------------------
Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                               Home: 408.866.1912
NAS: M/S 258-6                                          Work: 415.604.0935
Moffett Field, CA 94035                                Pager: 415.428.6939