Commit Graph

71 Commits

Author SHA1 Message Date
matt f01501b2c6 Support really large LKMs. Find out how much space is needed for symbols
and then allocate it on demand.  Rename some common symbols (__bss_start,
_edata, _end, __start_link_set_*, __stop_link_set_*) so that ".<module>"
is appended to them.  This shrinks an amd64 kernel by 20KB of BSS.
2004-02-18 23:44:49 +00:00
cube d3730f1c68 o Fix a bug in ksyms that changed the real meaning of st_name entries for
symbols, and made it impossible for the kernel to use that value, and
  correctly find symbols from LKMs.
o Allow LKM users to use DDB to debug the entry function of a LKM by
  loading the symbol table with the temporary name /lkmtemp/ before calling
  it, and then renaming it once we know the module name.

Approved by ragge@.
2003-11-17 10:16:18 +00:00
christos ddb8b44bce include opt_malloclog.h 2003-11-01 07:07:31 +00:00
jdolecek 465f95a5ec Embed information about kernel version and some of used kernel options
into compiled LKMs. Check this information when LKM is loaded into kernel
and refuse LKMs not matching currently running kernel. Provide LMFORCE
ioctl to skip this check for those feeling adventurous.

as discussed on tech-kern@, thanks to feedback from Bill Studenmund and others
2003-09-06 19:08:53 +00:00
fvdl d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr 960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
ragge f5cb3ec885 Teach the lkm code to add loaded module symbols to the in-kernel symbol table.
XXX - The way this works is clumsy, at least. It will be fixed as soon as
the in-kernel linker is in place.
2003-04-24 20:09:43 +00:00
jdolecek 075efbb3db desupport LMRESERV_O, anything using it doesn't have chance of working
anyway due to numerous kernel structure changes
2003-04-10 19:06:04 +00:00
thorpej e0d8d366df Merge the nathanw_sa branch. 2003-01-18 10:06:22 +00:00
thorpej 80f8dbe30a Add a new VM map, lkm_map, which machine-dependent code can provide
in the event that it needs to use a special VM range (x86_64 falls
into this category).  We fall back onto kernel_map if machine-dependent
code doesn't create a special map.
2002-11-05 01:24:35 +00:00
jdolecek e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
lha 4fa2032edc uppercase the lkm kernel-userspace dev macros and prefix them with LKM_
make modload print the bdev and cdev major when its a dev lkm
2002-09-18 22:59:36 +00:00
gehenna a1d78935eb overload block/character into u_long field.
kern/18234: slightly modified
2002-09-13 13:08:53 +00:00
gehenna 77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
lukem adc783d537 add RCSIDs 2001-11-12 15:25:01 +00:00
mrg b49770c009 add a DEBUG for why the lkm entry point failed. 2001-06-05 12:36:08 +00:00
jdolecek 5a8911a72d Call module "stat" entry where appropriate.
Problem reported and patch provided by SATOU Takashi in kern/12037.
2001-02-24 10:16:46 +00:00
jdolecek 0576f87ad3 add infrastructure to load emulations and their executable support dynamically
via LKM
2000-12-08 19:42:11 +00:00
jdolecek e5b244c609 disable the LM_EXEC stuff for now, it doesn't work anyway
this will be fixed 'soon'
2000-11-21 00:11:38 +00:00
mrg 32aa199ccf remove include of <vm/vm.h> 2000-06-27 17:41:07 +00:00
mrg 2f159a1bac remove/move more mach vm header files:
<vm/pglist.h> -> <uvm/uvm_pglist.h>
	<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
	<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
	<vm/vm_object.h> -> nothing
	<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
2000-06-26 14:20:25 +00:00
simonb 071bde5df6 Don't need to declare nblkdev, nchrdev - these are in <sys/systm.h>. 2000-03-28 06:26:22 +00:00
jdolecek e49c7e1186 LMREADY: kill the DEBUG message "LKM: try ready"
LMLOADSYMS: print the DEBUG message only when (lkm_debug & LKMDB_LOAD)
1999-09-03 17:07:52 +00:00
tron bb5689beb3 Only attempt to remove symbol table from DDB's lists of symbol tables
if we really loaded one.
1999-05-25 00:16:08 +00:00
mrg d2397ac5f7 completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
1999-03-24 05:50:49 +00:00
sommerfe 324ea43975 Fix format mismatch which only turns up when building with DEBUG 1999-01-15 22:02:59 +00:00
sommerfe 114c430bbb Allow lkm's to include symbols for use by DDB. 1999-01-13 23:06:28 +00:00
perry 275d1554aa Abolition of bcopy, ovbcopy, bcmp, and bzero, phase one.
bcopy(x, y, z) ->  memcpy(y, x, z)
ovbcopy(x, y, z) -> memmove(y, x, z)
   bcmp(x, y, z) ->  memcmp(x, y, z)
  bzero(x, y)    ->  memset(x, 0, y)
