The NetBSD Project

CVS log for src/sys/kern/kern_ksyms.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / kern

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.108 / (download) - annotate - [select for diffs], Tue Feb 21 11:40:00 2023 UTC (13 months, 1 week ago) by riastradh
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, HEAD
Changes since 1.107: +8 -5 lines
Diff to previous 1.107 (colored) to selected 1.38 (colored)

ksyms(4): Reject negative offsets earlier in lseek.

Avoid arithmetic overflow.

XXX pullup-10

Revision 1.107 / (download) - annotate - [select for diffs], Fri Jul 15 06:40:24 2022 UTC (20 months, 2 weeks ago) by mrg
Branch: MAIN
CVS Tags: netbsd-10-base, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Branch point for: netbsd-10
Changes since 1.106: +3 -3 lines
Diff to previous 1.106 (colored) to selected 1.38 (colored)

convert "ksyms: checking <symbol>" into KSYMS_DEBUG over normal DEBUG.

Revision 1.106 / (download) - annotate - [select for diffs], Wed Jul 6 01:12:46 2022 UTC (20 months, 3 weeks ago) by riastradh
Branch: MAIN
Changes since 1.105: +3 -2 lines
Diff to previous 1.105 (colored) to selected 1.38 (colored)

uvm(9): fo_mmap caller guarantees positive size.

No functional change intended, just sprinkling assertions to make it
clearer.

Revision 1.105 / (download) - annotate - [select for diffs], Wed Sep 22 05:42:19 2021 UTC (2 years, 6 months ago) by rin
Branch: MAIN
Changes since 1.104: +3 -2 lines
Diff to previous 1.104 (colored) to selected 1.38 (colored)

ksymsmmap: Add missing uao_reference(9) call for ks->ks_uobj.

Fix failure for savecore(8) and subsequent kernel panic, introduced to
kern_ksyms.c rev 1.03, at least for sh3 and alpha.

For sh3 and alpha, savecore(8) supports coff and ecoff, respectively, via
libkvm via nlist(3). nlist(3) routines for coff and ecoff use mmap(2) and
munmap(2) for /dev/ksyms.

This munmap(2) decrements reference count for ks->ks_uobj. Unless it is
incremented in ksymsmmap(), ks->ks_uobj will be freed unexpectedly.

Revision 1.104 / (download) - annotate - [select for diffs], Sat Sep 11 10:09:55 2021 UTC (2 years, 6 months ago) by riastradh
Branch: MAIN
Changes since 1.103: +66 -26 lines
Diff to previous 1.103 (colored) to selected 1.38 (colored)

ksyms: Use pserialize(9) for kernel access to ksyms.

This makes it available in interrupt context, e.g. for printing
messages with kernel symbol names for return addresses as drm wants
to do.

Revision 1.103 / (download) - annotate - [select for diffs], Sat Sep 11 10:09:31 2021 UTC (2 years, 6 months ago) by riastradh
Branch: MAIN
Changes since 1.102: +437 -161 lines
Diff to previous 1.102 (colored) to selected 1.38 (colored)

ksyms(4): Take a complete snapshot on each open.

- Snapshots are stored in pageable anonymous uvm objects.
- Snapshots are reference-counted so they can be reused across opens.
- Opening /dev/ksyms blocks module unload until snapshot is taken.
- Merely holding /dev/ksyms open does not block module unload.
- /dev/ksyms is now mmappable.

This slightly changes the behaviour of fstat(2) on /dev/ksyms -- it
is a little more useful now!  In particular, st_size is the size of
the symbol table.  Some other fields which were not very useful to
begin with -- st_dev, st_ino, st_mode, st_nlink, st_*time,
st_blksize, st_blocks -- are now different, and independent of the
file system on which the device node resides.

Discussed in

https://mail-index.netbsd.org/source-changes-d/2021/08/17/msg013425.html

This is option (3), adapted to make the ksyms snapshots pageable,
after options (1) and (2) posed practical problems.

Revision 1.102 / (download) - annotate - [select for diffs], Tue Sep 7 16:56:25 2021 UTC (2 years, 6 months ago) by riastradh
Branch: MAIN
Changes since 1.101: +73 -48 lines
Diff to previous 1.101 (colored) to selected 1.38 (colored)

Revert "ksyms(4): Simply block unload until last /dev/ksyms close."

This appears to break t_execsnoop -- presumably something goes wrong
with how libdtrace uses ksyms.  To investigate.

Revision 1.101 / (download) - annotate - [select for diffs], Tue Sep 7 16:56:13 2021 UTC (2 years, 6 months ago) by riastradh
Branch: MAIN
Changes since 1.100: +26 -66 lines
Diff to previous 1.100 (colored) to selected 1.38 (colored)

Revert "ksyms: Use pserialize(9) for kernel access to ksyms."

Revision 1.100 / (download) - annotate - [select for diffs], Tue Sep 7 11:00:02 2021 UTC (2 years, 6 months ago) by riastradh
Branch: MAIN
Changes since 1.99: +66 -26 lines
Diff to previous 1.99 (colored) to selected 1.38 (colored)

ksyms: Use pserialize(9) for kernel access to ksyms.

This makes it available in interrupt context, e.g. for printing
messages with kernel symbol names for return addresses as drm wants
to do.

Revision 1.99 / (download) - annotate - [select for diffs], Tue Sep 7 10:59:46 2021 UTC (2 years, 6 months ago) by riastradh
Branch: MAIN
Changes since 1.98: +48 -73 lines
Diff to previous 1.98 (colored) to selected 1.38 (colored)

ksyms(4): Simply block unload until last /dev/ksyms close.

Otherwise, readers may get a garbled snapshot of ksyms (or a crash on
an assertion failure because of the garbled snapshot) if modules are
unloaded while they read.

https://mail-index.netbsd.org/source-changes-d/2021/08/17/msg013425.html

