freebsd-skq/sys
wpaul 09db792626 Fix module handling to stop oddball modules (if_ppp_mod, if_sl_mod,
if_tun_mod, etc...) from crashing the system. These modules are useful,
but because they don't yet have proper load()/unload() functions,
they can lead to panics: if, for example, you load the if_ppp module,
any user can panic the system by running modstat.

You can also hang the system outright if you try to unload the PPP
module too.

Changes are as follows:

- Save the name passed to us during the RESERVE stage for name matching
(we can't load if_ppp_mod twice: we've have two ppp0's and two ppp1's,
which is beyond strange). This makes the lkmexists() cheks somewhat
redundant, but there's no way around it that I can see.

- If we call the module entry point and find that we have no lkm_any
structure in our 'private' section, create a fake one. This keeps
modstat happy. We mark such modules as LM_UNKNOWN.

- Don't allow LM_UNLOAD modules to be unloaded: it just ain't
possible. (Unless someone wants to write a pppunattach() function. :( )

- In lkmunreserve(), mark private.lkm_any as NULL so we don't get
confused later. I think this is bogus, but I can't prove it.

XXX: the name matching used to keep the user from loading two
instances of the same module can easily be defeated simply by
changing the module name or, in the case of the oddball modules,
simply by renaming the module files. I haven't found a nice simple
way to tell one module from another.
1995-04-18 02:29:26 +00:00
..
alpha/include Third round in syscons update. 1995-01-28 22:18:05 +00:00
amd64 Print the BIOS geometries in a human-readable format. 1995-04-17 16:49:50 +00:00
compile Stop cvs up -P from removing empty compile directories. 1994-08-25 16:20:16 +00:00
conf Bump to 2.0-950418-SNAP 1995-04-17 10:19:31 +00:00
ddb Fixed the formatting breakage I added in the previous commit. 1995-04-04 01:35:33 +00:00
dev Changed minimum supported rev of DC21040 to pass 2.2. 1995-04-17 08:16:14 +00:00
fs For P_SUGID processes, we must also change ownership of the mem file 1995-04-15 03:20:31 +00:00
gnu John Aycock's BSD copyrighted sequencer assembler and sequencer code. This 1995-04-15 21:45:56 +00:00
i386 Extensive updates to this package. 1995-04-18 02:00:01 +00:00
isa Fix initializations of kdc_state for serial consoles. 1995-04-15 21:45:16 +00:00
isofs/cd9660 Readdir on a CDrom would return bogus "d_type" values, potentially confusing 1995-03-28 07:46:38 +00:00
kern Fix module handling to stop oddball modules (if_ppp_mod, if_sl_mod, 1995-04-18 02:29:26 +00:00
libkern Do not install libkern into /usr/lib, blank target install: added. 1995-03-23 07:02:14 +00:00
miscfs For P_SUGID processes, we must also change ownership of the mem file 1995-04-15 03:20:31 +00:00
modules Put vnode_if.h and vnode_if.c into CLEANFILES that are automatically 1995-04-15 17:36:53 +00:00
msdosfs Fix link sys call 1995-04-11 18:32:17 +00:00
net Tunnel driver is nmow capable of installing its own cdevsw[] entry, 1995-04-10 20:35:45 +00:00
netccitt Removed redundant newlines that were in some panic strings. 1995-03-19 14:29:26 +00:00
netinet Fixed bug I introduced when changing PCB list to use 4.4BSD style queue 1995-04-12 06:49:56 +00:00
netiso Add and move declarations to fix all of the warnings from `gcc -Wimplicit' 1995-03-28 07:58:53 +00:00
netns Removed redundant newlines that were in some panic strings. 1995-03-19 14:29:26 +00:00
nfs Various fixes from John Dyson: 1995-04-16 05:05:25 +00:00
nfsclient Various fixes from John Dyson: 1995-04-16 05:05:25 +00:00
nfsserver Removed unnecessary call to vnode_pager_uncache(). We automatically clear 1995-03-19 12:08:03 +00:00
pci Changed minimum supported rev of DC21040 to pass 2.2. 1995-04-17 08:16:14 +00:00
powerpc/include Don't define CLK_TCK here. 1995-02-03 21:49:18 +00:00
rpc Use the header files that are compatible with the code just moved over 1994-08-07 18:41:02 +00:00
scsi Added "scsi target" device that can act as a target for scsi transfers 1995-04-14 15:10:44 +00:00
sys Add LM_UNKNOWN type for oddball modules (if_ppp_mod, if_sl_mod, etc...) 1995-04-18 02:17:15 +00:00
tools Added $Id$ 1994-08-02 07:55:43 +00:00
ufs Make vegetarian and animal rights people happy and use 0xdeadc0de instead 1995-04-16 11:25:47 +00:00
vm Fixed a logic bug that caused the vmdaemon to not wake up when intended. 1995-04-17 10:00:55 +00:00
Makefile Added ${MACHINE}/boot to build bootblocks. 1994-08-25 13:54:28 +00:00