1998-08-04 04:03:10 +00:00
thorpej da61b242a0 Use vfs_attach()/vfs_detach(). 1998-02-18 07:11:21 +00:00
mrg d90485202c - add defopt's for UVM, UVMHIST and PMAP_NEW.
- remove unnecessary UVMHIST_DECL's.
1998-02-10 14:08:44 +00:00
mrg 1a8c7604f4 initial import of the new virtual memory system, UVM, into -current.
UVM was written by chuck cranor <chuck@maria.wustl.edu>, with some
minor portions derived from the old Mach code.  i provided some help
getting swap and paging working, and other bug fixes/ideas.  chuck
silvers <chuq@chuq.com> also provided some other fixes.

this is the rest of the MI portion changes.

this will be KNF'd shortly.  :-)
1998-02-05 07:59:28 +00:00
thorpej 96f3f45d08 When loading a VFS LKM, use vfs_getopsbyname() to check if the file system
already exists.
1998-02-03 09:18:03 +00:00
mrg e44b1e6182 add a patchable `lkmdebug' variable and only print debug messages
when certain bits are set.
1997-07-21 05:43:36 +00:00
thorpej f160cf5490 Prototype lkmdispatch() in <sys/lkm.h>; all LKMs use it. 1997-05-28 02:44:55 +00:00
thorpej cf30e3e3c9 Prototype lkmexists() in <sys/lkm.h> as some LKMs might need to use it. 1997-05-28 02:41:41 +00:00
christos f443b89c92 backout previous kprintf change 1996-10-13 02:32:29 +00:00
christos 60d201973e printf -> kprintf, sprintf -> ksprintf 1996-10-10 22:46:11 +00:00
explorer 13659c5c84 spelling error only 1996-08-14 05:43:19 +00:00
mrg a715717750 now that tty.h has queue.h, we do not need it here. 1996-05-31 00:03:05 +00:00
mrg 5583238255 impliment ttylist stats based on disk stats. 1996-05-29 02:02:42 +00:00
christos 96776962f7 Fix PR2277; make lkmenodev() be the same type as enodev(). 1996-03-31 21:40:27 +00:00
christos 87a65718ea Eliminate kern_conf.h 1996-03-30 22:24:38 +00:00
christos c9e746a335 Fix printf() formats. 1996-03-16 23:17:04 +00:00
christos 09afd77655 More proto fixes 1996-02-09 18:59:18 +00:00
christos 8a5b1b92e2 First pass at prototyping 1996-02-04 02:15:01 +00:00
thorpej c819cd372d In lkmioctl(), disallow LMRESERV, LMLOADBUF, LMUNRESRV, LMREADY,
and LMUNLOAD if securelevel > 0.  From Matthew Green <mrg@eterna.com.au>
1995-10-10 00:23:20 +00:00
mycroft 245f292fed Prefix names of system call implementation functions with `sys_'. 1995-10-07 06:25:19 +00:00
christos 3d1b06ab09 - new copyargs routine.
- use emul_xxx
- deprecate nsysent; use constant SYS_MAXSYSCALL instead.
- deprecate ep_setup
- call sendsig and setregs indirectly.
1995-04-22 19:42:47 +00:00
mycroft 2f805fa51b copy*str() should use size_t. 1995-03-09 12:05:21 +00:00
cgd da93322976 define lkm_nofunc, to be used instead of nosys (blech!) for unused load,
unload, and stat functions.  arguably could (should?) use NULL instead,
but this is a bit more descriptive.  also, unconditionally call the
load/unload/stat functions, as now they're known to work (because, at
worst, they're lkm_nofunc).
1994-12-24 13:25:48 +00:00