Revision 1.98 / (download) - annotate - [select for diffs], Sun Jul 18 06:57:28 2021 UTC (2 years, 8 months ago) by mlelstv
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base, thorpej-cfargs2
Changes since 1.97: +5 -5 lines
Diff to previous 1.97 (colored) to selected 1.38 (colored)

skip symbol tables that were unloaded again to avoid EFAULT when reading
ksyms.

also restore TAILQ_FOREACH idiom.

Revision 1.97 / (download) - annotate - [select for diffs], Thu Jun 3 09:22:47 2021 UTC (2 years, 9 months ago) by riastradh
Branch: MAIN
CVS Tags: cjep_sun2x-base1
Changes since 1.96: +12 -14 lines
Diff to previous 1.96 (colored) to selected 1.38 (colored)

ksyms(4): Allow multiple concurrent opens of /dev/ksyms.

First one takes a snapshot; others all agree with the snapshot.

Previously this code path was just broken (could fail horribly if
modules were unloaded after one of the opens is closed), so I just
blocked it off in an earlier commit, but that broke crash(8).  So
let's continue allowing multiple opens seeing the same snapshot, but
without the horrible bugs.

Revision 1.96 / (download) - annotate - [select for diffs], Thu Jun 3 01:00:24 2021 UTC (2 years, 9 months ago) by riastradh
Branch: MAIN
Changes since 1.95: +3 -7 lines
Diff to previous 1.95 (colored) to selected 1.38 (colored)

ksyms(4): Don't skip symbol tables that are soon to be freed, take 2.

They will not actually be freed until /dev/ksyms is closed, so
continued access to them remains kosher.

The previous change was busted because of an off-by-one error in a
previous previous change's iteration over the symtabs; that error has
since been corrected.

Revision 1.95 / (download) - annotate - [select for diffs], Thu Jun 3 01:00:15 2021 UTC (2 years, 9 months ago) by riastradh
Branch: MAIN
Changes since 1.94: +8 -4 lines
Diff to previous 1.94 (colored) to selected 1.38 (colored)

ksyms(4): Fix race in ksymsread iteration.

TAILQ_NEXT(ksyms_last_snapshot) might change while we are iterating,
but ksyms_last_snapshot itself cannot, so invert the loop structure.

Discussed with rin@.

Revision 1.94 / (download) - annotate - [select for diffs], Wed Jun 2 15:43:33 2021 UTC (2 years, 9 months ago) by rin
Branch: MAIN
Changes since 1.93: +4 -4 lines
Diff to previous 1.93 (colored) to selected 1.38 (colored)

Fix regression introduced in rev 1.90:

http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/kern/kern_ksyms.c#rev1.90

in which the last element of ksyms_symtabs is skipped by mistake.

Revision 1.93 / (download) - annotate - [select for diffs], Wed Jun 2 08:46:16 2021 UTC (2 years, 9 months ago) by riastradh
Branch: MAIN
CVS Tags: cjep_sun2x-base
Branch point for: cjep_sun2x
Changes since 1.92: +7 -3 lines
Diff to previous 1.92 (colored) to selected 1.38 (colored)

Revert "ksyms(4): Don't skip symbol tables that are soon to be freed."

Apparently the equality kassert this restored doesn't work; to be
analyzed.

Revision 1.92 / (download) - annotate - [select for diffs], Tue Jun 1 21:11:52 2021 UTC (2 years, 9 months ago) by riastradh
Branch: MAIN
Changes since 1.91: +3 -7 lines
Diff to previous 1.91 (colored) to selected 1.38 (colored)

ksyms(4): Don't skip symbol tables that are soon to be freed.

They will not actually be freed until /dev/ksyms is closed, so
continued access to them remains kosher.

Revision 1.91 / (download) - annotate - [select for diffs], Tue Jun 1 21:11:07 2021 UTC (2 years, 9 months ago) by riastradh
Branch: MAIN
Changes since 1.90: +27 -2 lines
Diff to previous 1.90 (colored) to selected 1.38 (colored)

ksyms(4): Modify ksyms_symtabs only at IPL_HIGH.

This limits the opportunities for ddb to witness an inconsistent
state of the symbol table list.

Revision 1.90 / (download) - annotate - [select for diffs], Tue Jun 1 21:10:23 2021 UTC (2 years, 9 months ago) by riastradh
Branch: MAIN
Changes since 1.89: +41 -21 lines
Diff to previous 1.89 (colored) to selected 1.38 (colored)

ksyms(4): Fix ksymsread synchronization.

Fixes crash on concurrent update and read of /dev/ksyms.

XXX Unclear why we have to skip sd_gone entries here -- it seems like
they should be preserved until ksymsclose.

Revision 1.89 / (download) - annotate - [select for diffs], Wed Sep 23 09:52:02 2020 UTC (3 years, 6 months ago) by simonb
Branch: MAIN
CVS Tags: thorpej-futex-base, thorpej-futex, thorpej-cfargs-base, thorpej-cfargs, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Branch point for: thorpej-i2c-spi-conf
Changes since 1.88: +12 -2 lines
Diff to previous 1.88 (colored) to selected 1.38 (colored)

The current MIPS DDB stacktrace code doesn't work if no symbols are
available, so fall back to old-fashioned unwind code if no symbols.

Revision 1.88 / (download) - annotate - [select for diffs], Sun Jan 5 21:12:34 2020 UTC (4 years, 2 months ago) by pgoyette
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Changes since 1.87: +9 -3 lines
Diff to previous 1.87 (colored) to selected 1.38 (colored)

When reading from /dev/ksyms we need to skip over entries that have
been marked as sd_gone.  Otherwise we might try to uiomove() data from
memory that has been unmapped, resulting in EFAULT.

XXX This (along with other pre-existing checks st->sd_gone) is still
racy, but it's an improvement over current code.  Ideally we would
make a complete copy of the symbol table when we open /dev/ksyms so
we could ignore any changes that occur.

ad@ says "good enough for now"

XXX Pullup to -9 and -8

Revision 1.87 / (download) - annotate - [select for diffs], Sat Nov 4 22:17:55 2017 UTC (6 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, phil-wifi-base, phil-wifi-20191119, phil-wifi-20190609, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, netbsd-9-base, netbsd-9-0-RC1, isaki-audio2-base, isaki-audio2
Branch point for: phil-wifi, netbsd-9
Changes since 1.86: +5 -6 lines
Diff to previous 1.86 (colored) to selected 1.38 (colored)

use Elf_Sym ** instead of casting.

Revision 1.86 / (download) - annotate - [select for diffs], Fri Nov 3 09:59:07 2017 UTC (6 years, 4 months ago) by maxv
Branch: MAIN
Changes since 1.85: +13 -6 lines
Diff to previous 1.85 (colored) to selected 1.38 (colored)

Handle absolute relocations coming from the kernel: preserve SHN_ABS in
the kernel and module symbols, and when relocating a symbol that has
SHN_ABS, take its value as-is and don't return an error if it equals zero.

Sent on tech-kern@.

Revision 1.85 / (download) - annotate - [select for diffs], Wed Jun 14 00:52:37 2017 UTC (6 years, 9 months ago) by chs
Branch: MAIN
CVS Tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825
Changes since 1.84: +14 -5 lines
Diff to previous 1.84 (colored) to selected 1.38 (colored)

create an nmap table for module symtabs too.
needed by dtrace.

Revision 1.84 / (download) - annotate - [select for diffs], Thu Jul 7 06:55:43 2016 UTC (7 years, 8 months ago) by msaitoh
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, netbsd-8-base, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: netbsd-8
Changes since 1.83: +3 -3 lines
Diff to previous 1.83 (colored) to selected 1.38 (colored)

KNF. Remove extra spaces. No functional change.

Revision 1.83 / (download) - annotate - [select for diffs], Sun Dec 27 20:52:25 2015 UTC (8 years, 3 months ago) by gson
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319
Changes since 1.82: +3 -3 lines
Diff to previous 1.82 (colored) to selected 1.38 (colored)

KSYMS_MAX_ID is too small for i386 kernels built with MKDEBUG=yes,
causing a number of ATF tests to fail.  Increase it by 50%, from 65536
to 98304.

Revision 1.82 / (download) - annotate - [select for diffs], Wed Dec 9 16:26:16 2015 UTC (8 years, 3 months ago) by maxv
Branch: MAIN
CVS Tags: nick-nhusb-base-20151226
Changes since 1.81: +18 -21 lines
Diff to previous 1.81 (colored) to selected 1.38 (colored)

KNF

Revision 1.81 / (download) - annotate - [select for diffs], Sun Aug 30 01:46:02 2015 UTC (8 years, 7 months ago) by uebayasi
Branch: MAIN
CVS Tags: nick-nhusb-base-20150921
Changes since 1.80: +3 -2 lines
Diff to previous 1.80 (colored) to selected 1.38 (colored)

Use makeoptions_COPY_SYMTAB via opt_copy_symtab.h in sources.  Remove a hack
to set -DCOPY_SYMTAB from sys/conf/Makefile.kern.inc.  Remove unnecessary
dependencies too.

Revision 1.80 / (download) - annotate - [select for diffs], Thu Aug 27 02:43:20 2015 UTC (8 years, 7 months ago) by uebayasi
Branch: MAIN
Changes since 1.79: +7 -5 lines
Diff to previous 1.79 (colored) to selected 1.38 (colored)

Constify a little.

Revision 1.79 / (download) - annotate - [select for diffs], Fri Aug 21 06:55:25 2015 UTC (8 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.78: +5 -3 lines
Diff to previous 1.78 (colored) to selected 1.38 (colored)

we don't need ioconf.h if we don't have the ksyms pseudo-device

Revision 1.78 / (download) - annotate - [select for diffs], Fri Aug 21 06:50:56 2015 UTC (8 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.77: +11 -3 lines
Diff to previous 1.77 (colored) to selected 1.38 (colored)

If we don't have a pseudo-device, we don't need the attach function.

Revision 1.77 / (download) - annotate - [select for diffs], Thu Aug 20 09:45:45 2015 UTC (8 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.76: +3 -3 lines
Diff to previous 1.76 (colored) to selected 1.38 (colored)

include ioconf.h instead of locally declaring the prototype of the attach
function

Revision 1.76 / (download) - annotate - [select for diffs], Wed May 20 02:45:20 2015 UTC (8 years, 10 months ago) by matt
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606
Changes since 1.75: +53 -7 lines
Diff to previous 1.75 (colored) to selected 1.38 (colored)

Change the ksyms ioctls to more compat_netbsd32 friendly.  Use _IOWR ioctls
to avoid extra copyouts.  With these changes, netstat and vmstat work on
mips64eb with the normal N32 userland and a N64 kernel.

Revision 1.75 / (download) - annotate - [select for diffs], Mon Dec 15 13:50:10 2014 UTC (9 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20150406
Changes since 1.74: +4 -4 lines
Diff to previous 1.74 (colored) to selected 1.38 (colored)

Don't hard code crap we have perfectly good constants for.

Revision 1.74 / (download) - annotate - [select for diffs], Tue Dec 9 02:30:09 2014 UTC (9 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.73: +36 -21 lines
Diff to previous 1.73 (colored) to selected 1.38 (colored)

- use the unused section in the array to put a NetBSD note in it
- cleanup the hard-coded constants in the stringtab

Revision 1.73 / (download) - annotate - [select for diffs], Sun Aug 17 21:17:44 2014 UTC (9 years, 7 months ago) by joerg
Branch: MAIN
CVS Tags: nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.72: +6 -7 lines
Diff to previous 1.72 (colored) to selected 1.38 (colored)

Reorganize symbol table embedding.  The existing option SYMTAB_SPACE is
replaced by the make option COPY_SYMTAB set to any value. The copy of
the symbol table is no longer put into a buffer in kern_ksyms.o, but a
small helper object. This object is build first with a dummy size, then
the kernel is linked to compute the real dimension of the symbol table
buffer. After that, the helper object is rebuild and the kernel linked
again.

Revision 1.72 / (download) - annotate - [select for diffs], Fri Jul 25 08:10:40 2014 UTC (9 years, 8 months ago) by dholland
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-base, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1
Branch point for: netbsd-7-0, netbsd-7
Changes since 1.71: +3 -2 lines
Diff to previous 1.71 (colored) to selected 1.38 (colored)

Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.

Revision 1.71 / (download) - annotate - [select for diffs], Sun Mar 16 05:20:30 2014 UTC (10 years ago) by dholland
Branch: MAIN
CVS Tags: yamt-pagecache-base9, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Changes since 1.70: +13 -4 lines
Diff to previous 1.70 (colored) to selected 1.38 (colored)

Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.

Revision 1.70 / (download) - annotate - [select for diffs], Sun Apr 7 00:49:45 2013 UTC (10 years, 11 months ago) by chs
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900
Branch point for: rmind-smpnet
Changes since 1.69: +3 -3 lines
Diff to previous 1.69 (colored) to selected 1.38 (colored)

don't overwrite the CTF info with the symbol table.

Revision 1.69 / (download) - annotate - [select for diffs], Thu Jan 17 14:36:36 2013 UTC (11 years, 2 months ago) by matt
Branch: MAIN
CVS Tags: yamt-pagecache-base8, agc-symver-base, agc-symver
Changes since 1.68: +15 -11 lines
Diff to previous 1.68 (colored) to selected 1.38 (colored)

Add a separate bool to indicate a symbol table has been loaded.
ksym_initted indicates whether the kmutex has been initted or not.
Add __cacheline_aligned to the kmutex.

Revision 1.68 / (download) - annotate - [select for diffs], Sun Nov 18 00:06:57 2012 UTC (11 years, 4 months ago) by chs
Branch: MAIN
CVS Tags: yamt-pagecache-base7
Changes since 1.67: +8 -21 lines
Diff to previous 1.67 (colored) to selected 1.38 (colored)

make ksyms structures not depend on KDTRACE_HOOKS.
always include a CTF section, even though it might be empty.
this fixes savecore's generated kernel symbol table files.

Revision 1.67 / (download) - annotate - [select for diffs], Mon Dec 5 21:30:48 2011 UTC (12 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10
Branch point for: tls-maxphys
Changes since 1.66: +3 -3 lines
Diff to previous 1.66 (colored) to selected 1.38 (colored)

close the comment, there is a draft.

Revision 1.66 / (download) - annotate - [select for diffs], Mon Dec 5 20:55:14 2011 UTC (12 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.65: +8 -5 lines
Diff to previous 1.65 (colored) to selected 1.38 (colored)

PR/45687: Mike Pumford: savecore: (null): _ksyms_hdr not in namelist
Make it non-static and add a comment so that they don't become static again.

Revision 1.65 / (download) - annotate - [select for diffs], Thu Jul 28 13:42:16 2011 UTC (12 years, 8 months ago) by uebayasi
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, jmcneill-usbmp
Changes since 1.64: +1 -1 lines
Diff to previous 1.64 (colored) to selected 1.38 (colored)

Define SYMTAB_SPACE in opt_ksyms.h, not opt_ddbparam.h.  Ensure
that ddb(4) code is independent of SYMTAB_SPACE value.

Revision 1.64 / (download) - annotate - [select for diffs], Wed Jul 27 14:35:34 2011 UTC (12 years, 8 months ago) by uebayasi
Branch: MAIN
Changes since 1.63: +2 -4 lines
Diff to previous 1.63 (colored) to selected 1.38 (colored)

These don't need uvm/uvm_extern.h.

Revision 1.63 / (download) - annotate - [select for diffs], Sun Apr 24 18:46:22 2011 UTC (12 years, 11 months ago) by rmind
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, cherry-xenmp
Changes since 1.62: +3 -3 lines
Diff to previous 1.62 (colored) to selected 1.38 (colored)

- Replace few malloc(9) uses with kmem(9).
- Rename buf_malloc() to buf_alloc(), fix comments.
- Remove some unnecessary inclusions.

Revision 1.62 / (download) - annotate - [select for diffs], Tue Jan 4 01:40:19 2011 UTC (13 years, 2 months ago) by matt
Branch: MAIN
CVS Tags: jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: jruoho-x86intr
Changes since 1.61: +10 -7 lines
Diff to previous 1.61 (colored) to selected 1.38 (colored)

When determining max/min sym value, ignore ABS symbols which don't
have a type.  This stops ksym thinking that the _KERNEL_OPT symbols
could actually be useful.

Revision 1.61 / (download) - annotate - [select for diffs], Tue Jul 27 14:25:23 2010 UTC (13 years, 8 months ago) by jakllsch
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, matt-mips64-premerge-20101231
Changes since 1.60: +3 -3 lines
Diff to previous 1.60 (colored) to selected 1.38 (colored)

Use 'z' printf format modifier to print size_t in debug code.

Revision 1.60 / (download) - annotate - [select for diffs], Tue May 4 14:14:54 2010 UTC (13 years, 10 months ago) by tsutsui
Branch: MAIN
Changes since 1.59: +19 -17 lines
Diff to previous 1.59 (colored) to selected 1.38 (colored)

Some KNF.

Revision 1.59 / (download) - annotate - [select for diffs], Mon May 3 09:51:36 2010 UTC (13 years, 11 months ago) by darran
Branch: MAIN
Changes since 1.58: +9 -2 lines
Diff to previous 1.58 (colored) to selected 1.38 (colored)

DTrace: Fix several bugs where the mod_ctf_get() function could return
success even though no CTF section was present in the kernel or module.
This fixes the panic that several people saw when trying out the FBT
provider without updating /boot or missing a CTF section in /netbsd.

Revision 1.58 / (download) - annotate - [select for diffs], Sun Mar 14 21:27:49 2010 UTC (14 years ago) by darran
Branch: MAIN
CVS Tags: uebayasi-xip-base1
Branch point for: rmind-uvmplock
Changes since 1.57: +24 -6 lines
Diff to previous 1.57 (colored) to selected 1.38 (colored)

DTrace: Make the CTF handling conditional on KDTRACE_HOOKS for now since
it breaks the boot of the atari kernel (and possibly others).

Revision 1.57 / (download) - annotate - [select for diffs], Sat Mar 13 16:27:06 2010 UTC (14 years ago) by christos
Branch: MAIN
Changes since 1.56: +4 -4 lines
Diff to previous 1.56 (colored) to selected 1.38 (colored)

make this compile.

Revision 1.56 / (download) - annotate - [select for diffs], Fri Mar 12 21:43:11 2010 UTC (14 years ago) by darran
Branch: MAIN
Changes since 1.55: +192 -8 lines
Diff to previous 1.55 (colored) to selected 1.38 (colored)

DTrace: Add support for CTF sections in the netbsd elf image, load these
at boot.
Add a ksyms_mod_foreach() function to iterate a callback function over the
set of elf symbols for a specific module (netbsd included).
Add kern_ctf.c and mod_ctf_get() to allow the retrieval and decompression
of CTF sections for a specific module.

Revision 1.55 / (download) - annotate - [select for diffs], Mon Mar 1 22:27:07 2010 UTC (14 years, 1 month ago) by darran
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9
Changes since 1.54: +8 -62 lines
Diff to previous 1.54 (colored) to selected 1.38 (colored)

Revert accidental commit of CTF work-in-progress changes.

Revision 1.54 / (download) - annotate - [select for diffs], Mon Mar 1 21:10:16 2010 UTC (14 years, 1 month ago) by darran
Branch: MAIN
Changes since 1.53: +64 -10 lines
Diff to previous 1.53 (colored) to selected 1.38 (colored)

DTrace: Add an SDT (Statically Defined Tracing) provider framework, and
implement most of the proc provider.  Adds proc:::create, exec,
exec_success, exec_faillure, signal_send, signal_discard, signal_handle,
lwp_create, lwp_start, lwp_exit.

Revision 1.53 / (download) - annotate - [select for diffs], Sun Jan 31 00:43:37 2010 UTC (14 years, 2 months ago) by hubertf
Branch: MAIN
CVS Tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Changes since 1.52: +3 -3 lines
Diff to previous 1.52 (colored) to selected 1.38 (colored)

Replace more printfs with aprint_normal / aprint_verbose
Makes "boot -z" go mostly silent for me.

Revision 1.52 / (download) - annotate - [select for diffs], Wed Nov 25 13:16:55 2009 UTC (14 years, 4 months ago) by pooka
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.51: +2 -3 lines
Diff to previous 1.51 (colored) to selected 1.38 (colored)

Remove highly questionable assert which demans that the kernel symbol
table is in memory at a lower address than the string table.

Revision 1.51 / (download) - annotate - [select for diffs], Sun Mar 15 17:14:40 2009 UTC (15 years ago) by cegger
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jymxensuspend-base, jym-xensuspend-nbase, jym-xensuspend-base
Changes since 1.50: +3 -3 lines
Diff to previous 1.50 (colored) to selected 1.38 (colored)

ansify function definitions

Revision 1.50 / (download) - annotate - [select for diffs], Fri Jan 23 09:22:25 2009 UTC (15 years, 2 months ago) by jmmv
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Branch point for: jym-xensuspend
Changes since 1.49: +10 -10 lines
Diff to previous 1.49 (colored) to selected 1.38 (colored)

Initialize SYMTAB_SPACE ksyms during ksyms_init.  Per PR port-evbarm/40311.

Revision 1.49 / (download) - annotate - [select for diffs], Thu Jan 1 19:10:17 2009 UTC (15 years, 2 months ago) by pooka
Branch: MAIN
CVS Tags: mjf-devfs2-base
Changes since 1.48: +3 -3 lines
Diff to previous 1.48 (colored) to selected 1.38 (colored)

_KERNEL_OPT

Revision 1.48 / (download) - annotate - [select for diffs], Fri Dec 5 21:38:10 2008 UTC (15 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Changes since 1.47: +18 -11 lines
Diff to previous 1.47 (colored) to selected 1.38 (colored)

Make the fake ELF object work with gdb.

- Output a .bss section and make all the symbols relative to it, instead
  of making them absolute.
- Output a single load section, no need for two.

'gdb /dev/ksyms' still doesn't work because ksyms doesn't do mmap yet.

Revision 1.47 / (download) - annotate - [select for diffs], Sun Nov 30 18:21:36 2008 UTC (15 years, 4 months ago) by martin
Branch: MAIN
Changes since 1.46: +11 -7 lines
Diff to previous 1.46 (colored) to selected 1.38 (colored)

As discussed on tech-kern: mutex_init is too heavyweight for early bootstrap
phases, so move the initialization of the ksyms mutex back into main via
a function called ksyms_init. Rename the existing (but quite different)
ksyms_init* variations into ksyms_addsyms_elf() and ksyms_addsyms_explicit()
and adapt machdep code accordingly.

Revision 1.46 / (download) - annotate - [select for diffs], Sun Nov 16 16:15:58 2008 UTC (15 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.45: +5 -4 lines
Diff to previous 1.45 (colored) to selected 1.38 (colored)

Our qsort() is inappropriate for kernel use because it makes recursive
calls. Replace it with a kheapsort() function in kernel. Pointed out
by tron@.

Revision 1.45 / (download) - annotate - [select for diffs], Sun Nov 16 15:29:53 2008 UTC (15 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.44: +2 -7 lines
Diff to previous 1.44 (colored) to selected 1.38 (colored)

Remove unneeded includes.

Revision 1.44 / (download) - annotate - [select for diffs], Sun Nov 16 15:28:15 2008 UTC (15 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.43: +10 -14 lines
Diff to previous 1.43 (colored) to selected 1.38 (colored)

Fix ksyms_getname() broken in previous.

Revision 1.43 / (download) - annotate - [select for diffs], Sun Nov 16 15:13:35 2008 UTC (15 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.42: +100 -176 lines
Diff to previous 1.42 (colored) to selected 1.38 (colored)

- Local symbols could shadow globals in some instances. Fix it.

- mutex_enter() from ksyms_getval() could panic due to a change made
  in revision 1.40. Fix it.

- Replace the p-tree with a binary search of global symbols. Saves about
  250kB of wired memory on i386 and allows for faster lookups within
  module symbol tables.

Revision 1.42 / (download) - annotate - [select for diffs], Wed Nov 12 12:36:16 2008 UTC (15 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.41: +6 -258 lines
Diff to previous 1.41 (colored) to selected 1.38 (colored)

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.

Revision 1.41 / (download) - annotate - [select for diffs], Fri Oct 24 13:55:42 2008 UTC (15 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-5-base, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, matt-mips64-base2
Branch point for: nick-hppapmap, netbsd-5
Changes since 1.40: +3 -5 lines
Diff to previous 1.40 (colored) to selected 1.38 (colored)

don't hold locks in ddb (call ksyms_getval_unlocked()), pointed out by ad.

Revision 1.40 / (download) - annotate - [select for diffs], Thu Oct 23 20:41:13 2008 UTC (15 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.39: +28 -12 lines
Diff to previous 1.39 (colored) to selected 1.38 (colored)

don't expose ksyms_lock

Revision 1.39 / (download) - annotate - [select for diffs], Mon Oct 20 10:24:18 2008 UTC (15 years, 5 months ago) by ad
Branch: MAIN
Changes since 1.38: +368 -423 lines
Diff to previous 1.38 (colored)

PR kern/38814 ksyms needs locking

- Make ksyms MT safe.
- Fix deadlock from an operation like "modload foo.lkm < /dev/ksyms".
- Fix uninitialized structure members.
- Reduce memory footprint for loaded modules.
- Export ksyms structures for kernel grovellers like savecore.
- Some KNF.

Revision 1.38 / (download) - annotate - [selected], Fri Oct 10 23:09:19 2008 UTC (15 years, 5 months ago) by skrll
Branch: MAIN
CVS Tags: haad-dm-base1
Changes since 1.37: +3 -1 lines
Diff to previous 1.37 (colored)

RCSID police.

Revision 1.37 / (download) - annotate - [select for diffs], Mon Oct 6 11:49:44 2008 UTC (15 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4
Changes since 1.36: +3 -1 lines
Diff to previous 1.36 (colored) to selected 1.38 (colored)

PR kern/39681 ddb doesn't work with new MODULAR modules

Complete initialization of new symbol table record.

Revision 1.36 / (download) - annotate - [select for diffs], Tue Jul 22 21:18:35 2008 UTC (15 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, simonb-wapbl-nbase, simonb-wapbl-base
Changes since 1.35: +3 -1 lines
Diff to previous 1.35 (colored) to selected 1.38 (colored)

report local symbols too.

Revision 1.35 / (download) - annotate - [select for diffs], Wed Feb 20 02:30:51 2008 UTC (16 years, 1 month ago) by matt
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, yamt-nfs-mp-base2, yamt-nfs-mp-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, wrstuden-revivesa-base-1, wrstuden-revivesa-base, nick-net80211-sync-base, nick-net80211-sync, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-nbase, hpcarm-cleanup-base, ad-socklock-base1
Branch point for: yamt-nfs-mp, wrstuden-revivesa, simonb-wapbl, mjf-devfs2, haad-dm
Changes since 1.34: +14 -2 lines
Diff to previous 1.34 (colored) to selected 1.38 (colored)

For each symtab, remember which symbols have the minimum and maximum value.
When returning a "close" symbol, make sure the value being searched for is
within the symtab.  This prevents ddb matching addresses beyond the end of
the kernel.

Revision 1.34 / (download) - annotate - [select for diffs], Fri Jan 4 11:28:13 2008 UTC (16 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: mjf-devfs-base, matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.33: +7 -2 lines
Diff to previous 1.33 (colored) to selected 1.38 (colored)

Ignore symbols marked undefined.

Revision 1.33 / (download) - annotate - [select for diffs], Mon Apr 2 16:44:44 2007 UTC (17 years ago) by christos
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, yamt-idlelwp-base8, vmlocking2-base3, vmlocking2-base2, vmlocking2-base1, vmlocking2, vmlocking-nbase, vmlocking-base, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, nick-csl-alignment-base5, nick-csl-alignment-base, nick-csl-alignment, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, jmcneill-pm-base, jmcneill-pm, jmcneill-base, hpcarm-cleanup, cube-autoconf-base, cube-autoconf, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: mjf-devfs, matt-armv6, bouyer-xeni386
Changes since 1.32: +22 -5 lines
Diff to previous 1.32 (colored) to selected 1.38 (colored)

Don't panic if we don't find a symbol or string table. Perhaps the kernel
has been stripped?

Revision 1.32 / (download) - annotate - [select for diffs], Sun Mar 4 06:03:03 2007 UTC (17 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: reinoud-bufcleanup
Branch point for: vmlocking, mjf-ufs-trans
Changes since 1.31: +18 -18 lines
Diff to previous 1.31 (colored) to selected 1.38 (colored)

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.31 / (download) - annotate - [select for diffs], Mon Nov 6 13:35:35 2006 UTC (17 years, 4 months ago) by jmmv
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, post-newlock2-merge, newlock2-nbase, newlock2-base, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-nb4-arm-base, matt-nb4-arm, ad-audiomp-base, ad-audiomp
Branch point for: yamt-idlelwp
Changes since 1.30: +9 -2 lines
Diff to previous 1.30 (colored) to selected 1.38 (colored)

Pass a simple ELF header to ksyms_init_explicit with the minimum contents
required to initialize ksyms_hdr.  Otherwise LKMs do not work when using
ksyms_init_explicit instead of ksyms_init, as is the case of booting an
i386 kernel using Multiboot.

Revision 1.30 / (download) - annotate - [select for diffs], Wed Nov 1 10:17:58 2006 UTC (17 years, 5 months ago) by yamt
Branch: MAIN
Changes since 1.29: +10 -12 lines
Diff to previous 1.29 (colored) to selected 1.38 (colored)

remove some __unused from function parameters.

Revision 1.29 / (download) - annotate - [select for diffs], Wed Oct 25 13:46:36 2006 UTC (17 years, 5 months ago) by jmmv
Branch: MAIN
Changes since 1.28: +95 -31 lines
Diff to previous 1.28 (colored) to selected 1.38 (colored)

Add a function (ksyms_init_explicit) to add a symbol table when we know the
exact address of the symtab and strtab ELF sections contents beforehand.

This will be used in i386's Multiboot code to add the initial kernel ksyms
without having to prepare a minimal ELF image that matches the format
expected by the reguluar ksyms_init function.

This part was reviewed by cube@ and successfully passes a full i386 release
build.

Revision 1.28 / (download) - annotate - [select for diffs], Thu Oct 12 01:32:15 2006 UTC (17 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.27: +12 -9 lines
Diff to previous 1.27 (colored) to selected 1.38 (colored)

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.27 / (download) - annotate - [select for diffs], Sun Dec 11 12:24:29 2005 UTC (18 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, yamt-pdpolicy-base6, yamt-pdpolicy-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, yamt-pdpolicy, simonb-timecounters-base, simonb-timecounters, simonb-timcounters-final, rpaulo-netinet-merge-pcb-base, rpaulo-netinet-merge-pcb, peter-altq-base, peter-altq, gdamore-uart-base, gdamore-uart, elad-kernelauth-base, elad-kernelauth, chap-midi-nbase, chap-midi-base, chap-midi, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.26: +4 -6 lines
Diff to previous 1.26 (colored) to selected 1.38 (colored)

merge ktrace-lwp.

Revision 1.26 / (download) - annotate - [select for diffs], Sat Jun 25 05:30:04 2005 UTC (18 years, 9 months ago) by riz
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, thorpej-vnode-attr-base, thorpej-vnode-attr, ktrace-lwp-base
Branch point for: yamt-lazymbuf
Changes since 1.25: +3 -3 lines
Diff to previous 1.25 (colored) to selected 1.38 (colored)

Use %zx in a format string to print a size_t, not %lx, so a kernel
with KSYMS_DEBUG will compile.

Revision 1.25 / (download) - annotate - [select for diffs], Thu Jun 23 23:15:12 2005 UTC (18 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.24: +18 -27 lines
Diff to previous 1.24 (colored) to selected 1.38 (colored)

Use ANSI function decls.  Apply some static.

Revision 1.24 / (download) - annotate - [select for diffs], Sun May 29 22:24:15 2005 UTC (18 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.23: +11 -10 lines
Diff to previous 1.23 (colored) to selected 1.38 (colored)

- add const.
- remove unnecessary casts.
- add __UNCONST casts and mark them with XXXUNCONST as necessary.

Revision 1.23 / (download) - annotate - [select for diffs], Sat Feb 26 21:34:55 2005 UTC (19 years, 1 month ago) by perry
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base, kent-audio2-base
Branch point for: netbsd-3
Changes since 1.22: +10 -10 lines
Diff to previous 1.22 (colored) to selected 1.38 (colored)

nuke trailing whitespace

Revision 1.22 / (download) - annotate - [select for diffs], Tue Feb 15 21:09:57 2005 UTC (19 years, 1 month ago) by cube
Branch: MAIN
Changes since 1.21: +27 -12 lines
Diff to previous 1.21 (colored) to selected 1.38 (colored)

The way I handled /dev/ksyms requests vs. kernel requests was completely
broken.  Inside the kernel, we always have to use the real values of the
st_name fields, and only do the math when the request comes from userland.

No need for ksyms_getval_from{kernel,userland} hack anymore.  However, a
different version will be asked for pull-up in -2{,-0}, one that doesn't
break the API, that is.

Fixes PR#29133 from Jens Kessmeier.

Revision 1.21 / (download) - annotate - [select for diffs], Thu Feb 19 03:42:01 2004 UTC (20 years, 1 month ago) by matt
Branch: MAIN
CVS Tags: yamt-km-base2, yamt-km-base, netbsd-2-base, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, netbsd-2, kent-audio2
Changes since 1.20: +19 -13 lines
Diff to previous 1.20 (colored) to selected 1.38 (colored)

Move detection of a special symbol into a separate function.  Add some more
special symbols.

Revision 1.20 / (download) - annotate - [select for diffs], Wed Feb 18 23:44:49 2004 UTC (20 years, 1 month ago) by matt
Branch: MAIN
Changes since 1.19: +103 -38 lines
Diff to previous 1.19 (colored) to selected 1.38 (colored)

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.

Revision 1.19 / (download) - annotate - [select for diffs], Wed Feb 18 20:41:09 2004 UTC (20 years, 1 month ago) by matt
Branch: MAIN
Changes since 1.18: +3 -3 lines
Diff to previous 1.18 (colored) to selected 1.38 (colored)

s/sumbols/symbols/

Revision 1.18 / (download) - annotate - [select for diffs], Thu Jan 8 22:48:26 2004 UTC (20 years, 2 months ago) by cube
Branch: MAIN
Changes since 1.17: +4 -4 lines
Diff to previous 1.17 (colored) to selected 1.38 (colored)

If ksyms have not been initialized, return ENXIO in ksymsopen instead of
ksymsread, because ksyms client test availability with open() and not
read().

Revision 1.17 / (download) - annotate - [select for diffs], Mon Nov 17 10:16:18 2003 UTC (20 years, 4 months ago) by cube
Branch: MAIN
Changes since 1.16: +45 -14 lines
Diff to previous 1.16 (colored) to selected 1.38 (colored)

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@.

Revision 1.16 / (download) - annotate - [select for diffs], Thu Nov 6 18:22:01 2003 UTC (20 years, 4 months ago) by ragge
Branch: MAIN
Changes since 1.15: +9 -4 lines
Diff to previous 1.15 (colored) to selected 1.38 (colored)

Do not try to enter more than MAX_INT16 symbols into the patricia tree;
the not-entered symbols will be found anyway but via a linear-search.
This only happens if something is wrong when linking the kernel.
Fixes problems reported on port-hp700.

Revision 1.15 / (download) - annotate - [select for diffs], Sat Oct 25 09:03:59 2003 UTC (20 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.14: +7 -7 lines
Diff to previous 1.14 (colored) to selected 1.38 (colored)

fix uninitialized variables. one of them is a compiler bug.

Revision 1.14 / (download) - annotate - [select for diffs], Wed Sep 3 10:55:22 2003 UTC (20 years, 7 months ago) by ragge
Branch: MAIN
Changes since 1.13: +3 -3 lines
Diff to previous 1.13 (colored) to selected 1.38 (colored)

long -> unsigned long.

Revision 1.13 / (download) - annotate - [select for diffs], Sun Jun 29 22:31:20 2003 UTC (20 years, 9 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored) to selected 1.38 (colored)

Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.

Revision 1.12 / (download) - annotate - [select for diffs], Sat Jun 28 14:21:54 2003 UTC (20 years, 9 months ago) by darrenr
Branch: MAIN
Changes since 1.11: +5 -5 lines
Diff to previous 1.11 (colored) to selected 1.38 (colored)

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

Revision 1.11 / (download) - annotate - [select for diffs], Sun Jun 1 00:03:39 2003 UTC (20 years, 10 months ago) by jdolecek
Branch: MAIN
Changes since 1.10: +4 -1 lines
Diff to previous 1.10 (colored) to selected 1.38 (colored)

Add __KERNEL_RCSID()

Revision 1.10 / (download) - annotate - [select for diffs], Fri May 16 14:25:03 2003 UTC (20 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.9: +12 -8 lines
Diff to previous 1.9 (colored) to selected 1.38 (colored)

use strlcpy.  [fixed off-by-one in subr_prop.c]

Revision 1.9 / (download) - annotate - [select for diffs], Sun May 11 08:23:23 2003 UTC (20 years, 10 months ago) by jdolecek
Branch: MAIN
Changes since 1.8: +15 -12 lines
Diff to previous 1.8 (colored) to selected 1.38 (colored)

make couple ksym functions' arguments const

Revision 1.8 / (download) - annotate - [select for diffs], Wed May 7 21:28:16 2003 UTC (20 years, 10 months ago) by ragge
Branch: MAIN
Changes since 1.7: +230 -15 lines
Diff to previous 1.7 (colored) to selected 1.38 (colored)

Remove useless entries from the symbol table at load.
Add patricia-tree-style lookup code for symbols (for fast lookups).

Revision 1.7 / (download) - annotate - [select for diffs], Fri May 2 09:34:57 2003 UTC (20 years, 11 months ago) by ragge
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored) to selected 1.38 (colored)

#ifdef KSYMS_DEBUG should be #if NKSYMS.

Revision 1.6 / (download) - annotate - [select for diffs], Fri May 2 09:19:51 2003 UTC (20 years, 11 months ago) by tron
Branch: MAIN
Changes since 1.5: +5 -1 lines
Diff to previous 1.5 (colored) to selected 1.38 (colored)

Fix build problems for kernel configurations without the "ksyms"
pseudo-device.

Revision 1.5 / (download) - annotate - [select for diffs], Thu May 1 20:46:20 2003 UTC (20 years, 11 months ago) by ragge
Branch: MAIN
Changes since 1.4: +27 -11 lines
Diff to previous 1.4 (colored) to selected 1.38 (colored)

Enable the ioctl's.

Revision 1.4 / (download) - annotate - [select for diffs], Sat Apr 26 10:24:58 2003 UTC (20 years, 11 months ago) by ragge
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored) to selected 1.38 (colored)

Make ksymms_init() take void * parameters instead of caddr_t.

Revision 1.3 / (download) - annotate - [select for diffs], Fri Apr 25 20:30:58 2003 UTC (20 years, 11 months ago) by ragge
Branch: MAIN
Changes since 1.2: +37 -4 lines
Diff to previous 1.2 (colored) to selected 1.38 (colored)

Mobe the SYMTAB_SPACE stuff to ksyms_init, so that it can be used without
DDB compiled-in.

Revision 1.2 / (download) - annotate - [select for diffs], Fri Apr 25 07:35:21 2003 UTC (20 years, 11 months ago) by ragge
Branch: MAIN
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored) to selected 1.38 (colored)

Explicitly cast printf arg to long, from Tom Spindler.

Revision 1.1 / (download) - annotate - [select for diffs], Thu Apr 24 19:56:43 2003 UTC (20 years, 11 months ago) by ragge
Branch: MAIN
Diff to selected 1.38 (colored)

Basic implementation of in-kernel symbol table manager + /dev/ksyms.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>